:root {
  --bg: #efefec;
  --surface: #ffffff;
  --surface-2: #f3f2ef;
  --text: #111111;
  --muted: #737370;
  --line: #d7d5d0;
  --brand: #1f1f1f;
  --brand-dark: #111111;
  --accent: #c8a063;
  --warning-bg: #f5efe4;
  --shadow: 0 10px 28px rgba(17, 17, 17, 0.055);
  --mobile-safe-top: env(safe-area-inset-top, 0px);
  --mobile-safe-right: env(safe-area-inset-right, 0px);
  --mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
  --mobile-safe-left: env(safe-area-inset-left, 0px);
  --mobile-navigation-height: 76px;
  --mobile-navigation-sheet-gap: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Montserrat, "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  letter-spacing: 0.01em;
}

body.modal-open {
  overflow: hidden;
}

body.auth-pending .app-shell {
  pointer-events: none;
  visibility: hidden;
  user-select: none;
}

body.auth-pending::before,
body.auth-pending::after {
  position: fixed;
  z-index: 60;
}

body.auth-pending::before {
  content: "";
  inset: 0;
  background: #ffffff;
}

body.auth-pending::after {
  content: "正在確認登入狀態…";
  top: 50%;
  left: 50%;
  width: min(360px, calc(100% - 48px));
  transform: translate(-50%, -50%);
  color: #111111;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 36px;
}

.app-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.topbar,
.section-heading,
.sync-panel,
.search-row,
.card {
  display: flex;
  gap: 12px;
}

.topbar {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border: 1px solid rgba(216, 225, 220, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  padding: 15px 18px;
  box-shadow: 0 12px 28px rgba(29, 39, 36, 0.06);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  letter-spacing: 0;
}

h2 {
  margin-bottom: 4px;
  font-size: 1.08rem;
}

p,
.sync-panel span {
  margin-bottom: 0;
  color: var(--muted);
}

.sync-panel {
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.mobile-interface-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid #c8a063;
  border-radius: 999px;
  background: #fffaf2;
  color: #5f4725;
  padding: 0 14px;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.mobile-interface-link:hover,
.mobile-interface-link:focus-visible {
  border-color: #1f1f1f;
  color: #111;
  outline: none;
}

body[data-interface-surface="mobile-app"] .mobile-interface-link {
  display: none;
}

.active-google-login {
  min-height: 48px;
  white-space: nowrap;
}

.user-context {
  display: grid;
  gap: 1px;
  min-width: 185px;
  min-height: 48px;
  border: 1px solid #c9ded3;
  border-radius: 8px;
  background: #edf7f1;
  color: var(--text);
  padding: 7px 10px;
  text-align: left;
}

button.user-context:focus-visible {
  outline: 3px solid rgba(36, 92, 74, 0.24);
  outline-offset: 2px;
}

.user-context strong {
  color: var(--brand-dark);
  font-size: 0.8rem;
}

.user-context span {
  max-width: 250px;
  overflow: hidden;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-context.role-admin { border-color: #d7c390; background: #fff8e5; }
.user-context.role-manager { border-color: #b9cbe9; background: #eef4ff; }
.user-context.unauthenticated { border-color: #e2b8b0; background: #fff1ee; }
.user-context.unauthorized { border-color: #e2b8b0; background: #fff1ee; }
body.auth-pending .user-context { border-color: #b9cbe9; background: #eef4ff; }

.line-bind-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  border: 1px solid #06a947;
  border-radius: 8px;
  background: #06c755;
  color: #fff;
  padding: 7px 12px;
  font-weight: 900;
  white-space: nowrap;
}

.line-bind-button:hover:not(:disabled) {
  background: #05b64d;
}

.line-bind-button.bound {
  border-color: #89cda3;
  background: #e8f8ee;
  color: #17643a;
}

.line-bind-button:disabled {
  border-color: #ccd7d1;
  background: #eef2f0;
  color: #84918b;
  cursor: not-allowed;
}

.line-bind-mark {
  display: grid;
  place-items: center;
  min-width: 34px;
  min-height: 24px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.2);
  color: currentColor;
  font-size: 0.65rem;
  letter-spacing: -0.02em;
}

.line-bind-button.bound .line-bind-mark {
  background: #fff;
}

.cloud-progress {
  position: relative;
  flex: 1 0 180px;
  max-width: 260px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.cloud-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: var(--brand);
  animation: cloud-loading 1.1s ease-in-out infinite;
}

@keyframes cloud-loading {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(260%);
  }
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 800;
}

button:disabled,
[role="button"][aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
}

.primary {
  background: var(--brand);
  color: #fff;
}

.ghost {
  background: var(--surface-2);
  color: var(--brand-dark);
}

.danger {
  background: #f2e2dd;
  color: var(--accent);
}

.panel,
.card,
.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  margin-bottom: 14px;
  padding: 18px;
}

.workspace-layout {
  display: grid;
  grid-template-columns: minmax(248px, 286px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.app-sidebar {
  position: sticky;
  top: 14px;
  max-height: calc(100dvh - 28px);
  overflow: hidden;
  border: 1px solid rgba(23, 61, 50, 0.24);
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 0%, rgba(112, 175, 145, 0.2), transparent 34%),
    linear-gradient(155deg, #214f42 0%, #173d32 62%, #102e26 100%);
  color: #fff;
  padding: 17px 12px 14px;
  box-shadow: 0 20px 44px rgba(23, 61, 50, 0.18);
}

.sidebar-heading {
  padding: 3px 8px 14px;
}

.sidebar-heading > span {
  display: block;
  margin-bottom: 3px;
  color: #a9d6c0;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.sidebar-heading h2 {
  margin: 0;
  color: #fff;
  font-size: 1.16rem;
}

.sidebar-heading p {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.76rem;
}

.function-grid {
  display: grid;
  gap: 5px;
  max-height: calc(100dvh - 124px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1px 5px 4px 1px;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
  scrollbar-width: thin;
}

.sidebar-group {
  min-width: 0;
  border-radius: 10px;
  background: rgba(7, 30, 23, 0.14);
}

.sidebar-group[hidden] {
  display: none !important;
}

.sidebar-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  border-radius: 9px;
  background: transparent;
  color: #cbe5d8;
  padding: 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-align: left;
  transition: background-color 180ms ease, color 180ms ease;
}

.sidebar-group-toggle:hover,
.sidebar-group-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  outline: none;
}

.sidebar-group.expanded > .sidebar-group-toggle {
  color: #fff;
}

.sidebar-group-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sidebar-group-title svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 200ms cubic-bezier(.2, .8, .2, 1);
}

.sidebar-group-toggle:hover .sidebar-group-title svg,
.sidebar-group-toggle:focus-visible .sidebar-group-title svg {
  transform: translateY(-1px) scale(1.08);
}

.sidebar-group-mark {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid currentColor;
  transition: transform 200ms cubic-bezier(.2, .8, .2, 1);
}

.sidebar-group.expanded .sidebar-group-mark {
  transform: rotate(90deg);
}

.sidebar-group-items {
  display: grid;
  gap: 5px;
  padding: 0 4px 5px;
  animation: sidebar-group-reveal 180ms ease both;
}

.sidebar-group-items[hidden] {
  display: none !important;
}

@keyframes sidebar-group-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.function-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 56px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
  padding: 7px 8px;
  text-align: left;
  text-decoration: none;
  box-shadow: none;
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1), background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.function-card[hidden] {
  display: none !important;
}

.function-card:hover:not(:disabled),
.function-card:focus-visible {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 9px 22px rgba(7, 25, 19, 0.2);
  outline: none;
  transform: translateX(5px);
}

.function-card.active {
  border-color: rgba(255, 255, 255, 0.78);
  background: #f5fbf7;
  color: var(--brand-dark);
  box-shadow: 0 10px 24px rgba(5, 27, 20, 0.22);
}

.function-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
  color: #cce8da;
  transition: transform 240ms cubic-bezier(.2, .8, .2, 1), background-color 220ms ease, color 220ms ease;
}

.function-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.function-card:hover:not(:disabled) .function-icon,
.function-card:focus-visible .function-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-2px) scale(1.07) rotate(-2deg);
}

.function-card.active .function-icon {
  background: #dcefe5;
  color: var(--brand);
}

.function-card-copy,
.function-card-copy > span,
.function-card-copy > strong {
  display: block;
  min-width: 0;
}

.function-card-copy > span {
  overflow: hidden;
  color: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.function-card-copy > strong {
  overflow: hidden;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.57);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.function-card.active .function-card-copy > strong {
  color: #628073;
}

.function-arrow {
  color: rgba(255, 255, 255, 0.56);
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 220ms ease, color 220ms ease;
}

.function-card.active .function-arrow {
  color: var(--brand);
}

.function-card:hover:not(:disabled) .function-arrow,
.function-card:focus-visible .function-arrow {
  color: #fff;
  transform: translateX(3px);
}

.workspace-main {
  min-width: 0;
}

.workspace-page {
  min-height: calc(100dvh - 126px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  padding: 18px;
  box-shadow: 0 18px 42px rgba(29, 39, 36, 0.07);
}

.workspace-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.workspace-page-heading h2 {
  margin-bottom: 2px;
  font-size: clamp(1.25rem, 2vw, 1.68rem);
}

.project-year-filter {
  display: grid;
  flex: 0 0 174px;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  padding: 9px 11px;
  box-shadow: 0 8px 20px rgba(29, 39, 36, 0.05);
}

.project-year-filter > span {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.project-year-filter select {
  width: 100%;
  min-height: 40px;
  border-color: #c9c7c1;
  background: #fff;
  color: var(--text);
  font-size: .92rem;
  font-weight: 900;
}

.project-year-filter:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 31, 31, 0.08);
}

.project-year-empty {
  min-height: 96px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  font-weight: 800;
}

.project-overview-panel {
  margin-bottom: 0;
  box-shadow: 0 10px 26px rgba(29, 39, 36, 0.06);
}

.section-heading {
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.metrics,
.form-grid {
  display: grid;
  gap: 10px;
}

.metrics {
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.metric {
  min-height: 116px;
  padding: 16px;
  text-align: left;
}

button.metric {
  width: 100%;
  border: 2px solid transparent;
  color: var(--text);
  box-shadow: var(--shadow);
}

button.metric.active {
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 3px rgba(36, 92, 74, 0.16), var(--shadow);
}

.status-construction {
  background: #00ff00;
}

.project-list-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.project-list-actions select {
  width: auto;
  min-width: 220px;
}

.status-construction span,
.status-construction strong {
  color: #1d2724;
}

.status-pending-construction {
  background: #dcefe2;
}

.status-designing {
  background: #f4dc7a;
}

.status-pending-design {
  background: #c9eef0;
}

.status-finishing {
  background: #ead7f1;
}

.status-finished {
  background: #e4e7e5;
}

.metric span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 8px;
  color: var(--brand-dark);
  font-size: 2rem;
}

.form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-grid {
  margin-top: 12px;
}

.report-work-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.report-work-section h3 { margin: 0; color: var(--brand-dark); }

.report-work-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.report-work-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#reportWorkRows { display: grid; gap: 10px; }

.report-work-entry {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) 112px 112px minmax(190px, 1.4fr) 64px minmax(105px, 0.7fr) 42px;
  align-items: end;
  gap: 10px;
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px;
}

.report-work-entry:not(.same-work-detail) { cursor: grab; }
.report-work-entry.dragging { opacity: 0.48; }
.same-work-detail { background: #f7faf8; }
.same-work-detail > label:first-child { grid-column: 2; }

.report-work-entry [data-report-work-field="workerCount"] {
  min-width: 0;
  max-width: 64px;
  padding-right: 4px;
  padding-left: 7px;
}

.compact-date-editor {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  width: 100%;
  min-height: 42px;
}

.compact-date-editor > input[data-report-date-text] {
  min-height: 42px;
  border-radius: 6px 0 0 6px;
  padding-right: 5px;
  padding-left: 6px;
  text-align: center;
  font-weight: 800;
}

.compact-date-editor > button {
  width: 34px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 6px 6px 0;
  background: #eef5f1;
  padding: 0;
  font-size: 0.92rem;
}

.compact-date-editor > input[type="date"] {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 2;
  width: 34px;
  height: 42px;
  cursor: pointer;
  opacity: 0;
}

.report-work-actions { display: grid; gap: 4px; }
.report-work-actions button { min-height: 30px; padding: 5px 7px; font-size: 0.72rem; white-space: nowrap; }

.work-content-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.work-content-editor > input {
  border-radius: 6px 0 0 6px;
}

.same-work-detail .work-content-editor {
  grid-template-columns: 1fr;
}

.same-work-detail .work-content-editor > input {
  border-radius: 6px;
}

.same-work-add {
  width: 36px;
  min-height: 42px;
  border-left: 0;
  border-radius: 0 6px 6px 0;
  padding: 0;
  font-size: 1.2rem;
  line-height: 1;
}

.report-work-delete {
  width: 36px;
  min-height: 36px !important;
  align-self: end;
  justify-self: center;
  border-radius: 50%;
  padding: 0 !important;
  font-size: 1.15rem !important;
  line-height: 1;
}

.wide {
  grid-column: span 2;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  outline: none;
}

label.file-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

input[type="file"] {
  padding: 8px;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

input[readonly] {
  background: #f7f9f6;
  color: #53615b;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(36, 92, 74, 0.14);
}

.project-progress {
  width: min(260px, 100%);
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.project-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.search-row {
  align-items: center;
}

.search-results,
.list {
  display: grid;
  gap: 10px;
}

.search-results {
  margin-top: 10px;
}

.search-option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.card {
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 14px;
}

.card-main {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.card-title {
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 900;
}

.field-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

#projectFormHome { display: contents; }

.date-range-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.project-resource-sections {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.project-resource-section {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
  padding: 12px;
}

.project-resource-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-resource-heading h3 { margin: 0; color: var(--brand-dark); }
.project-resource-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-resource-source-block {
  display: grid;
  gap: 6px;
}

.project-resource-source-block + .project-resource-source-block {
  border-top: 1px dashed #d6ded9;
  padding-top: 8px;
}

.project-resource-source-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--brand-dark);
  font-size: .76rem;
}

.project-resource-source-heading small {
  color: var(--muted);
  font-weight: 500;
  text-align: right;
}

.project-resource-source-auto .project-resource-display {
  background: #f4f0e5;
  border-color: #d8c79f;
}

.project-resource-source-auto .project-resource-display-row b { color: #8c651e; }

.cloud-sync-history-status {
  border-left: 3px solid var(--gold);
  background: #fbf7ec;
  padding: 8px 10px;
}

.project-resource-edit-button {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
}

.project-resource-display {
  display: grid;
  gap: 6px;
  min-height: 42px;
  border: 1px solid #dbe5df;
  border-radius: 7px;
  background: #fff;
  padding: 9px 10px;
}

.project-resource-display[hidden],
.project-resource-rows[hidden] { display: none; }

.project-resource-display-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 5px;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.project-resource-display-row b { color: var(--brand); }
.project-resource-empty { align-self: center; color: var(--muted); font-size: 0.78rem; }
.project-resource-rows { display: grid; gap: 7px; }

.project-resource-row {
  display: grid;
  align-items: center;
  gap: 6px;
}

.contractor-row { grid-template-columns: repeat(4, minmax(0, 1fr)) 34px; }
.material-row { grid-template-columns: minmax(100px, .75fr) minmax(0, 1.25fr) minmax(0, 1fr) 34px; }

.project-resource-field {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.project-resource-field > span {
  color: var(--muted);
  font-size: .67rem;
  font-weight: 800;
}

.project-resource-row input,
.project-resource-row select {
  min-width: 0;
  padding-right: 6px;
  padding-left: 6px;
}

.compact-symbol-button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
}

.project-attachment-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.project-attachment-section h3 { margin: 0; color: var(--brand-dark); }
.project-attachment-section p { margin: 3px 0 0; color: var(--muted); font-size: 0.75rem; }
.project-attachment-upload-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.project-attachment-upload-actions button { margin: 0; }
.project-attachment-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  overflow-wrap: anywhere;
}
.project-attachment-summary em { color: var(--muted); font-size: 0.72rem; font-style: normal; font-weight: 800; }

.site-info-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-top: 6px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.site-info-section h3,
.site-info-section p {
  margin: 0;
}

.site-info-section h3 {
  color: var(--brand-dark);
}

.site-info-section p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.site-info-section textarea {
  min-height: 220px;
  line-height: 1.65;
}

.site-info-section button {
  justify-self: start;
}

.project-save-feedback {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  border: 1px solid #b9d9c8;
  border-radius: 12px;
  background: #f1f8f4;
  color: var(--brand-dark);
}

.project-save-feedback[hidden] {
  display: none;
}

.project-save-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dff1e7;
}

.project-save-progress span {
  display: block;
  width: var(--project-save-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 0.28s ease;
}

.project-save-feedback.saving .project-save-progress span {
  background-image: linear-gradient(110deg, transparent 0 35%, rgba(255,255,255,.55) 48%, transparent 62% 100%);
  background-size: 220% 100%;
  animation: project-save-loading 1.15s linear infinite;
}

.project-save-feedback.success .project-save-progress span {
  width: 100%;
  background: #2f9e59;
  animation: none;
}

.project-save-feedback.error {
  border-color: #efc4c1;
  background: #fff4f3;
  color: #a12d2d;
}

.project-save-feedback.error .project-save-progress span {
  width: 100%;
  background: #d9534f;
  animation: none;
}

.project-save-feedback.not-committed,
.project-save-feedback.conflict {
  border-color: #efc4c1;
  background: #fff4f3;
  color: #a12d2d;
}

.project-save-feedback.not-committed .project-save-progress span,
.project-save-feedback.conflict .project-save-progress span {
  background: #d9534f;
  animation: none;
}

.project-save-feedback.uncertain {
  border-color: #e4c37a;
  background: #fff9e9;
  color: #75520c;
}

.project-save-feedback.uncertain .project-save-progress span {
  width: 100%;
  background-color: #c18a24;
  background-image: linear-gradient(110deg, transparent 0 35%, rgba(255,255,255,.55) 48%, transparent 62% 100%);
  background-size: 220% 100%;
  animation: project-save-loading 1.15s linear infinite;
}

.project-save-message-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#projectSavePercent {
  flex: none;
  min-width: 42px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

#projectSaveHint {
  color: var(--muted);
  line-height: 1.5;
}

.project-save-resolution-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-save-resolution-actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

#projectSaveRecheckButton,
#projectSaveRetryButton {
  flex: none;
  min-height: 36px;
  padding: 7px 12px;
}

.project-save-feedback.uncertain #projectSaveHint {
  color: #75520c;
}

.project-save-feedback.success #projectSaveHint {
  color: #287348;
}

.project-save-feedback.not-committed #projectSaveHint,
.project-save-feedback.conflict #projectSaveHint {
  color: #8f2929;
}

#projectModal.is-saving .modal-close {
  cursor: not-allowed;
  opacity: .5;
}

@keyframes project-save-loading {
  from { background-position: 180% 0; }
  to { background-position: -40% 0; }
}

.project-card-toggle {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(180px, 260px) 30px;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 46px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  text-align: left;
}

.project-card-toggle .card-title {
  margin: 0;
}

.collapsed-header-meta {
  display: none;
  grid-template-columns: max-content max-content minmax(150px, auto);
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
}

.collapsed-header-meta > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.collapsed-header-meta small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.project-card.collapsed .project-card-toggle {
  grid-template-columns: minmax(120px, 0.8fr) minmax(330px, 1.5fr) minmax(160px, 240px) 30px;
}

.project-card.collapsed .collapsed-header-meta {
  display: grid;
}

.collapse-mark {
  justify-self: center;
  width: 0;
  height: 0;
  border-right: 10px solid transparent;
  border-bottom: 15px solid var(--brand-dark);
  border-left: 10px solid transparent;
  transition: transform 160ms ease;
}

.project-card.collapsed .collapse-mark {
  transform: rotate(180deg);
}

.header-progress {
  position: relative;
  display: grid;
  align-items: center;
  min-width: 0;
}

.header-progress .project-progress {
  width: 100%;
  height: 25px;
  background: #dff1e7;
  border: 1px solid #b9ddc9;
}

.header-progress .project-progress span {
  background: #8fc9aa;
}

.header-progress strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #16251f;
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9);
}

.project-card.collapsed .project-card-details,
.project-card.collapsed .card-actions {
  display: none;
}

.project-subtitle {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
}

.schedule-view {
  margin: 10px 0 12px;
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.schedule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--brand-dark);
  font-size: 0.9rem;
}

.schedule-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.work-strip {
  display: flex;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf8;
  padding: 6px;
}

.work-strip.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  overflow: hidden;
}

.work-day {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  min-height: 82px;
  border-radius: 6px;
  background: var(--surface-2);
  padding: 7px 5px;
  text-align: center;
}

.work-day.empty-day {
  background: #ecefed;
  color: var(--muted);
}

.work-day-date {
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.work-day-items {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.work-day-items span {
  overflow: hidden;
  border-radius: 4px;
  background: var(--brand);
  color: #fff;
  padding: 5px 3px;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.work-day-empty {
  align-self: center;
  font-size: 0.72rem;
  font-weight: 800;
}

.work-cell {
  flex: var(--cell-span) 0 max(96px, calc(var(--cell-span) * 72px));
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  border-radius: 6px;
  background: var(--cell-bg);
  color: var(--cell-text);
  padding: 5px 10px;
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-range {
  opacity: 0.82;
  font-size: 0.76rem;
  font-weight: 800;
}

.work-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-report-history {
  margin: 10px 0 12px;
  display: grid;
  gap: 7px;
}

.project-report-history > strong {
  color: var(--brand-dark);
  font-size: 0.86rem;
}

.project-report-history.muted {
  color: var(--muted);
  font-weight: 800;
}

.project-records {
  display: grid;
  gap: 9px;
  margin: 10px 0 12px;
}

.record-section {
  display: grid;
  gap: 6px;
}

.record-section > strong {
  color: var(--brand-dark);
  font-size: 0.86rem;
}

.record-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.record-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #eef2f5;
  color: #243845;
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

.record-empty {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.project-report-list {
  display: grid;
  gap: 7px;
}

.project-report-list .report-chip { justify-self: start; }

.report-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--brand-dark);
  padding: 0 11px;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.report-chip.disabled {
  display: inline-flex;
  align-items: center;
  background: #f0f1ef;
  color: var(--muted);
}

.work-empty {
  flex: 1 0 180px;
  min-height: 46px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--brand-dark);
  padding: 0 10px;
  font-weight: 800;
}

.pill.warn {
  background: var(--warning-bg);
  color: #7a5614;
}

.card-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
}

.empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.upload-summary {
  display: flex;
  align-items: center;
  min-height: 42px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  padding: 18px;
}

.modal.open {
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 32, 28, 0.48);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
  max-height: min(88vh, 920px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 22px 60px rgba(22, 32, 28, 0.22);
  padding: 18px;
}

.modal-panel.large {
  width: min(1080px, 100%);
}

.embedded-workspace-host {
  min-width: 0;
}

.embedded-workspace-host[hidden] {
  display: none !important;
}

.modal.workspace-embedded {
  position: static;
  inset: auto;
  z-index: auto;
  width: 100%;
  min-height: 0;
  padding: 0;
}

.modal.workspace-embedded.open {
  display: block;
}

.modal.workspace-embedded > .modal-backdrop {
  display: none;
}

.modal.workspace-embedded > .modal-panel {
  z-index: auto;
  width: 100%;
  max-height: none;
  min-height: calc(100dvh - 126px);
  overflow: visible;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(29, 39, 36, 0.07);
}

.modal.workspace-embedded .modal-heading {
  scroll-margin-top: 16px;
}

.modal.workspace-embedded .modal-close {
  min-width: 126px;
}

.modal-panel.pdf-panel {
  width: min(1080px, 100%);
}

.modal.confirm-modal {
  z-index: 30;
}

.modal.order-image-modal {
  z-index: 35;
}

.modal.auth-modal {
  z-index: 40;
  background: #ffffff;
}

.modal-panel.auth-panel {
  width: min(560px, 100%);
  max-height: min(92vh, 900px);
  box-shadow: none;
  padding: 24px;
}

.auth-backdrop {
  display: none;
}

.auth-heading,
.auth-heading-copy,
.auth-account-card,
.auth-actions {
  display: flex;
  align-items: center;
}

.auth-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.auth-heading-copy {
  gap: 12px;
}

.auth-heading h2,
.auth-heading p {
  margin-bottom: 0;
}

.auth-google-mark {
  display: grid;
  flex: 0 0 48px;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #06c755;
  border-radius: 50%;
  background: #06c755;
  color: #fff;
  box-shadow: 0 6px 16px rgba(29, 39, 36, 0.1);
  font-size: 0.72rem;
  font-weight: 900;
}

.auth-account-card {
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
  padding: 13px 14px;
}

.auth-account-card > div {
  min-width: 0;
}

.auth-account-card span,
.auth-account-card strong {
  display: block;
}

.auth-account-card > div > span {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.auth-account-card strong {
  overflow-wrap: anywhere;
  font-size: 0.94rem;
}

.auth-account-switch-note {
  margin: -6px 0 12px;
  border-left: 3px solid #06c755;
  color: var(--muted);
  padding-left: 10px;
  font-size: 0.78rem;
  line-height: 1.65;
}

.auth-account-switch-note[hidden] {
  display: none;
}

.auth-status-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #e9f5ee;
  color: #1f654a;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 900;
}

.auth-status-badge.checking {
  background: #edf1f8;
  color: #486077;
}

.auth-status-badge.warning {
  background: #fff1d9;
  color: #8b5c11;
}

.auth-status-badge.error {
  background: #fff0ed;
  color: #a33a31;
}

.auth-permission-notice {
  border: 1px solid #cfddd6;
  border-radius: 8px;
  background: #f3f8f5;
  padding: 15px;
}

.auth-permission-notice h3 {
  margin: 0 0 10px;
  font-size: 0.92rem;
}

.auth-permission-notice ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 20px;
}

.auth-permission-notice li {
  padding-left: 2px;
}

.auth-permission-notice li strong,
.auth-permission-notice li span {
  display: block;
}

.auth-permission-notice li strong {
  color: var(--brand-dark);
  font-size: 0.82rem;
}

.auth-permission-notice li span {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.auth-privacy-note {
  margin: 12px 0;
  border-left: 3px solid #8aa99a;
  padding-left: 10px;
  font-size: 0.78rem;
  line-height: 1.65;
}

.auth-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border-radius: 7px;
  background: #f7f8f7;
  padding: 11px 12px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.5;
}

.auth-consent-row input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
}

.auth-diagnostic {
  margin-top: 12px;
  border: 1px solid #e9c98a;
  border-radius: 7px;
  background: #fff7e6;
  color: #6f4d16;
  padding: 10px 12px;
  font-size: 0.8rem;
  line-height: 1.65;
}

.auth-diagnostic.error {
  border-color: #e7bbb4;
  background: #fff1ee;
  color: #8d3028;
}

.phase5-drain-health-result {
  max-height: min(42vh, 360px);
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.auth-mobile-help {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  border: 1px solid #b9cbe9;
  border-radius: 7px;
  background: #eef4ff;
  color: #29496f;
  padding: 11px 12px;
}

.auth-mobile-help[hidden] { display: none; }
.auth-mobile-help strong { font-size: 0.84rem; }
.auth-mobile-help p { margin: 0; font-size: 0.78rem; line-height: 1.6; }
.auth-mobile-help button { justify-self: start; min-height: 36px; }
.auth-mobile-help input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #8da7cc;
  border-radius: 6px;
  background: #fff;
  color: #18324f;
  padding: 8px 10px;
  font-size: 0.75rem;
}
.auth-mobile-help input[hidden] { display: none; }

.auth-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 16px;
}

.auth-modal[data-auth-view="ready"] .auth-heading h2 {
  font-size: 1.25rem;
}

.auth-modal[data-auth-view="ready"] .auth-heading-copy {
  min-width: 0;
}

.auth-modal[data-auth-view="ready"] .auth-heading-copy > div {
  min-width: 0;
}

.auth-modal[data-auth-view="ready"] .auth-heading-copy p,
.auth-modal[data-auth-view="ready"] .auth-heading-copy h2 {
  white-space: nowrap;
}

.auth-modal[data-auth-view="ready"] .auth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-modal[data-auth-view="ready"] .auth-actions > button {
  min-height: 48px;
}

.auth-modal[data-auth-view="ready"] #authSwitchAccountLink {
  border: 1px solid #cbd5d1;
  background: #fff;
  color: var(--ink);
}

.auth-modal[data-auth-view="ready"] #authRevokeSessionButton {
  border: 1px solid #f1cac5;
  background: #fbefec;
  color: #9e3523;
}

.auth-admin-tools {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.auth-admin-tools[hidden] {
  display: none;
}

.auth-admin-tools summary {
  width: fit-content;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.auth-admin-tools-content {
  display: grid;
  gap: 9px;
  padding-top: 12px;
}

.auth-admin-tools-content > button {
  min-height: 44px;
  width: 100%;
  border: 1px solid #cbd5d1;
  background: #fff;
  color: var(--ink);
}

.auth-admin-tools-content > .auth-diagnostic {
  margin-top: 0;
}

.auth-provider-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.auth-provider-actions[data-login-mode="google-only"] {
  grid-template-columns: minmax(0, 1fr);
}

.auth-provider-actions[hidden] {
  display: none;
}

.auth-provider-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 14px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.auth-provider-button[hidden] {
  display: none;
}

.auth-provider-button span {
  display: grid;
  place-items: center;
  min-width: 27px;
  height: 27px;
  border-radius: 50%;
  font-size: 0.72rem;
}

.auth-provider-button.google {
  border-color: #cfd6df;
  box-shadow: 0 2px 8px rgba(32, 54, 76, 0.06);
}

.auth-provider-button.google span {
  background: #fff;
  color: #1a73e8;
  box-shadow: inset 0 0 0 1px #dadce0;
  font-size: 0.95rem;
}

.auth-google-custom-tab {
  grid-column: 1 / -1;
  border-color: #1a73e8;
  background: #1a73e8;
  color: #fff;
  text-decoration: none;
}

.auth-google-custom-tab[hidden] {
  display: none;
}

.auth-google-custom-tab span {
  background: #fff;
  color: #1a73e8;
}

.auth-google-custom-tab[aria-disabled="true"] {
  opacity: 0.62;
  cursor: wait;
  pointer-events: none;
}

.auth-provider-button.line {
  border-color: #06c755;
  background: #06c755;
  color: #fff;
}

.auth-provider-button.line span {
  min-width: 38px;
  border-radius: 7px;
  background: #fff;
  color: #06a947;
}

.auth-provider-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(28, 45, 38, 0.12);
}

.auth-provider-button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 6px;
  padding: 0 14px;
  text-decoration: none;
  font-weight: 800;
}

.auth-link-button[hidden] {
  display: none;
}

.modal.line-binding-modal {
  z-index: 35;
}

.modal-panel.line-binding-panel {
  width: min(580px, 100%);
  padding: 24px;
}

.line-binding-description,
.line-binding-note {
  line-height: 1.7;
}

.line-binding-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
  padding: 13px 14px;
}

.line-binding-account > div {
  min-width: 0;
}

.line-binding-account span,
.line-binding-account strong {
  display: block;
}

.line-binding-account > div > span {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.line-binding-account strong {
  overflow-wrap: anywhere;
  font-size: 0.94rem;
}

.line-binding-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #edf1f8;
  color: #486077;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 900;
}

.line-binding-badge.bound {
  background: #e7f8ed;
  color: #17643a;
}

.line-binding-badge.error {
  background: #fff0ed;
  color: #a33a31;
}

.line-binding-status {
  min-height: 45px;
  border: 1px solid #cfe2d7;
  border-radius: 8px;
  background: #f2f9f5;
  color: #315f4c;
  padding: 11px 13px;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.55;
}

.line-binding-status.error {
  border-color: #e7bbb4;
  background: #fff1ee;
  color: #8d3028;
}

.line-binding-progress {
  position: relative;
  height: 7px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4ece8;
}

.line-binding-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: #06c755;
  animation: cloud-loading 1.1s ease-in-out infinite;
}

.line-binding-note {
  margin: 12px 0 0;
  border-left: 3px solid #06c755;
  padding-left: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.line-binding-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 18px;
}

.line-login-action {
  min-height: 42px;
  border: 1px solid #05a947;
  border-radius: 7px;
  background: #06c755;
  color: #fff;
  padding: 0 17px;
  font-weight: 900;
}

.line-login-action:hover:not(:disabled) {
  background: #05b64d;
}

.modal-panel.confirm-panel {
  width: min(440px, 100%);
  overflow: visible;
  padding: 24px;
  text-align: center;
}

.confirm-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #fff0ed;
  color: #b9382f;
  font-size: 1.75rem;
  font-weight: 900;
}

.confirm-icon.success {
  background: #e0f4e8;
  color: #187343;
}

.confirm-content h2 {
  margin: 0;
}

.confirm-content p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.confirm-actions button {
  min-width: 118px;
}

#pdfPreviewFrame {
  width: 100%;
  height: min(72vh, 760px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9f6;
}

.pdf-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.pdf-open-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 6px;
  padding: 0 14px;
  text-decoration: none;
  font-weight: 800;
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.report-preview-section {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.report-history-section {
  grid-column: 1 / -1;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.report-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px 10px;
}

.report-history-row .card-title { margin: 0; }

.report-history-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.report-history-actions button,
.report-history-actions .pill {
  min-height: 32px;
  white-space: nowrap;
}

.report-history-actions button { padding: 0 10px; }

.report-photo-upload-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.report-photo-upload-section h3 { margin: 0; color: var(--brand-dark); }

.report-photo-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#reportImageRows { display: grid; gap: 10px; }

.report-photo-upload-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.4fr) minmax(170px, 0.8fr) 42px;
  align-items: end;
  gap: 10px;
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px;
}

.compact-file-field input[type="file"] {
  min-height: 42px;
  max-width: 210px;
  overflow: hidden;
  white-space: nowrap;
}

.report-image-delete {
  width: 36px;
  min-height: 36px;
  border-radius: 50%;
  padding: 0;
  font-size: 1.15rem;
}

.report-generate-actions {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.report-generate-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-download-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  text-decoration: none;
  font-weight: 800;
}

.report-download-button[hidden] { display: none; }

.report-generate-progress {
  position: relative;
  min-height: 34px;
  overflow: hidden;
  border-radius: 6px;
  background: #dff1e7;
}

.report-generate-progress[hidden] { display: none; }
.report-generate-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 38%;
  background: var(--brand);
}
.report-generate-progress strong {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 34px;
  place-items: center;
  color: #173d32;
  font-size: 0.86rem;
}
.report-generate-progress.saving span { animation: report-generate-loading 1s ease-in-out infinite; }
.report-generate-progress.success span { width: 100%; background: #57b77b; }
.report-generate-progress.error { background: #f7e0dc; }
.report-generate-progress.error span { width: 100%; background: #d9534f; }
@keyframes report-generate-loading {
  from { transform: translateX(-110%); }
  to { transform: translateX(275%); }
}

#reportPreview {
  display: grid;
  gap: 18px;
  overflow-x: auto;
  border-radius: 8px;
  background: #e8ebe9;
  padding: 18px;
}

.weekly-report-preview {
  position: relative;
  width: min(794px, 100%);
  min-width: 680px;
  min-height: 1060px;
  margin: 0 auto;
  border: 2px solid #222;
  background: #fff;
  color: #222;
  font-family: "Microsoft JhengHei", sans-serif;
  font-size: 12px;
  padding: 28px 44px 52px;
  box-shadow: 0 8px 24px rgba(24, 34, 30, 0.14);
}

.weekly-report-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border-bottom: 2px solid #222;
  padding-bottom: 16px;
  text-align: center;
}

.weekly-report-header > div {
  display: grid;
  gap: 7px;
}

.weekly-report-header strong { font-size: 12px; }

.report-logo {
  width: 42px;
  height: 42px;
  border: 3px solid #4a514e;
  background: linear-gradient(135deg, transparent 49%, #4a514e 50%);
}

.report-info-grid {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 118px minmax(0, 1fr);
  margin: 14px 0 0;
  border-top: 2px solid #222;
}

.report-info-grid dt,
.report-info-grid dd {
  min-width: 0;
  margin: 0;
  border-bottom: 1px dotted #555;
  padding: 7px 8px;
  overflow-wrap: anywhere;
}

.report-info-grid dt {
  background: #d8d8d8;
  text-align: center;
}

.report-work-table {
  width: 100%;
  margin-top: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.report-work-table th,
.report-work-table td {
  border-right: 1px solid #222;
  border-bottom: 1px solid #222;
  padding: 2px 5px;
  vertical-align: top;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.report-work-table th {
  background: #d8d8d8;
  text-align: center;
}

.report-work-table th:nth-child(1) { width: 20%; }
.report-work-table th:nth-child(2) { width: 54%; }
.report-work-table th:nth-child(3) { width: 13%; }
.report-work-table th:nth-child(4) { width: 13%; border-right: 0; }
.report-work-table td:last-child { border-right: 0; }
.report-work-table td:first-child {
  padding-left: 7px;
  text-align: left;
  text-indent: 0;
}
.report-work-table td span { color: var(--muted); font-size: 12px; }

.report-cell-line {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: baseline;
  gap: 6px;
  border-bottom: 1px dotted #aaa;
  padding: 0;
  line-height: 1.1;
}

.report-cell-line:last-child { border-bottom: 0; }

.report-cell-line b {
  font-weight: 400;
  overflow-wrap: anywhere;
}

.report-photo-preview {
  display: grid;
  gap: 18px;
  margin-top: 28px;
  border-top: 2px solid #222;
  padding-top: 12px;
}

.report-photo-page .report-photo-preview {
  margin-top: 12px;
  border-top: 0;
  padding-top: 0;
}

.report-photo-preview figure { margin: 0; }
.report-photo-preview figcaption { margin-bottom: 8px; font-weight: 800; }
.report-photo-preview img { display: block; width: 100%; max-height: 390px; object-fit: contain; background: #f2f2f2; }
.report-photo-empty { margin: 28px 0; color: var(--muted); text-align: center; }
.weekly-report-preview footer {
  position: absolute;
  right: 30px;
  bottom: 14px;
  left: 30px;
  color: #969696;
  font-size: 12px;
  text-align: center;
}

.project-issue-list {
  display: grid;
  gap: 8px;
}

.project-issue-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
  padding: 7px 10px;
}

.project-issue-line {
  min-width: 0;
  line-height: 1.35;
}

.project-issue-line strong {
  color: var(--muted);
  font-size: 0.76rem;
}

.project-issue-line span {
  color: var(--text);
  font-size: 0.82rem;
}

.project-issue-primary {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr) max-content;
  gap: 12px;
  overflow: hidden;
}

.project-issue-primary > span,
.project-issue-secondary > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-issue-secondary {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
}

.issue-entry-section,
.issue-existing-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.issue-entry-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.issue-entry-heading h3,
.issue-entry-heading p,
.issue-existing-section h3 { margin: 0; }

.issue-entry-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.issue-entry-rows,
#issueExistingRecords {
  display: grid;
  gap: 9px;
}

.issue-entry-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(180px, 1.5fr) minmax(140px, 1fr) auto;
  align-items: end;
  gap: 8px;
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px;
}

.issue-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.issue-row-add,
.issue-row-delete {
  min-height: 42px;
  white-space: nowrap;
}

.issue-existing-section { margin-top: 18px; }

.issue-existing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.issue-existing-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.issue-existing-row span {
  color: var(--muted);
  font-size: 0.84rem;
}

.modal-close {
  flex: 0 0 auto;
}

.modal-subsection {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.project-operation-summary {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

.project-operation-summary > strong {
  color: var(--brand-dark);
  font-size: 0.86rem;
}

.project-operation-summary > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-operation-summary button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border-radius: 999px;
  background: #f0f4f1;
  color: var(--muted);
  padding: 0 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

.project-operation-summary button:hover,
.project-operation-summary button:focus-visible {
  background: #dfece5;
  color: var(--brand-dark);
  outline: 2px solid rgba(53, 110, 78, 0.2);
}

.project-operation-summary b {
  color: var(--brand-dark);
  font-size: 0.9rem;
}

.project-reference-strip {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  margin-top: 9px;
  border-top: 1px dashed var(--line);
  padding-top: 9px;
}
.project-reference-strip > strong { color: var(--brand-dark); font-size: .78rem; line-height: 30px; }
.project-reference-strip > strong em { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 999px; background: #e4eee8; font-size: .65rem; font-style: normal; }
.project-reference-strip > div { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.project-reference-strip button {
  display: inline-flex;
  width: auto;
  min-width: 0;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  border: 1px solid #d4ded8;
  border-radius: 999px;
  background: #f6f8f6;
  color: var(--text);
  padding: 4px 10px;
  text-align: left;
}
.project-reference-strip button:hover,
.project-reference-strip button:focus-visible { border-color: var(--brand); background: #eaf2ed; color: var(--brand-dark); }
.project-reference-strip button small { color: var(--muted); font-size: .62rem; font-weight: 900; }
.project-reference-strip button b { max-width: 230px; overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.project-contractor-unfiled {
  display: inline-flex;
  width: auto;
  min-width: 0;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  border: 1px dashed #c9c5bc;
  border-radius: 999px;
  background: #f5f3ef;
  color: var(--muted);
  padding: 4px 10px;
}
.project-contractor-unfiled small { color: var(--muted); font-size: .62rem; font-weight: 900; }
.project-contractor-unfiled b { max-width: 180px; overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.project-contractor-unfiled em {
  border-radius: 999px;
  background: #e8e4dc;
  color: #6f675b;
  padding: 2px 6px;
  font-size: .58rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}
.project-knowledge-links.is-loading,
.project-knowledge-links.is-empty { color: var(--muted); font-size: .72rem; }
.project-knowledge-links.is-loading > button { justify-self: start; }
.project-reference-strip .project-reference-more { border-style: dashed; color: var(--brand-dark); font-size: .7rem; font-weight: 900; }

.modal-panel.operation-center-panel {
  width: min(1220px, 100%);
  max-height: min(94vh, 980px);
  padding: 0;
}

.operation-center-heading {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  padding: 18px;
}

.operation-center-heading h2,
.operation-center-heading p { margin-bottom: 0; }

.operation-dashboard {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: #f8faf8;
  padding: 12px 18px;
}

.operation-special-card.operation-project-entry {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(320px, 1.3fr) auto;
  align-items: end;
}

.operation-project-entry > div:first-child p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.operation-project-entry .operation-project-combobox {
  margin: 0;
}

.operation-stat {
  display: grid;
  min-width: 120px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 12px;
}

.operation-stat strong { color: var(--brand-dark); font-size: 1.15rem; }
.operation-stat span { color: var(--muted); font-size: 0.75rem; font-weight: 800; }

.vendor-directory-mode .operation-dashboard,
.vendor-price-mode .operation-dashboard,
.estimate-catalog-mode .operation-dashboard,
.knowledge-center-mode .operation-dashboard {
  display: block;
}

.knowledge-center-mode .operation-dashboard { padding: 15px 18px; }
.knowledge-source-status {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #c9d9cf;
  border-left: 5px solid var(--brand);
  border-radius: 9px;
  background: #fff;
  padding: 12px 14px;
}
.knowledge-source-status.unpublished { border-color: #d8c7a8; border-left-color: #9a6d2d; background: #fffaf1; }
.knowledge-source-status-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e8f0eb;
  color: var(--brand-dark);
}
.knowledge-source-status.unpublished .knowledge-source-status-icon { background: #f4e9d5; color: #795323; }
.knowledge-source-status-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.knowledge-source-status > span:last-child { display: grid; min-width: 0; gap: 2px; }
.knowledge-source-status small,
.knowledge-source-status em { color: var(--muted); font-size: .7rem; font-style: normal; font-weight: 800; }
.knowledge-source-status strong { color: var(--brand-dark); font-size: .95rem; overflow-wrap: anywhere; }
.knowledge-scope-summary { display: grid; grid-template-columns: repeat(3, minmax(90px, 1fr)); gap: 8px; margin-top: 10px; }
.knowledge-scope-summary > span { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 9px 11px; }
.knowledge-scope-summary b { color: var(--brand-dark); font-size: 1.05rem; }
.knowledge-scope-summary small { color: var(--muted); font-size: .68rem; font-weight: 900; }
.knowledge-category-section { display: grid; gap: 8px; margin-top: 12px; }
.knowledge-category-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.knowledge-category-heading strong { color: var(--brand-dark); }
.knowledge-category-heading span { color: var(--muted); font-size: .7rem; font-weight: 800; }
.knowledge-category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 7px; }
.knowledge-category-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  text-align: left;
}
.knowledge-category-card:hover,
.knowledge-category-card:focus-visible { border-color: var(--brand); background: #f3f7f4; transform: translateY(-1px); }
.knowledge-category-card.active { border-color: var(--brand-dark); background: var(--brand-dark); color: #fff; }
.knowledge-category-card > span:last-child { display: grid; min-width: 0; gap: 2px; }
.knowledge-category-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
.knowledge-category-card small { color: inherit; opacity: .72; font-size: .64rem; font-weight: 800; }
.knowledge-category-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #edf2ef; color: var(--brand-dark); }
.knowledge-category-card.active .knowledge-category-icon { background: rgba(255, 255, 255, .15); color: #fff; }
.knowledge-category-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.knowledge-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 10px;
}
.knowledge-page-toolbar { margin-bottom: 0; border-bottom: 1px solid var(--line); background: #f7f9f7; padding: 12px 18px; }
.knowledge-page-toolbar[hidden] { display: none; }
.knowledge-global-search { display: grid; gap: 5px; color: var(--brand-dark); font-size: .72rem; font-weight: 900; }
.knowledge-search-control {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 34px;
  align-items: center;
  min-height: 44px;
  border: 1px solid #cbd8d0;
  border-radius: 999px;
  background: #fff;
  padding: 0 7px 0 13px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.knowledge-search-control:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(36, 92, 74, .12); }
.knowledge-search-control svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.7; }
.knowledge-search-control input { min-height: 40px; border: 0; background: transparent; padding: 7px 8px; box-shadow: none; }
.knowledge-search-control button { width: 30px; min-height: 30px; border-radius: 50%; background: #f0f2ef; color: var(--muted); padding: 0; font-size: 1rem; }
.knowledge-add-button { width: auto; min-height: 44px; white-space: nowrap; }

.knowledge-center-mode .operation-workspace { display: block; }
.knowledge-center-mode .operation-record-section { width: 100%; padding: 16px 18px 22px; }
.knowledge-center-mode .operation-list-controls #operationSearchInput[hidden] { display: none; }
.knowledge-center-mode .operation-records {
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  align-items: start;
  gap: 13px;
}
.knowledge-center-mode .operation-records > .empty { grid-column: 1 / -1; }

.knowledge-editor-backdrop {
  position: fixed;
  z-index: 1240;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: rgba(10, 18, 14, .56);
  padding: 0;
  cursor: default;
}
.knowledge-editor-backdrop[hidden],
.knowledge-center-mode .operation-editor[hidden] { display: none; }
.knowledge-center-mode.knowledge-editor-open .operation-editor {
  position: fixed;
  z-index: 1250;
  inset: 50% auto auto 50%;
  display: block;
  width: min(720px, calc(100vw - 32px));
  max-height: min(88dvh, 780px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid #c8d6ce;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(10, 24, 16, .34);
  padding: 20px;
}
.knowledge-editor-modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px 0 15px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.knowledge-editor-modal-heading[hidden] { display: none; }
.knowledge-editor-modal-heading > div { display: grid; gap: 2px; }
.knowledge-editor-modal-heading small { color: var(--muted); font-size: .68rem; font-weight: 900; }
.knowledge-editor-modal-heading h3 { margin: 0; color: var(--brand-dark); font-size: 1.08rem; }
.knowledge-editor-close { width: 40px; min-height: 40px; border-radius: 50%; background: #f0f1ee; color: var(--brand-dark); padding: 0; font-size: 1.45rem; line-height: 1; }

.vendor-directory-toolbar,
.vendor-trade-mapping-heading,
.vendor-trade-mapping-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vendor-directory-toolbar > div,
.vendor-trade-mapping-heading > div {
  display: grid;
  gap: 3px;
}

.vendor-directory-toolbar span,
.vendor-trade-mapping-heading p {
  margin: 0;
  color: var(--muted);
  font-size: .76rem;
}

.vendor-directory-toolbar > .vendor-directory-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.vendor-trade-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.vendor-trade-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 78px;
  border: 1px solid #d8e3dd;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 11px;
  text-align: left;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.vendor-trade-card:hover,
.vendor-trade-card:focus-visible {
  transform: translateY(-2px);
  border-color: #8fb29f;
  box-shadow: 0 8px 20px rgba(34, 76, 56, .12);
}

.vendor-trade-card.active {
  border-color: var(--brand);
  background: #eef7f1;
  box-shadow: inset 0 0 0 1px var(--brand);
}

.vendor-trade-icon,
.vendor-record-icon {
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #e5efe9;
  color: var(--brand-dark);
}

.vendor-trade-icon { width: 46px; height: 46px; }
.vendor-trade-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.vendor-trade-card > span:last-child { display: grid; min-width: 0; gap: 3px; }
.vendor-trade-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .94rem; }
.vendor-trade-card small { color: var(--muted); font-size: .7rem; font-weight: 800; }

.estimate-category-subsection {
  display: grid;
  gap: 0;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.estimate-category-subsection > header {
  display: grid;
  gap: 3px;
}

.estimate-category-subsection > header strong { color: var(--brand-dark); font-size: .9rem; }
.estimate-category-subsection > header span { color: var(--muted); font-size: .74rem; font-weight: 800; }

.estimate-category-prompt {
  margin-top: 14px;
  border: 1px dashed #cbd9d1;
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  padding: 14px;
  text-align: center;
  font-size: .78rem;
  font-weight: 800;
}

.vendor-directory-mode .operation-workspace,
.vendor-price-mode .operation-workspace,
.vendor-quote-mode .operation-workspace,
.estimate-mode .operation-workspace,
.estimate-catalog-mode .operation-workspace { display: block; }
.vendor-directory-mode .operation-record-section,
.vendor-price-mode .operation-record-section,
.vendor-quote-mode .operation-record-section,
.estimate-mode .operation-record-section,
.estimate-catalog-mode .operation-record-section { width: 100%; }
.vendor-directory-mode .operation-records {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
.vendor-directory-mode .operation-records > .empty,
.vendor-directory-mode .operation-records > .operation-empty { grid-column: 1 / -1; }
.estimate-mode .operation-editor { width: 100%; }
.vendor-directory-mode .operation-editor,
.vendor-price-mode .operation-editor,
.vendor-quote-mode .operation-editor,
.estimate-catalog-mode .operation-editor { display: none; }
.vendor-directory-mode.vendor-editor-open .operation-editor,
.vendor-price-mode.vendor-editor-open:not(.vendor-price-analysis-mode) .operation-editor,
.vendor-quote-mode.vendor-editor-open .operation-editor,
.estimate-catalog-mode.vendor-editor-open .operation-editor {
  position: fixed;
  z-index: 1200;
  inset: 50% auto auto 50%;
  display: block;
  width: min(720px, calc(100vw - 30px));
  max-height: min(86vh, 760px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid #c7d8cf;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(12, 31, 22, .34);
  padding: 22px;
}

.vendor-quote-add-button { align-self: center; margin-left: auto; }

.vendor-price-view-tabs {
  display: inline-flex;
  gap: 3px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 3px;
}

.vendor-price-view-tabs button {
  min-height: 36px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 6px 14px;
  font-size: .75rem;
}

.vendor-price-view-tabs button.active,
.vendor-price-view-tabs button:hover,
.vendor-price-view-tabs button:focus-visible {
  background: var(--brand);
  color: #fff;
}

.vendor-price-analysis-subtabs {
  display: inline-flex;
  gap: 3px;
  margin: -4px 0 12px;
  border-bottom: 1px solid var(--line);
  padding: 0 2px 6px;
}

.vendor-price-analysis-subtabs button {
  width: auto;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 6px 12px;
  font-size: .73rem;
}

.vendor-price-analysis-subtabs button.active,
.vendor-price-analysis-subtabs button:hover,
.vendor-price-analysis-subtabs button:focus-visible {
  border-color: #d4b06d;
  background: #fff7e7;
  color: var(--brand-dark);
}

.vendor-price-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vendor-price-toolbar > div { display: grid; gap: 3px; }
.vendor-price-toolbar strong { color: var(--brand-dark); }
.vendor-price-toolbar span { color: var(--muted); font-size: .74rem; line-height: 1.45; }
.vendor-price-toolbar > button { flex: 0 0 auto; width: auto; }

.vendor-price-catalog-filters,
.vendor-price-analysis-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  align-items: end;
  gap: 9px;
  margin-top: 12px;
}

.vendor-price-catalog-filters label,
.vendor-price-analysis-filters label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.vendor-price-catalog-filters label > span,
.vendor-price-analysis-filters label > span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
}

.vendor-price-catalog-summary {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}

.vendor-price-catalog-summary b { color: var(--brand-dark); }

.vendor-company-price-batch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid #aaa49a;
  border-radius: 8px;
  background: #f7f6f3;
  padding: 10px 12px;
}
.vendor-company-price-batch-bar > div:first-child { display: grid; gap: 3px; min-width: 0; }
.vendor-company-price-batch-bar strong { color: var(--brand-dark); font-size: .82rem; }
.vendor-company-price-batch-bar > div:first-child > span { color: var(--muted); font-size: .7rem; line-height: 1.45; }
.vendor-company-price-batch-bar.dirty { border-color: #d4b06d; border-left-color: var(--accent); background: #fff9eb; }
.vendor-company-price-batch-bar.invalid { border-color: #d99b91; border-left-color: #b94b3d; background: #fff3f1; }
.vendor-company-price-batch-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.vendor-company-price-batch-actions[hidden] { display: none; }
.vendor-company-price-batch-actions button { width: auto; white-space: nowrap; }

.vendor-price-analysis-filters .vendor-price-comparable-toggle {
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 7px 10px;
}

.vendor-price-comparable-toggle input { flex: 0 0 auto; width: 18px; min-height: 18px; }
.vendor-price-comparable-toggle span { color: var(--ink) !important; font-size: .72rem !important; }

.vendor-price-vendor-picker {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding: 2px 1px 7px;
  scrollbar-width: thin;
}

.vendor-price-vendor-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 7px 13px;
  font-size: .75rem;
  font-weight: 900;
}

.vendor-price-vendor-chip > span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--brand-dark);
}

.vendor-price-vendor-chip.selected {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.vendor-price-vendor-chip.selected > span { background: var(--accent); color: #111; }

.vendor-price-selection-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
  color: var(--muted);
  font-size: .7rem;
}

.vendor-price-selection-meta strong { color: var(--brand-dark); }

.vendor-project-profit-heading { margin-top: 2px; }

.vendor-project-profit-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(220px, 1.5fr) minmax(170px, 1fr) minmax(140px, .8fr);
  align-items: end;
  gap: 8px;
  margin-top: 12px;
}

.vendor-project-profit-filters label { display: grid; min-width: 0; gap: 4px; }
.vendor-project-profit-filters label > span { color: var(--muted); font-size: .68rem; font-weight: 900; }
.vendor-project-profit-filters select,
.vendor-project-profit-filters input { width: 100%; min-width: 0; }
.vendor-project-profit-project-combobox small {
  min-height: 1.15em;
  color: var(--muted);
  font-size: .64rem;
  font-weight: 700;
  line-height: 1.35;
}
.vendor-project-profit-vendors { margin-top: 9px; }

.vendor-project-profit-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  border-left: 3px solid var(--accent);
  border-radius: 5px;
  background: #f7f6f3;
  color: var(--muted);
  padding: 8px 10px;
  font-size: .7rem;
  font-weight: 800;
  line-height: 1.45;
}
.vendor-project-profit-status.loading { color: #725b2b; background: #fff9eb; }
.vendor-project-profit-status.error { border-left-color: #b94b3d; color: #8f3328; background: #fff3f1; }
.vendor-project-profit-status button { flex: 0 0 auto; width: auto; }

.vendor-project-profit-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.vendor-project-profit-card {
  overflow: hidden;
  border: 1px solid #d8d5ce;
  border-top: 4px solid #d2a552;
  border-radius: 8px;
  background: #fff;
}
.vendor-project-profit-card.complete { border-top-color: #6c8456; }
.vendor-project-profit-card > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px 6px; }
.vendor-project-profit-card > header strong { min-width: 0; overflow: hidden; color: var(--brand-dark); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.vendor-project-profit-card > header span { flex: 0 0 auto; border-radius: 999px; background: #f0eee9; color: var(--muted); padding: 3px 7px; font-size: .6rem; font-weight: 900; }
.vendor-project-profit-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--line); }
.vendor-project-profit-card dl > div { min-width: 0; background: #fff; padding: 8px 10px; }
.vendor-project-profit-card dt { color: var(--muted); font-size: .59rem; font-weight: 900; line-height: 1.35; }
.vendor-project-profit-card dd { margin: 3px 0 0; color: var(--ink); font-size: .86rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.vendor-project-profit-card dl > .profit dd { color: #315e39; }
.vendor-project-profit-card > footer { background: #f7f6f3; color: var(--muted); padding: 6px 10px; font-size: .6rem; font-weight: 800; }

.vendor-project-profit-table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  scrollbar-width: thin;
}
.vendor-project-profit-table { width: max(100%, 960px); border-collapse: separate; border-spacing: 0; font-size: .7rem; }
.vendor-project-profit-table th,
.vendor-project-profit-table td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px; text-align: right; vertical-align: top; font-variant-numeric: tabular-nums; }
.vendor-project-profit-table tr > :last-child { border-right: 0; }
.vendor-project-profit-table tbody tr:last-child > * { border-bottom: 0; }
.vendor-project-profit-table thead th { position: sticky; top: 0; z-index: 1; background: #f1efe9; color: var(--brand-dark); white-space: nowrap; }
.vendor-project-profit-table thead th:first-child,
.vendor-project-profit-table tbody th { position: sticky; left: 0; z-index: 2; min-width: 210px; max-width: 270px; background: #fff; text-align: left; }
.vendor-project-profit-table thead th:first-child { z-index: 3; background: #f1efe9; }
.vendor-project-profit-table th small,
.vendor-project-profit-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: .58rem; font-weight: 700; line-height: 1.35; }
.vendor-project-profit-table tbody th strong,
.vendor-project-profit-table tbody th em { display: block; overflow-wrap: anywhere; }
.vendor-project-profit-table tbody th strong { margin-top: 2px; color: var(--brand-dark); }
.vendor-project-profit-table tbody th em { margin-top: 2px; color: var(--muted); font-size: .62rem; font-style: normal; font-weight: 700; }
.vendor-project-profit-table td b { color: var(--ink); white-space: nowrap; }
.vendor-project-profit-table td.vendor-price-mapping-conflict { background: var(--warning-bg); color: #76541e; }

.vendor-price-score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.vendor-price-score-card {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #d8d5ce;
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}

.vendor-price-score-card > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #111;
  font-size: .7rem;
  font-weight: 900;
}

.vendor-price-score-card > div { display: grid; min-width: 0; gap: 2px; }
.vendor-price-score-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--brand-dark); font-size: .8rem; }
.vendor-price-score-card small { color: var(--muted); font-size: .63rem; line-height: 1.4; }
.vendor-price-score-card > b { color: var(--brand-dark); font-size: 1rem; }
.vendor-price-score-card.low-sample { border-color: #d8b677; background: #fffaf0; }

.vendor-price-analysis-note {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  border-left: 3px solid var(--accent);
  background: #fff;
  color: var(--muted);
  padding: 8px 10px;
  font-size: .67rem;
  line-height: 1.5;
}

.vendor-price-analysis-note.warning { background: var(--warning-bg); color: #69522e; }
.vendor-price-empty-inline { color: var(--muted); font-size: .72rem; }

.vendor-price-record { overflow: hidden; padding: 0; }
.vendor-price-record.inactive { opacity: .66; }
.vendor-price-record-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
  text-align: left;
}
.vendor-price-record-summary::-webkit-details-marker { display: none; }
.vendor-price-record-summary > span { display: grid; min-width: 0; gap: 2px; }
.vendor-price-record-summary small,
.vendor-price-record-summary em { overflow: hidden; color: var(--muted); font-size: .65rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.vendor-price-record-summary strong { overflow: hidden; color: var(--brand-dark); text-overflow: ellipsis; white-space: nowrap; }
.vendor-price-record-summary > b { color: var(--brand-dark); white-space: nowrap; }
.vendor-price-record-summary > b small { margin-left: 2px; }
.vendor-price-record-summary > i {
  width: 0;
  height: 0;
  border-right: 6px solid transparent;
  border-left: 6px solid transparent;
  border-top: 8px solid var(--brand);
  transition: transform .18s ease;
}
.vendor-price-record[open] .vendor-price-record-summary { border-bottom: 1px solid var(--line); background: #f4f3f0; }
.vendor-price-record[open] .vendor-price-record-summary > i { transform: rotate(180deg); }
.vendor-price-record-content { display: grid; gap: 10px; padding: 11px; }
.vendor-price-record-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.vendor-price-record-grid > span { display: grid; gap: 2px; border-radius: 7px; background: #f6f5f2; padding: 8px; }
.vendor-price-record-grid > span.wide { grid-column: 1 / -1; }
.vendor-price-record-grid small { color: var(--muted); font-size: .66rem; font-weight: 900; }
.vendor-price-record-grid b { overflow-wrap: anywhere; color: var(--ink); font-size: .76rem; }
.vendor-price-record-grid .vendor-price-range-warning { border: 1px solid #dbc28f; background: var(--warning-bg); }
.vendor-company-price-inline {
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(300px, 1.28fr);
  align-items: end;
  gap: 10px;
  border: 1px solid #d8d2c5;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #fffdf7;
  padding: 10px;
}
.vendor-company-price-inline > div { display: grid; gap: 3px; min-width: 0; }
.vendor-company-price-inline > div small,
.vendor-company-price-inline > div em { color: var(--muted); font-size: .65rem; font-style: normal; font-weight: 800; line-height: 1.4; }
.vendor-company-price-inline > div b { color: var(--brand-dark); font-size: .76rem; overflow-wrap: anywhere; }
.vendor-company-price-inline .sr-only,
.vendor-company-price-field .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.vendor-company-price-picker,
.vendor-company-price-field { min-width: 0; }
.vendor-company-price-inline > .vendor-company-price-picker { display: grid; grid-template-columns: minmax(150px, .72fr) minmax(220px, 1.28fr); align-items: end; gap: 5px 8px; }
.vendor-company-price-search,
.vendor-company-price-select { display: grid; min-width: 0; gap: 3px; }
.vendor-company-price-search > span { color: var(--muted); font-size: .63rem; font-weight: 900; }
.vendor-company-price-search input { width: 100%; min-width: 0; min-height: 42px; }
.vendor-company-price-search-count { grid-column: 1 / -1; color: var(--muted); font-size: .63rem; font-weight: 800; line-height: 1.35; }
.vendor-company-price-field .vendor-company-price-search,
.vendor-company-price-field .vendor-company-price-select { margin-top: 5px; }
.vendor-company-price-field .vendor-company-price-search-count { display: block; margin-top: 4px; }
.vendor-company-price-inline select,
.vendor-company-price-field select { width: 100%; min-height: 42px; }
.vendor-company-price-inline.ambiguous,
.vendor-company-price-inline.stale,
.vendor-company-price-inline.out-of-scope,
.vendor-company-price-inline.warning { border-color: #d6af63; background: var(--warning-bg); }
.vendor-company-price-inline.resolved-manual { border-left-color: #6c8456; background: #f7faf2; }
.vendor-company-price-inline.none { border-left-color: #96928a; background: #f6f5f2; }
.vendor-company-price-inline.dirty { border-color: #c8912d; border-left-color: #c8912d; background: #fff8e6; }
.vendor-company-price-inline.conflict,
.vendor-company-price-inline.invalid { border-color: #c76658; border-left-color: #b64234; background: #fff1ef; }
.vendor-price-record.has-unsaved-mapping { border-color: #d2a552; box-shadow: inset 4px 0 0 #c8912d; }
.vendor-company-price-field > small { display: block; color: var(--muted); line-height: 1.45; }
.vendor-company-price-field select:disabled,
.vendor-company-price-inline select:disabled { cursor: wait; opacity: .72; }

.vendor-price-comparison-scroll {
  position: relative;
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  scrollbar-width: thin;
}

.vendor-price-comparison-table {
  width: max(100%, 920px);
  border-collapse: separate;
  border-spacing: 0;
  font-size: .72rem;
}

.vendor-price-comparison-table th,
.vendor-price-comparison-table td {
  min-width: 118px;
  border-right: 1px solid #e6e3dd;
  border-bottom: 1px solid #e6e3dd;
  background: #fff;
  padding: 8px 9px;
  text-align: left;
  vertical-align: middle;
}

.vendor-price-comparison-table thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #eceae5;
  color: var(--brand-dark);
  font-size: .68rem;
}

.vendor-price-comparison-table th:first-child {
  position: sticky;
  z-index: 3;
  left: 0;
  min-width: 210px;
  max-width: 260px;
  box-shadow: 3px 0 8px rgba(17, 17, 17, .05);
}

.vendor-price-comparison-table tbody th:first-child { background: #faf9f6; }
.vendor-price-comparison-table tbody th small,
.vendor-price-comparison-table tbody th strong { display: block; }
.vendor-price-comparison-table tbody th small,
.vendor-price-comparison-table td small { display: block; color: var(--muted); font-size: .62rem; line-height: 1.35; }
.vendor-price-comparison-table tbody th strong { color: var(--brand-dark); }
.vendor-price-comparison-table td b { color: var(--ink); white-space: nowrap; }
.vendor-price-comparison-table td.is-lowest { background: var(--warning-bg); box-shadow: inset 3px 0 0 var(--accent); }
.vendor-price-comparison-table td.is-lowest small { color: #6a512d; font-weight: 900; }
.vendor-price-comparison-table td.has-pricing-basis-note {
  position: relative;
  cursor: help;
  background: #fff0ea;
  box-shadow: inset 0 0 0 2px #bd5a39;
}
.vendor-price-comparison-table td.has-pricing-basis-note.is-lowest {
  background: #fff0ea;
  box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 2px #bd5a39;
}
.vendor-price-pricing-tooltip {
  position: absolute;
  z-index: 8;
  top: calc(100% - 2px);
  left: 8px;
  width: max-content;
  max-width: min(280px, calc(100vw - 48px));
  border-radius: 7px;
  background: #4b2418;
  padding: 8px 10px;
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease;
  white-space: normal;
}
.vendor-price-comparison-table td.has-pricing-basis-note:hover .vendor-price-pricing-tooltip,
.vendor-price-comparison-table td.has-pricing-basis-note:focus .vendor-price-pricing-tooltip,
.vendor-price-comparison-table td.has-pricing-basis-note:focus-within .vendor-price-pricing-tooltip {
  opacity: 1;
  transform: translateY(0);
}
.vendor-price-comparison-table td.has-pricing-basis-note:focus-visible { outline: 3px solid rgba(189, 90, 57, .28); outline-offset: -3px; }
.vendor-price-pricing-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  border: 1px solid #bd5a39;
  border-radius: 999px;
  background: #fff9f6;
  padding: 2px 6px;
  color: #74351f;
  font-size: .58rem;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}
.vendor-price-pricing-note > span {
  display: inline-grid;
  width: 14px;
  height: 14px;
  place-items: center;
  border-radius: 50%;
  background: #ad4e30;
  color: #fff;
  font-size: .55rem;
}
.vendor-price-comparison-table td.vendor-price-missing { color: var(--muted); text-align: center; }
.vendor-price-comparison-table td.vendor-price-mapping-conflict { background: var(--warning-bg); color: #76541e; }
.vendor-price-comparison-table .vendor-price-specification { min-width: 180px; max-width: 280px; overflow-wrap: anywhere; }
.vendor-price-analysis-empty { min-height: 160px; }

.vendor-directory-record { display: block; }
.vendor-directory-mode .vendor-directory-record {
  min-width: 0;
  overflow: hidden;
  padding: 0;
}
.vendor-record-summary {
  display: grid;
  grid-template-columns: 42px minmax(110px, .65fr) minmax(180px, 1.35fr) auto 18px;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
  text-align: left;
}
.vendor-record-summary::-webkit-details-marker { display: none; }
.vendor-record-summary > span:not(.vendor-record-icon) { display: grid; min-width: 0; gap: 2px; }
.vendor-record-summary small { color: var(--muted); font-size: .64rem; font-weight: 900; }
.vendor-record-summary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--brand-dark); font-size: .88rem; }
.vendor-record-summary > em { border-radius: 999px; background: #e8f1ec; color: var(--brand-dark); padding: 5px 9px; font-style: normal; font-size: .7rem; font-weight: 900; white-space: nowrap; }
.vendor-directory-mode .vendor-record-summary {
  grid-template-columns: 34px minmax(0, 1fr) minmax(132px, auto) 14px;
  grid-template-rows: auto auto;
  gap: 2px 7px;
  min-height: 62px;
  padding: 8px 9px;
}
.vendor-directory-mode .vendor-record-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  width: 34px;
  height: 34px;
}
.vendor-directory-mode .vendor-summary-trade { grid-column: 2; grid-row: 1; }
.vendor-directory-mode .vendor-summary-name { grid-column: 2; grid-row: 2; }
.vendor-directory-mode .vendor-record-summary > em {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  padding: 4px 7px;
  font-size: .64rem;
}
.vendor-directory-mode .vendor-summary-metrics {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 5px;
  min-width: 132px;
}
.vendor-directory-mode .vendor-summary-metrics b {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  border-radius: 5px;
  background: #edf2ef;
  color: var(--brand-dark);
  padding: 3px 5px;
  font-size: .66rem;
  font-variant-numeric: tabular-nums;
}
.vendor-directory-mode .vendor-summary-metrics small { overflow: hidden; font-size: .54rem; text-overflow: ellipsis; white-space: nowrap; }
.vendor-directory-mode .vendor-record-summary > i {
  grid-column: 4;
  grid-row: 1 / span 2;
  align-self: center;
}
.estimate-catalog-summary {
  grid-template-columns: 42px minmax(170px, 1.2fr) minmax(150px, 1fr) minmax(130px, .85fr) minmax(125px, .7fr) 18px;
}
.estimate-catalog-summary > span:not(.vendor-record-icon) { display: grid; min-width: 0; gap: 2px; }
.estimate-catalog-summary > span:not(.vendor-record-icon) strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vendor-record-summary > i {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--brand);
  transition: transform .18s ease;
}
.vendor-directory-record[open] .vendor-record-summary { border-bottom: 1px solid var(--line); background: #f4f8f5; }
.vendor-directory-record[open] .vendor-record-summary > i { transform: rotate(180deg); }
.vendor-record-content { display: grid; gap: 10px; padding: 11px; text-align: left; }
.vendor-record-heading { display: flex; align-items: center; gap: 10px; }
.vendor-record-icon { width: 42px; height: 42px; flex: 0 0 auto; }
.vendor-record-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.vendor-record-heading > div { display: grid; min-width: 0; gap: 2px; }
.vendor-record-heading strong { color: var(--brand-dark); font-size: 1rem; }
.vendor-record-heading span { color: var(--muted); font-size: .76rem; font-weight: 800; }
.vendor-record-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; text-align: left; }
.vendor-directory-mode .vendor-record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vendor-record-grid > span { display: grid; gap: 2px; min-width: 0; border-radius: 7px; background: #f6f9f7; padding: 8px; }
.vendor-record-grid > span.wide { grid-column: 1 / -1; }
.vendor-record-grid small { color: var(--muted); font-size: .67rem; font-weight: 800; }
.vendor-record-grid b { overflow-wrap: anywhere; color: var(--ink); font-size: .78rem; }

.vendor-contacts-field {
  gap: 8px;
  border: 1px solid #d8e3dd;
  border-radius: 8px;
  background: #f8fbf9;
  padding: 10px;
}

.vendor-contacts-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vendor-contacts-heading button { width: auto; min-height: 34px; padding: 6px 10px; }
.vendor-contact-rows { display: grid; gap: 7px; }

.vendor-contact-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) 40px;
  align-items: end;
  gap: 7px;
  border-radius: 7px;
  background: #fff;
  padding: 8px;
}

.vendor-contact-row label { display: grid; gap: 4px; }
.vendor-contact-row label span { color: var(--muted); font-size: .68rem; font-weight: 900; }
.vendor-contact-remove { min-height: 42px; padding: 0; font-size: 1.05rem; }

.vendor-contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vendor-contact-list em {
  border-radius: 999px;
  background: #e8f1ec;
  color: var(--brand-dark);
  padding: 4px 8px;
  font-style: normal;
  font-size: .74rem;
}

.vendor-project-assignment-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 7px;
}

.vendor-project-assignment-cell { gap: 8px !important; }
.vendor-project-assignment-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.vendor-project-assignment-heading > em {
  color: var(--brand-dark);
  font-style: normal;
  font-size: .68rem;
  font-weight: 900;
  white-space: nowrap;
}
.vendor-project-assignment-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.vendor-project-assignment-controls label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.vendor-project-assignment-controls label > span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
}
.vendor-project-assignment-controls select {
  width: auto;
  min-width: 136px;
  min-height: 34px;
  padding: 5px 28px 5px 8px;
  font-size: .74rem;
}

.vendor-project-assignment-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 8px;
  min-width: 0;
  border: 1px solid #d7e3dc;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 8px 9px;
  text-align: left;
}
.vendor-directory-mode .vendor-project-assignment-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.vendor-directory-mode .vendor-project-assignment-controls label { display: grid; gap: 3px; }
.vendor-directory-mode .vendor-project-assignment-controls select { width: 100%; min-width: 0; }
.vendor-directory-mode .vendor-project-assignment-list { grid-template-columns: 1fr; }
.vendor-directory-mode .operation-record-actions { flex-wrap: wrap; }
.vendor-directory-mode .operation-record-actions button { flex: 1 1 calc(50% - 6px); }

.vendor-project-assignment-list button:not(:disabled):hover,
.vendor-project-assignment-list button:not(:disabled):focus-visible { border-color: var(--brand); background: #eef7f1; }
.vendor-project-assignment-list button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; }
.vendor-project-assignment-list button em { color: var(--brand-dark); font-style: normal; font-size: .72rem; font-weight: 900; white-space: nowrap; }
.vendor-project-assignment-list button small { grid-column: 1 / -1; color: var(--muted); font-size: .66rem; }
.vendor-project-empty { color: var(--muted); font-style: normal; font-weight: 700; }

.estimate-items-field {
  display: grid;
  gap: 10px;
  border: 1px solid #d4e0d9;
  border-radius: 10px;
  background: #f7faf8;
  padding: 12px;
}
.estimate-items-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.estimate-items-heading button { width: auto; }
.estimate-items-field > p { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.55; }
.estimate-item-rows { display: grid; gap: 8px; overflow-x: auto; }
.estimate-item-row {
  display: grid;
  grid-template-columns: 30px minmax(170px, 1.35fr) minmax(150px, 1.2fr) 72px 70px 92px 94px minmax(120px, .9fr) 38px;
  align-items: end;
  gap: 7px;
  min-width: 980px;
  border: 1px solid #e0e8e3;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}
.estimate-item-index { align-self: center; color: var(--brand-dark); text-align: center; font-weight: 900; }
.estimate-item-row label { display: grid; gap: 3px; min-width: 0; }
.estimate-item-row label span { color: var(--muted); font-size: .65rem; font-weight: 900; }
.estimate-item-row input,
.estimate-item-row select { min-width: 0; }
.estimate-item-remove { min-height: 42px; padding: 0; font-size: 1.05rem; }
.estimate-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.estimate-summary span { border-radius: 7px; background: #eaf2ed; color: var(--muted); padding: 7px 10px; font-size: .72rem; font-weight: 800; }
.estimate-summary b { color: var(--ink); }
.estimate-summary strong { color: var(--brand-dark); font-size: .88rem; }

.estimate-record-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
  text-align: left;
}
.estimate-record-summary::-webkit-details-marker { display: none; }
.estimate-record-summary > span { display: grid; min-width: 0; gap: 3px; }
.estimate-record-summary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--brand-dark); }
.estimate-record-summary small { color: var(--muted); font-size: .7rem; font-weight: 800; }
.estimate-record-summary > b { color: var(--brand-dark); font-size: .94rem; white-space: nowrap; }
.estimate-record-summary > i {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--brand);
  transition: transform .18s ease;
}
.estimate-record[open] .estimate-record-summary { border-bottom: 1px solid var(--line); background: #f4f8f5; }
.estimate-record[open] .estimate-record-summary > i { transform: rotate(180deg); }
.estimate-record-content { display: grid; gap: 10px; padding: 11px; text-align: left; }
.estimate-record-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.estimate-record-meta > span { display: grid; gap: 2px; border-radius: 7px; background: #f5f8f6; padding: 8px; }
.estimate-record-meta small { color: var(--muted); font-size: .66rem; font-weight: 900; }
.estimate-record-lines { display: grid; gap: 5px; }
.estimate-record-lines > div { display: grid; grid-template-columns: 28px minmax(150px, .8fr) minmax(220px, 1.4fr) 100px; align-items: center; gap: 8px; border-bottom: 1px solid #edf1ef; padding: 5px 3px; }
.estimate-record-lines > div > span { color: var(--muted); text-align: center; font-size: .7rem; }
.estimate-record-lines > div > small { color: var(--muted); overflow-wrap: anywhere; }
.estimate-record-lines > div > strong { color: var(--brand-dark); text-align: right; white-space: nowrap; }
.estimate-record-notes { margin: 0; border-radius: 7px; background: #fff9e8; padding: 8px 10px; white-space: pre-wrap; }

.cloud-sync-source-fields { grid-template-columns: minmax(280px, 1.6fr) minmax(160px, .7fr) minmax(160px, .7fr) auto; align-items: end; }
.vendor-trade-mapping-card { display: grid; gap: 10px; margin-top: 12px; border: 1px solid #cfe0d6; border-radius: 9px; background: #f8fbf9; padding: 12px; }
.vendor-trade-mapping-labels,
.vendor-trade-mapping-row { display: grid; grid-template-columns: minmax(130px, 1.1fr) minmax(90px, .72fr) minmax(120px, 1fr) minmax(90px, .75fr) 70px 70px 42px; align-items: center; gap: 7px; }
.vendor-trade-mapping-labels { color: var(--muted); padding: 0 4px; font-size: .68rem; font-weight: 900; }
.vendor-trade-mapping-rows { display: grid; gap: 7px; }
.vendor-trade-mapping-row { border-radius: 7px; background: #fff; padding: 7px; }
.vendor-trade-mapping-row input,
.vendor-trade-mapping-row select { min-width: 0; }
.vendor-mapping-field { display: block; min-width: 0; }
.vendor-mapping-field > span { display: none; }
.vendor-mapping-field > input,
.vendor-mapping-field > select { width: 100%; }
.vendor-mapping-active { display: flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 800; }
.vendor-mapping-active input { width: 16px; min-height: 16px; }
.vendor-trade-mapping-actions { justify-content: flex-end; }
.vendor-trade-mapping-actions > span { color: var(--muted); font-size: .7rem; font-weight: 700; }

.operation-chart {
  display: grid;
  flex: 1 1 320px;
  gap: 5px;
  min-width: 280px;
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.operation-chart-row {
  display: grid;
  grid-template-columns: 80px minmax(100px, 1fr) 28px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.operation-chart-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operation-chart-row i { height: 7px; overflow: hidden; border-radius: 999px; background: #e4ebe7; }
.operation-chart-row b { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.vendor-quote-chart .operation-chart-row { grid-template-columns: 90px minmax(100px, 1fr) 96px; }
.vendor-quote-chart .operation-chart-row > strong { color: var(--brand-dark); text-align: right; white-space: nowrap; }

.operation-workspace {
  display: grid;
  grid-template-columns: minmax(380px, 0.9fr) minmax(420px, 1.1fr);
  align-items: start;
  gap: 0;
}

.operation-editor,
.operation-record-section { min-width: 0; padding: 18px; }

.operation-editor {
  position: sticky;
  top: 150px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.operation-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dispatch-mode .operation-workspace { grid-template-columns: minmax(0, 1fr); }
.dispatch-mode .operation-editor {
  position: static;
  border-right: 0;
  border-bottom: 1px solid var(--line);
}

.dispatch-mode #operationStats { display: block; }
.dispatch-analytics { display: grid; gap: 16px; min-width: 0; }
.dispatch-analysis-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: end; }
.dispatch-analysis-heading h3 { margin: 0 0 5px; font-size: 1.1rem; }
.dispatch-analysis-heading p,
.dispatch-analysis-panel > p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.6; }
.dispatch-analysis-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.dispatch-analysis-filters label,
.dispatch-keyword-fields label { display: grid; gap: 5px; min-width: 0; font-size: .75rem; font-weight: 700; }
.dispatch-analysis-filters select { width: 180px; max-width: 100%; min-height: 38px; }
.dispatch-analysis-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dispatch-analysis-kpis .operation-stat { min-width: 0; width: auto; }
.dispatch-analysis-kpis .operation-stat strong { font-variant-numeric: tabular-nums; }
.dispatch-analysis-note,
.dispatch-analysis-scope { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.7; }
.dispatch-analysis-scope { border-left: 3px solid var(--brand); padding: 8px 12px; background: var(--surface); }
.dispatch-analysis-panels { display: grid; grid-template-columns: minmax(230px, .75fr) minmax(0, 1.25fr); gap: 14px; }
.dispatch-analysis-panel { min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); padding: 16px; }
.dispatch-analysis-panel h4 { margin: 0 0 5px; font-size: .88rem; }
.dispatch-category-list { display: grid; gap: 14px; margin-top: 18px; }
.dispatch-category-row > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: .8rem; }
.dispatch-category-row small { display: block; color: var(--muted); font-size: .7rem; margin-top: 4px; }
.dispatch-analysis-track { height: 6px; margin-top: 6px; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
.dispatch-analysis-track i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.dispatch-analysis-table-scroll { max-width: 100%; overflow-x: auto; margin-top: 14px; }
.dispatch-analysis-table-scroll table { border-collapse: collapse; width: 100%; font-size: .75rem; }
.dispatch-analysis-table-scroll th,
.dispatch-analysis-table-scroll td { padding: 11px 9px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.dispatch-analysis-table-scroll thead th { font-size: .68rem; color: var(--muted); background: var(--surface-2); font-weight: 600; }
.dispatch-analysis-table-scroll th:first-child { text-align: left; white-space: normal; min-width: 105px; overflow-wrap: anywhere; }
.dispatch-analysis-table-scroll tbody th { font-weight: 600; }
.dispatch-analysis-table-scroll tr:last-child > * { border-bottom: 0; }
.dispatch-analysis-table-scroll tr.is-selected { background: #f4f3ee; }
.dispatch-analysis-table-scroll td.dispatch-analysis-empty { text-align: center; padding: 24px 10px; color: var(--muted); white-space: normal; }
.dispatch-quarter-bars { display: grid; gap: 3px; width: 85px; margin-top: 5px; margin-left: auto; }
.dispatch-quarter-bars i,
.dispatch-quarter-bars b { display: block; height: 4px; border-radius: 5px; background: var(--brand); }
.dispatch-quarter-bars i { background: #bdbbb4; }
.dispatch-analysis-legend { display: flex; gap: 14px; color: var(--muted); font-size: .65rem; margin-top: 10px; }
.dispatch-analysis-settings,
.dispatch-analysis-method { border-top: 1px solid var(--line); padding-top: 12px; font-size: .75rem; }
.dispatch-analysis-settings summary,
.dispatch-analysis-method summary { cursor: pointer; font-weight: 700; }
.dispatch-analysis-settings p,
.dispatch-analysis-method li { color: var(--muted); line-height: 1.8; }
.dispatch-analysis-method ul { margin: 10px 0 0; padding-left: 20px; }
.dispatch-keyword-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dispatch-keyword-fields input { width: 100%; }
.dispatch-analysis-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
@media (max-width: 1100px) {
  .dispatch-analysis-panels { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .dispatch-analysis-kpis,
  .dispatch-keyword-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-analysis-filters { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-analysis-filters select { width: 100%; }
  .dispatch-analysis-panel { padding: 12px; }
}

.operation-fields textarea { min-height: 74px; }

.operation-project-combobox {
  position: relative;
}

.operation-project-selection {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.operation-image-field {
  align-content: start;
}

.operation-image-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: #f8faf8;
  color: var(--muted);
  padding: 8px;
  font-size: 0.74rem;
}

.operation-image-preview img {
  width: 96px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 6px;
  object-fit: cover;
}

.operation-attachment-field {
  align-content: start;
  gap: 7px;
  border: 1px dashed #cbdad2;
  border-radius: 8px;
  background: #f8fbf9;
  padding: 10px;
}

.operation-attachment-existing,
.operation-attachment-new {
  display: grid;
  gap: 5px;
}

.operation-attachment-existing[hidden] { display: none; }

.operation-attachment-existing label {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  border-radius: 6px;
  background: #fff;
  padding: 7px 9px;
  font-size: 0.76rem;
  line-height: 1.45;
}

.operation-attachment-existing input { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; }
.operation-attachment-existing a { color: var(--brand); font-weight: 900; }
.operation-attachment-new > span { display: block; overflow-wrap: anywhere; font-size: 0.76rem; font-weight: 800; }

.checkbox-field {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf8;
  padding: 8px 10px;
}

.checkbox-field input { width: 18px; min-height: 18px; margin: 0 8px 0 0; }

.operation-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.operation-form-actions button { width: auto; }

.save-feedback {
  min-height: 0;
  margin-top: 10px;
  border-radius: 6px;
  color: var(--muted);
  padding: 9px 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

.save-feedback[hidden] { display: none; }
.save-feedback.loading,
.save-feedback.info { background: #eef4ff; color: #315a91; }
.save-feedback.success { background: #e9f7ed; color: #27643d; }
.save-feedback.warning { background: #fff7e6; color: #805c13; }
.save-feedback.error { background: #fff0ed; color: #a63a31; }

.operation-notice {
  margin-bottom: 12px;
  border-radius: 7px;
  background: #fff7df;
  color: #765719;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 800;
}

.operation-special-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid #cfe0d6;
  border-radius: 9px;
  background: #f1f8f4;
  padding: 12px;
}

.operation-special-card strong { color: var(--brand-dark); }
.operation-special-card p { margin: 4px 0 0; font-size: 0.78rem; line-height: 1.5; }
.operation-special-card > button { flex: 0 0 auto; }

.acceptance-builder {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(420px, 1.18fr);
  align-items: start;
  gap: 14px;
}

.acceptance-generation-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.acceptance-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.acceptance-fields textarea { min-height: 58px; }

.acceptance-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.acceptance-actions button { width: auto; }

.acceptance-preview {
  display: grid;
  gap: 10px;
  min-width: 0;
  border-left: 1px solid #cfe0d6;
  padding-left: 14px;
}

.acceptance-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.acceptance-preview-heading p { color: var(--muted); }
.acceptance-preview-heading > span { color: var(--muted); font-size: .74rem; font-weight: 900; }
.acceptance-preview-heading > span.success { color: #187343; }
.acceptance-preview-heading > span.error { color: #b9382f; }
.acceptance-preview-heading > span.pending { color: #795b14; }

.acceptance-preview-content {
  min-width: 0;
  border-radius: 8px;
  background: #dfe7e3;
  padding: 14px;
}

.acceptance-preview-sheet {
  display: grid;
  gap: 12px;
  width: min(100%, 820px);
  margin: 0 auto;
  border: 1px solid #c9d4ce;
  background: #fff;
  box-shadow: 0 4px 16px rgba(29, 58, 47, .11);
  padding: 20px;
}

.acceptance-preview-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid var(--brand);
  padding-bottom: 9px;
}

.acceptance-preview-title span { color: var(--brand-dark); font-size: 1.12rem; font-weight: 900; }
.acceptance-preview-title small { color: var(--muted); overflow-wrap: anywhere; text-align: right; }

.acceptance-preview-basic,
.acceptance-preview-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.acceptance-preview-basic > div,
.acceptance-preview-sections > section {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  border: 1px solid #dbe5df;
  border-radius: 6px;
  padding: 9px;
}

.acceptance-preview-basic > div:nth-child(3) { grid-column: 1 / -1; }
.acceptance-preview-basic small { color: var(--muted); font-size: .66rem; font-weight: 900; }
.acceptance-preview-basic b { overflow-wrap: anywhere; font-size: .78rem; }
.acceptance-preview-sections h4 { margin: 0; color: var(--brand-dark); font-size: .76rem; }
.acceptance-preview-sections section > div { color: var(--text); font-size: .74rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.acceptance-preview-empty { color: var(--muted); padding: 20px; text-align: center; font-weight: 800; }
.acceptance-preview-empty.error { color: #b9382f; }

.purchase-order-builder {
  margin-bottom: 14px;
  border: 1px solid #cfe0d6;
  border-radius: 9px;
  background: #f7faf8;
  padding: 13px;
}

.purchase-order-heading,
.purchase-order-footer,
.purchase-item-heading,
.purchase-order-summary-title,
.purchase-order-badges,
.purchase-order-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.purchase-order-heading { margin-bottom: 12px; }
.purchase-order-heading p { margin: 3px 0 0; color: var(--muted); font-size: 0.76rem; }
.purchase-order-heading > button,
.purchase-order-footer > button { width: auto; }

.purchase-order-header {
  grid-template-columns: minmax(150px, 1.05fr) minmax(130px, .82fr) minmax(170px, 1.2fr) minmax(150px, 1fr) minmax(120px, .8fr);
  gap: 7px;
}

.purchase-item-fields {
  grid-template-columns: minmax(120px, 1.1fr) minmax(120px, 1.1fr) minmax(90px, .8fr) minmax(90px, .8fr) minmax(58px, .55fr) minmax(58px, .55fr) minmax(80px, .75fr) minmax(125px, 1fr);
  gap: 6px;
}

.purchase-order-header .field-label,
.purchase-item-fields .field-label { gap: 3px; font-size: .72rem; }

.purchase-order-header input,
.purchase-order-header select,
.purchase-order-header textarea,
.purchase-item-fields input,
.purchase-item-fields select,
.purchase-item-fields textarea { min-height: 34px; padding: 5px 7px; font-size: .78rem; }

.purchase-order-header textarea,
.purchase-item-fields textarea { height: 34px; min-height: 34px; resize: vertical; }

.purchase-header-notes { grid-column: 1 / -1; }
.purchase-header-main-image { grid-column: 1 / -1; }
.purchase-order-header .operation-project-combobox { grid-column: auto; }
.purchase-item-name { grid-column: 1; }
.purchase-item-supplier { grid-column: 2; }
.purchase-item-spec { grid-column: 3 / span 2; }
.purchase-item-quantity { grid-column: 5; }
.purchase-item-unit { grid-column: 6; }
.purchase-item-price { grid-column: 7; }
.purchase-item-date { grid-column: 8; }
.purchase-item-link { grid-column: 1 / span 3; }
.purchase-item-notes { grid-column: 4 / span 3; }
.purchase-item-image { grid-column: 7 / span 2; }

.purchase-project-fixed {
  display: grid;
  gap: 3px;
  border-radius: 7px;
  background: #e8f2ec;
  padding: 9px 11px;
}

.purchase-project-fixed small { color: var(--muted); font-weight: 800; }
.purchase-order-items { display: grid; gap: 8px; margin-top: 10px; }

.purchase-order-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.purchase-item-heading { margin-bottom: 6px; }
.purchase-item-heading button { width: 34px; min-height: 34px; padding: 0; font-size: 1rem; }
.purchase-item-image .operation-image-preview { min-height: 34px; padding: 4px 6px; }
.purchase-item-image .operation-image-preview img { width: 44px; height: 32px; }
.purchase-order-footer { justify-content: flex-end; margin-top: 12px; }

.purchase-order-remove-image {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}

.purchase-order-remove-image input { width: auto; min-height: auto; }

.purchase-order-inline-image,
.purchase-order-thumb {
  width: auto;
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
}

.purchase-order-inline-image:hover,
.purchase-order-inline-image:focus-visible,
.purchase-order-thumb:hover,
.purchase-order-thumb:focus-visible {
  outline: 2px solid rgba(53, 110, 78, .35);
  outline-offset: 2px;
}

.purchase-order-progress {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  border: 1px solid #bdd6c7;
  border-radius: 8px;
  background: #f4f9f6;
  padding: 10px 12px;
}

.purchase-order-progress[hidden] { display: none; }
.purchase-order-progress.error { border-color: #e5b8b2; background: #fff5f3; }
.purchase-order-progress.success { border-color: #9bc8aa; background: #eff9f2; }
.purchase-order-progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--brand-dark); font-size: .78rem; }
.purchase-order-progress.error .purchase-order-progress-heading { color: #a5342c; }
.purchase-order-progress-track { height: 10px; overflow: hidden; border-radius: 999px; background: #dce8e0; }
.purchase-order-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #55a06c, #25643f); transition: width .28s ease; }
.purchase-order-progress.loading .purchase-order-progress-track span { background-size: 28px 28px; background-image: linear-gradient(135deg, rgba(255,255,255,.22) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.22) 50%, rgba(255,255,255,.22) 75%, transparent 75%, transparent), linear-gradient(90deg, #55a06c, #25643f); animation: purchase-order-progress-stripes .75s linear infinite; }
.purchase-order-progress.error .purchase-order-progress-track span { background: #b9382f; }
.purchase-order-result-link { justify-self: start; color: var(--brand-dark); font-size: .8rem; font-weight: 900; text-decoration: underline; overflow-wrap: anywhere; }

@keyframes purchase-order-progress-stripes {
  to { background-position: 28px 0, 0 0; }
}

.purchase-order-preview-section {
  margin-top: 18px;
  border-top: 2px solid #c9d9cf;
  padding-top: 14px;
}

.purchase-order-preview-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.purchase-order-preview-heading strong { color: var(--brand-dark); font-size: 1rem; }
.purchase-order-preview-heading span { color: var(--muted); font-size: .72rem; font-weight: 800; }
.purchase-order-preview-scroll { overflow-x: auto; border: 1px solid #d7e1da; border-radius: 8px; background: #e8edea; padding: 12px; }
.purchase-order-preview-pages { display: grid; gap: 14px; min-width: 860px; }
.purchase-order-preview-page { box-sizing: border-box; width: 100%; min-height: 608px; border: 1px solid #afb7b2; background: #fff; box-shadow: 0 5px 16px rgba(26, 43, 34, .12); padding: 34px 42px; color: #111; font-family: "Microsoft JhengHei", sans-serif; font-size: 11px; }
.purchase-order-preview-page h3 { margin: 0 0 13px; color: #111; font-size: 24px; text-align: center; }
.purchase-order-preview-meta { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 12px; border-top: 1px solid #222; border-left: 1px solid #222; }
.purchase-order-preview-meta div { display: grid; grid-template-columns: 72px 1fr; min-height: 32px; border-right: 1px solid #222; border-bottom: 1px solid #222; }
.purchase-order-preview-meta div:nth-child(6) { grid-column: span 2; }
.purchase-order-preview-meta dt,
.purchase-order-preview-meta dd { display: flex; align-items: center; margin: 0; padding: 4px 6px; }
.purchase-order-preview-meta dt { background: #d9d9d9; font-weight: 900; }
.purchase-order-preview-meta dd { overflow-wrap: anywhere; }
.purchase-order-preview-page table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.purchase-order-preview-page th,
.purchase-order-preview-page td { border: 1px solid #222; padding: 5px; vertical-align: middle; white-space: pre-wrap; overflow-wrap: anywhere; }
.purchase-order-preview-page th { background: #d9d9d9; text-align: center; }
.purchase-order-preview-page th:nth-child(1), .purchase-order-preview-page td:nth-child(1) { width: 6%; text-align: center; }
.purchase-order-preview-page th:nth-child(2), .purchase-order-preview-page td:nth-child(2) { width: 13%; }
.purchase-order-preview-page th:nth-child(3), .purchase-order-preview-page td:nth-child(3) { width: 12%; }
.purchase-order-preview-page th:nth-child(4), .purchase-order-preview-page td:nth-child(4) { width: 17%; }
.purchase-order-preview-page th:nth-child(5), .purchase-order-preview-page td:nth-child(5), .purchase-order-preview-page th:nth-child(6), .purchase-order-preview-page td:nth-child(6), .purchase-order-preview-page th:nth-child(7), .purchase-order-preview-page td:nth-child(7) { width: 8%; text-align: right; }
.purchase-order-preview-page td a { color: #0000ee; text-decoration: underline; }
.purchase-order-preview-approval { margin: 16px 0 0; text-align: right; font-weight: 800; }
.purchase-order-preview-image-page { display: grid; grid-template-rows: auto minmax(0, 1fr); aspect-ratio: 297 / 210; overflow: hidden; }
.purchase-order-preview-image-page h3 { text-align: left; font-size: 16px; }
.purchase-order-preview-image-page img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }

.purchase-order-record { grid-template-columns: minmax(0, 1fr) auto; }
.purchase-order-record-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 10px 12px; cursor: pointer; list-style: none; }
.purchase-order-record-summary::-webkit-details-marker { display: none; }
.purchase-order-record-summary > span { display: grid; min-width: 0; gap: 2px; }
.purchase-order-record-summary strong { color: var(--brand-dark); overflow-wrap: anywhere; }
.purchase-order-record-summary small { color: var(--muted); font-size: .72rem; font-weight: 800; overflow-wrap: anywhere; }
.purchase-order-record-summary i { flex: 0 0 auto; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid var(--brand); transition: transform .18s ease; }
.purchase-order-record[open] .purchase-order-record-summary { border-bottom: 1px solid var(--line); background: #f4f8f5; }
.purchase-order-record[open] .purchase-order-record-summary i { transform: rotate(180deg); }
.purchase-order-record-content { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 11px; }
.purchase-order-summary { display: grid; gap: 9px; min-width: 0; }
.purchase-order-summary-title { align-items: flex-start; flex-direction: column; gap: 2px; }
.purchase-order-summary-title strong { color: var(--brand-dark); }
.purchase-order-summary-title span { color: var(--muted); font-size: 0.76rem; font-weight: 700; }
.purchase-order-badges { justify-content: flex-start; flex-wrap: wrap; }
.purchase-order-badges span,
.purchase-order-badges a { border-radius: 999px; background: #edf4ef; color: var(--brand-dark); padding: 4px 8px; font-size: 0.72rem; font-weight: 900; }
.purchase-order-lines { display: grid; gap: 5px; }
.purchase-order-line { justify-content: flex-start; border-top: 1px dashed var(--line); padding-top: 6px; }
.purchase-order-line > span { display: grid; flex: 1 1 auto; min-width: 0; gap: 2px; }
.purchase-order-line small { color: var(--muted); }
.purchase-order-line > a:not(.purchase-order-thumb) { color: var(--brand); font-size: 0.74rem; font-weight: 900; }
.purchase-order-thumb img { width: 54px; height: 42px; border-radius: 5px; object-fit: cover; }
.purchase-order-main-attachment { display: flex; align-items: center; gap: 10px; border-top: 1px dashed var(--line); padding-top: 7px; }
.purchase-order-main-attachment > span { display: grid; gap: 2px; }
.purchase-order-main-attachment small { color: var(--muted); }

.modal-panel.order-image-panel { width: min(1120px, 100%); max-height: min(94dvh, 980px); }
.order-image-stage { display: grid; place-items: center; min-height: 280px; max-height: calc(94dvh - 130px); overflow: auto; border-radius: 7px; background: #18221d; padding: 10px; }
.order-image-stage img { display: block; max-width: 100%; max-height: calc(94dvh - 155px); object-fit: contain; }

.spec-version-group { display: grid; gap: 9px; }
.spec-version-group + .spec-version-group { margin-top: 14px; }
.spec-version-group > header { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--brand); padding: 5px 2px; }
.spec-version-group > header strong { color: var(--brand-dark); font-size: 1rem; }
.spec-version-group > header span { color: var(--muted); font-size: 0.74rem; font-weight: 800; }

.spec-category-group { display: grid; gap: 5px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.spec-category-group h4 { margin: -8px -8px 2px; padding: 7px 9px; color: var(--brand-dark); }
.spec-category-color-0 h4 { background: #e2f0d9; }
.spec-category-color-1 h4 { background: #ddebf7; }
.spec-category-color-2 h4 { background: #fff2cc; }
.spec-category-color-3 h4 { background: #fce4d6; }
.spec-category-color-4 h4 { background: #e4dfec; }
.spec-category-color-5 h4 { background: #d9e1f2; }

.spec-item-row,
.spec-note-row,
.spec-note-editor { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; border-top: 1px dashed var(--line); padding: 7px 3px 2px; }
.spec-item-row > div:first-child { display: grid; gap: 2px; min-width: 0; }
.spec-item-row span,
.spec-item-row small { color: var(--muted); font-size: 0.74rem; overflow-wrap: anywhere; }
.spec-note-row { border: 0; border-radius: 6px; background: var(--spec-note-color, #fff2cc); padding: 7px 8px 7px 26px; }
.spec-note-row span { display: grid; gap: 2px; font-size: 0.78rem; }
.spec-note-row small { color: #765719; font-weight: 900; }
.spec-note-row button { width: auto; min-height: 30px; padding-inline: 8px; }
.spec-note-editor { grid-template-columns: minmax(150px, 1fr) auto auto auto; border: 0; border-radius: 6px; background: #fff8e4; padding: 7px; }
.spec-note-editor input,
.spec-note-editor select { min-height: 36px; }
.spec-note-editor button { width: auto; min-height: 34px; }

.spec-import-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
.spec-import-card > div:first-child { grid-column: 1 / -1; }

.file-action {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-height: 40px;
  overflow: hidden;
  border-radius: 6px;
  background: #dfece5;
  color: var(--brand-dark);
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.file-action input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.spec-import-preview {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  padding: 9px;
  font-size: 0.76rem;
  line-height: 1.45;
}

.operation-record-section { background: #fafbf9; }

.operation-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.operation-list-heading h3 { margin: 0; color: var(--brand-dark); }
.operation-list-heading span { color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.operation-list-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.operation-list-controls select { width: 168px; min-height: 38px; }
.operation-list-controls input { width: 230px; min-height: 38px; }
.operation-list-controls .operation-refresh-button {
  flex: 0 0 38px;
  width: 38px;
  min-height: 38px;
  padding: 0;
  font-size: 1.2rem;
  font-weight: 900;
}
.operation-list-controls .operation-refresh-button[hidden] { display: none; }

.operation-records { display: grid; gap: 9px; }

.operation-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px;
}

.operation-record.low-stock { border-color: #e1a49a; background: #fff7f5; }
.operation-record.access-request-pending {
  border-color: #d9aa55;
  border-left-width: 5px;
  background: #fff8e8;
}

.operation-record-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
  min-width: 0;
}

.operation-record-field { display: grid; gap: 2px; min-width: 0; }
.operation-record-field.wide { grid-column: 1 / -1; }
.operation-record-field small { color: var(--muted); font-size: 0.68rem; font-weight: 800; }
.operation-record-field b,
.operation-record-field a { overflow-wrap: anywhere; color: var(--text); font-size: 0.82rem; line-height: 1.45; }
.operation-record-field a { color: var(--brand); font-weight: 900; }
.operation-record-thumbnail { grid-row: span 2; }
.operation-record-thumbnail img { width: 92px; height: 70px; border-radius: 6px; object-fit: cover; }

.operation-record-actions { display: flex; gap: 6px; }
.operation-record-actions button { width: auto; min-height: 32px; padding: 0 9px; font-size: 0.74rem; }
.access-role-merge-control {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 7px 10px;
  border-top: 1px dashed #d9aa55;
  padding-top: 9px;
}
.access-role-merge-control label { display: grid; gap: 4px; min-width: 0; }
.access-role-merge-control label span,
.access-role-merge-control small { color: var(--muted); font-size: 0.7rem; font-weight: 800; line-height: 1.45; }
.access-role-merge-control select { width: 100%; min-width: 0; }
.access-role-merge-control > small { grid-column: 1 / -1; }

.operation-record-attachments > span {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
}

.repair-overview-mode .operation-workspace { grid-template-columns: minmax(0, 1fr); }
.repair-overview-mode .operation-editor { display: none; }
.repair-overview-mode .operation-record-section { padding: 14px 18px 20px; }
.repair-overview-mode .operation-dashboard { align-items: stretch; padding: 14px 18px; }

.repair-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  width: 100%;
}
.repair-dashboard-integrity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.repair-dashboard-integrity > div { display: grid; gap: 4px; min-width: 0; padding: 11px 12px; border: 1px solid #bcd8c8; border-radius: 10px; background: #eef8f2; }
.repair-dashboard-integrity.has-warning > div:last-child { border-color: #e2c080; background: #fff7e8; }
.repair-dashboard-integrity strong { color: var(--brand-dark); font-size: .82rem; }
.repair-dashboard-integrity span { color: var(--muted); font-size: .69rem; line-height: 1.55; }
.repair-dashboard-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.repair-dashboard-filter-button {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid #d6dfda;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}
.repair-dashboard-filter-button:hover,
.repair-dashboard-filter-button:focus-visible { border-color: var(--brand); background: #f1f8f4; }
.repair-dashboard-filter-button.is-active,
.repair-dashboard-filter-button[aria-pressed="true"] { border-color: var(--brand); background: #e5f3eb; box-shadow: inset 0 0 0 1px var(--brand); }
.repair-dashboard-filter-button strong { color: var(--brand-dark); font-size: 1.22rem; line-height: 1.1; }
.repair-dashboard-filter-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .73rem; font-weight: 900; }
.repair-dashboard-filter-button small { color: var(--muted); font-size: .66rem; line-height: 1.35; }
.repair-dashboard-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.repair-dashboard-panel { display: grid; align-content: start; gap: 9px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.repair-dashboard-panel > header { display: flex; align-items: baseline; justify-content: space-between; gap: 9px; }
.repair-dashboard-panel > header strong { color: var(--brand-dark); font-size: .84rem; }
.repair-dashboard-panel > header span { color: var(--muted); font-size: .65rem; font-weight: 800; }
.repair-dashboard-bars { display: grid; gap: 5px; }
.repair-dashboard-bars button { display: grid; grid-template-columns: minmax(116px, .85fr) minmax(90px, 1.15fr); align-items: center; gap: 9px; min-height: 44px; padding: 5px 7px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: inherit; text-align: left; }
.repair-dashboard-bars button:hover,
.repair-dashboard-bars button:focus-visible,
.repair-dashboard-bars button[aria-pressed="true"] { border-color: #bad0c4; background: #f1f7f3; }
.repair-dashboard-bars button > span { display: grid; min-width: 0; gap: 2px; }
.repair-dashboard-bars button > span b { overflow: hidden; color: var(--ink); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.repair-dashboard-bars button > span small { color: var(--muted); font-size: .63rem; }
.repair-dashboard-bars button > i { display: block; height: 8px; overflow: hidden; border-radius: 999px; background: #e4ebe7; }
.repair-dashboard-bars button > i > b { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.repair-dashboard-most .repair-dashboard-filter-button { min-height: 102px; }
.repair-dashboard-active-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.repair-dashboard-active-list .repair-dashboard-filter-button { min-height: 74px; }
.repair-dashboard-empty { margin: 0; padding: 14px 8px; color: var(--muted); font-size: .72rem; line-height: 1.55; text-align: center; }

@media (max-width: 760px) {
  .repair-dashboard,
  .repair-dashboard-integrity,
  .repair-dashboard-chart-grid,
  .repair-dashboard-active-list { grid-template-columns: 1fr; }
  .repair-dashboard-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.operation-assignee-field select { min-width: 0; }
.operation-assignee-field.has-duplicate select { border-color: #bd3b32; background: #fff2f0; }
.operation-assignee-field.has-duplicate small { color: #a3312a; }

@media (max-width: 760px), (max-device-width: 760px), (hover: none) and (pointer: coarse) {
  .operation-assignee-field select { min-height: 44px; }
}
.acceptance-document-mode .operation-workspace { grid-template-columns: minmax(0, 1fr); }
.acceptance-document-mode .operation-editor {
  position: static;
  top: auto;
  border-top: 1px solid var(--line);
  border-right: 0;
}

.purchase-order-mode .operation-workspace,
.project-data-mode .operation-workspace,
.access-role-mode .operation-workspace { grid-template-columns: minmax(0, 1fr); }

.purchase-order-mode .operation-editor,
.project-data-mode .operation-editor,
.access-role-mode .operation-editor {
  position: static;
  top: auto;
  border-top: 1px solid var(--line);
  border-right: 0;
}

.project-data-mode .operation-editor { border-top: 0; padding: 16px 18px 22px; }
.project-data-mode #operationSpecialActions { width: 100%; }

.project-data-operation-shell {
  display: grid;
  gap: 13px;
  border: 1px solid #cfe0d6;
  border-radius: 9px;
  background: #f8faf9;
  padding: 14px;
}

.project-data-operation-heading strong { color: var(--brand-dark); font-size: 1rem; }
.project-data-operation-heading p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }
.project-data-operation-shell #projectForm { width: 100%; }

.repair-overview-record {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 7px 9px;
}

.repair-overview-main {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) 92px minmax(120px, 1fr) minmax(210px, 2fr) minmax(90px, .8fr) 78px minmax(130px, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.repair-overview-main:hover .repair-overview-cell.project b,
.repair-overview-main:focus-visible .repair-overview-cell.project b { color: var(--brand); text-decoration: underline; }
.repair-overview-main:disabled { cursor: default; opacity: .72; }
.repair-overview-cell { display: grid; min-width: 0; gap: 2px; }
.repair-overview-cell small { color: var(--muted); font-size: .64rem; font-weight: 800; }
.repair-overview-cell b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
.repair-overview-cell.status b { color: var(--brand-dark); }
.repair-overview-actions { flex-wrap: nowrap; }

.operation-record.operation-record-collapsible {
  display: block;
  padding: 0;
  overflow: hidden;
}

.knowledge-record.imported { border-left: 4px solid var(--brand); }
.knowledge-record-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 10px 13px;
  cursor: pointer;
  list-style: none;
  text-align: left;
}
.knowledge-record-summary::-webkit-details-marker { display: none; }
.knowledge-record-summary-main { display: grid; min-width: 0; gap: 4px; }
.knowledge-record-summary-main > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--brand-dark); font-size: .9rem; }
.knowledge-record-summary-main > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .68rem; font-weight: 800; }
.knowledge-record-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.knowledge-record-badges b {
  border-radius: 999px;
  padding: 2px 7px;
  font-size: .62rem;
  font-weight: 900;
  line-height: 1.35;
}
.knowledge-scope-badge.shared { background: #e2eee7; color: #245c4a; }
.knowledge-scope-badge.project { background: #ece8dd; color: #67512c; }
.knowledge-source-badge.sites { background: #e8eef7; color: #345a83; }
.knowledge-source-badge.manual { background: #f0f0ee; color: #666; }
.knowledge-category-badge { background: #f4f1eb; color: #5d5548; }
.knowledge-record-summary > i {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--brand);
  transition: transform .2s ease;
}
.knowledge-record[open] .knowledge-record-summary { border-bottom: 1px solid var(--line); background: #f4f8f5; }
.knowledge-record[open] .knowledge-record-summary > i { transform: rotate(180deg); }
.knowledge-record-content { display: grid; gap: 11px; padding: 12px 13px; }
.knowledge-record-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.knowledge-record-meta > span { display: grid; gap: 2px; border-radius: 7px; background: #f6f8f6; padding: 8px; }
.knowledge-record-meta small,
.knowledge-source-line small { color: var(--muted); font-size: .65rem; font-weight: 900; }
.knowledge-record-meta b,
.knowledge-source-line b { color: var(--text); font-size: .76rem; overflow-wrap: anywhere; }
.knowledge-record-text { color: var(--text); font-size: .82rem; line-height: 1.72; overflow-wrap: anywhere; }
.knowledge-tag-list { display: flex; flex-wrap: wrap; gap: 5px; }
.knowledge-tag-list span { border-radius: 999px; background: #edf1ee; color: var(--muted); padding: 3px 8px; font-size: .66rem; font-weight: 800; }
.knowledge-image-index-status { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 2px 8px; border: 1px solid #d8e0db; border-radius: 7px; background: #f7f9f7; padding: 8px 10px; }
.knowledge-image-index-status > span { grid-row: 1 / span 2; color: var(--brand-dark); font-size: 1rem; text-align: center; }
.knowledge-image-index-status b { color: var(--text); font-size: .74rem; }
.knowledge-image-index-status small { color: var(--muted); font-size: .66rem; font-weight: 800; }
.knowledge-image-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.knowledge-image-grid a { display: grid; gap: 4px; color: var(--brand-dark); text-decoration: none; }
.knowledge-image-grid img { width: 100%; aspect-ratio: 4 / 3; border-radius: 6px; background: #eef0ed; object-fit: cover; }
.knowledge-image-grid span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .66rem; font-weight: 800; }
.knowledge-source-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-radius: 7px; background: #edf5f0; padding: 9px 10px; }
.knowledge-source-line.unpublished { background: #fff5e3; }
.knowledge-source-line > span { display: grid; min-width: 0; gap: 2px; }
.knowledge-source-line > a { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--brand-dark); padding: 7px 10px; font-size: .72rem; font-weight: 900; text-decoration: none; }
.knowledge-record-content > .operation-record-actions { justify-content: flex-end; }

.knowledge-blog-card {
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(18, 34, 25, .08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.knowledge-blog-card:hover { transform: translateY(-2px); box-shadow: 0 13px 32px rgba(18, 34, 25, .13); }
.knowledge-blog-card[open] { grid-column: 1 / -1; transform: none; }
.knowledge-blog-summary {
  grid-template-columns: 118px minmax(0, 1fr) 16px;
  align-items: stretch;
  min-height: 174px;
  gap: 12px;
  padding: 0 12px 0 0;
}
.knowledge-blog-cover {
  display: grid;
  place-items: center;
  min-height: 174px;
  overflow: hidden;
  border-radius: 12px 0 0 12px;
  background: linear-gradient(145deg, #e7eee9, #f7f3eb);
  color: var(--brand-dark);
}
.knowledge-blog-cover svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 1.4; opacity: .66; }
.knowledge-blog-cover img { width: 100%; height: 100%; min-height: 174px; object-fit: cover; }
.knowledge-blog-summary .knowledge-record-summary-main { align-content: center; gap: 5px; padding: 10px 0; }
.knowledge-blog-summary .knowledge-record-summary-main > strong { font-size: .94rem; }
.knowledge-blog-path { display: block; }
.knowledge-blog-summary p {
  display: -webkit-box;
  overflow: hidden;
  margin: 1px 0 0;
  color: #4f5954;
  font-size: .72rem;
  line-height: 1.52;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.knowledge-blog-tags,
.knowledge-blog-related { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 0; }
.knowledge-blog-tags b { color: #476554; font-size: .62rem; font-weight: 900; }
.knowledge-blog-related small { color: var(--muted); font-size: .6rem; font-weight: 900; }
.knowledge-blog-related span,
.knowledge-blog-related em {
  max-width: 125px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f0eb;
  color: var(--brand-dark);
  padding: 2px 6px;
  font-size: .6rem;
  font-style: normal;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.knowledge-read-more { color: var(--brand); font-size: .62rem; font-style: normal; font-weight: 900; }
.knowledge-blog-card[open] .knowledge-read-more { visibility: hidden; }
.knowledge-blog-card[open] .knowledge-blog-summary { min-height: 126px; border-bottom: 1px solid var(--line); background: #f7f9f6; }
.knowledge-blog-card[open] .knowledge-blog-cover,
.knowledge-blog-card[open] .knowledge-blog-cover img { min-height: 126px; }
.knowledge-related-project-list { display: grid; gap: 6px; border-top: 1px dashed var(--line); padding-top: 9px; }
.knowledge-related-project-list > small { color: var(--muted); font-size: .67rem; font-weight: 900; }
.knowledge-related-project-list > span { display: flex; flex-wrap: wrap; gap: 6px; }
.knowledge-related-project-list button { width: auto; min-height: 31px; border: 1px solid #cbdacf; border-radius: 999px; background: #eef5f0; color: var(--brand-dark); padding: 4px 10px; font-size: .7rem; font-weight: 900; }

.lighting-catalog-mode .operation-dashboard {
  display: block;
  padding: 16px 18px;
}

.lighting-catalog-mode .operation-workspace { display: block; }
.lighting-catalog-mode .operation-record-section { width: 100%; padding: 16px 18px 22px; }
.lighting-catalog-mode .operation-editor[hidden] { display: none; }
.lighting-catalog-mode.lighting-editor-open .operation-editor {
  position: fixed;
  z-index: 1250;
  inset: 50% auto auto 50%;
  display: block;
  width: min(760px, calc(100vw - 30px));
  max-height: min(88dvh, 790px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid #c8d6ce;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(10, 24, 16, .34);
  padding: 20px;
}

.lighting-type-menu { display: grid; gap: 12px; width: 100%; }
.lighting-type-menu-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}
.lighting-type-menu-heading > div:first-child { display: grid; gap: 2px; min-width: 0; }
.lighting-type-menu-heading strong { color: var(--brand-dark); font-size: .94rem; }
.lighting-type-menu-heading span { color: var(--muted); font-size: .7rem; font-weight: 800; }
.lighting-type-menu-heading > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.lighting-type-menu-heading button { width: auto; min-height: 40px; padding: 7px 12px; }
.lighting-show-all.active { border-color: var(--brand-dark); background: #e7efe9; color: var(--brand-dark); }

.lighting-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 9px;
}
.lighting-type-tile {
  position: relative;
  display: grid;
  grid-template-rows: minmax(76px, 1fr) auto;
  min-width: 0;
  min-height: 122px;
  overflow: hidden;
  border: 1px solid #d1ddd6;
  border-radius: 11px;
  background: #fff;
  color: var(--brand-dark);
  padding: 0;
  text-align: left;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.lighting-type-tile:hover,
.lighting-type-tile:focus-visible { border-color: var(--brand); box-shadow: 0 7px 18px rgba(22, 55, 39, .12); transform: translateY(-1px); }
.lighting-type-tile.active { border: 2px solid var(--brand-dark); box-shadow: inset 0 0 0 1px #fff; }
.lighting-type-tile.active::after {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-dark);
  color: #fff;
  content: "✓";
  font-size: .7rem;
  font-weight: 900;
}

.auth-provider-mark {
  border-color: #274c77;
  background: linear-gradient(145deg, #274c77, #4b7ba8);
  letter-spacing: 0.04em;
}
.lighting-type-art {
  display: grid;
  place-items: center;
  min-height: 76px;
  background: linear-gradient(145deg, #edf3ef, #f8f3e9);
  color: #3d6654;
  padding: 8px;
}
.lighting-type-tile:nth-child(3n + 2) .lighting-type-art { background: linear-gradient(145deg, #f4eee4, #edf3ef); }
.lighting-type-tile:nth-child(3n) .lighting-type-art { background: linear-gradient(145deg, #eaf1f0, #f7f2ec); }
.lighting-type-illustration { width: min(86px, 88%); height: auto; max-height: 68px; }
.lighting-type-copy { display: grid; min-width: 0; gap: 2px; border-top: 1px solid #e1e8e3; padding: 9px 10px; }
.lighting-type-copy strong { overflow: hidden; font-size: .76rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.lighting-type-copy small { color: var(--muted); font-size: .63rem; font-weight: 900; }

.lighting-catalog-mode .operation-records {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 11px;
}
.lighting-catalog-mode .operation-records > .empty { grid-column: 1 / -1; }
.lighting-catalog-record[open] { grid-column: 1 / -1; }

.lighting-catalog-summary {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 11px;
  min-height: 92px;
  padding: 9px 12px 9px 9px;
  cursor: pointer;
  list-style: none;
  color: var(--brand-dark);
}

.lighting-catalog-summary::-webkit-details-marker { display: none; }
.lighting-catalog-summary-copy { display: grid; min-width: 0; gap: 3px; }
.lighting-catalog-summary-copy > small { color: #4f7664; font-size: .64rem; font-weight: 900; }
.lighting-catalog-summary-copy > strong { overflow: hidden; font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.lighting-catalog-summary-copy > span { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: .69rem; font-weight: 800; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.lighting-catalog-summary i {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--brand);
  transition: transform .18s ease;
}

.lighting-catalog-record[open] .lighting-catalog-summary i { transform: rotate(180deg); }
.lighting-catalog-record[open] .lighting-catalog-summary { border-bottom: 1px solid var(--line); background: #f4f8f5; }
.lighting-catalog-content { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 11px; }
.lighting-catalog-content > .operation-record-body { align-content: start; }
.lighting-catalog-content .operation-record-field b { white-space: pre-line; }

.lighting-image-frame,
.lighting-gallery-image {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d9e1dc;
  border-radius: 8px;
  background: #f1f4f2;
  color: #678273;
}
.lighting-image-frame.summary { width: 76px; height: 72px; }
.lighting-image-fallback { display: grid; place-items: center; width: 100%; height: 100%; padding: 7px; }
.lighting-image-frame img,
.lighting-gallery-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  object-fit: contain;
}
.lighting-image-frame .lighting-type-illustration,
.lighting-gallery-image .lighting-type-illustration { width: 78%; opacity: .7; }
.lighting-image-frame.image-unavailable img,
.lighting-gallery-image.image-unavailable img { display: none; }

.lighting-reference-gallery { display: grid; grid-column: 1 / -1; gap: 7px; border-bottom: 1px dashed #d7e1db; padding-bottom: 10px; }
.lighting-reference-gallery > header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.lighting-reference-gallery > header strong { color: var(--brand-dark); font-size: .76rem; }
.lighting-reference-gallery > header span { color: var(--muted); font-size: .65rem; font-weight: 900; }
.lighting-reference-gallery > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.lighting-reference-gallery a { display: grid; min-width: 0; gap: 4px; color: var(--muted); text-decoration: none; }
.lighting-reference-gallery a:hover .lighting-gallery-image,
.lighting-reference-gallery a:focus-visible .lighting-gallery-image { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(36, 92, 74, .12); }
.lighting-reference-gallery small { overflow: hidden; padding-inline: 2px; font-size: .6rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.lighting-gallery-image { aspect-ratio: 4 / 3; width: 100%; }

.assignment-record-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-right: 9px;
}

.assignment-record-summary {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1.1fr) minmax(0, 1.35fr) minmax(0, .85fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  border-radius: 0;
  background: transparent;
  color: var(--brand-dark);
  padding: 10px 12px;
  text-align: left;
}

.assignment-record-summary:hover,
.assignment-record-summary:focus-visible { background: #f4f8f5; }
.assignment-record-summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .84rem;
  font-weight: 900;
}
.assignment-summary-date {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: .03em;
}
.assignment-summary-project,
.assignment-summary-item,
.assignment-summary-person {
  border-left: 1px solid #d8e3dd;
  padding-left: 8px;
}

.assignment-record-summary i {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--brand);
  transition: transform .18s ease;
}

.assignment-record.is-open .assignment-record-header {
  border-bottom: 1px solid var(--line);
  background: #f4f8f5;
}
.assignment-record.is-open .assignment-record-summary i { transform: rotate(180deg); }
.assignment-record-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 11px;
}
.assignment-record-content[hidden] { display: none; }
.assignment-record-status-control {
  display: grid;
  gap: 3px;
  width: 78px;
  min-width: 0;
}
.assignment-report-badge {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: #dff2e6;
  color: #17633e;
  padding: 4px 3px;
  box-sizing: border-box;
  font-size: .62rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.assignment-complete-button {
  width: 100%;
  min-height: 32px;
  padding: 0 6px;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}
.assignment-status-badge {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1ef;
  color: var(--muted);
  padding: 5px 6px;
  font-size: .7rem;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}
.assignment-status-badge.is-complete { background: #dff2e6; color: #17633e; }
.assignment-status-badge.is-cancelled { background: #f2e2dd; color: var(--accent); }

@media (max-width: 1080px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    max-height: none;
    padding: 12px;
  }

  .sidebar-heading {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 0 4px 10px;
  }

  .sidebar-heading > span,
  .sidebar-heading p {
    display: none;
  }

  .function-grid {
    display: flex;
    align-items: flex-start;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1px 2px 7px;
    scroll-snap-type: x proximity;
  }

  .sidebar-group {
    flex: 0 0 232px;
    scroll-snap-align: start;
  }

  .function-card {
    width: 100%;
  }

  .function-card:hover:not(:disabled),
  .function-card:focus-visible {
    transform: translateY(-3px);
  }
}

@media (max-width: 860px) {
  .topbar,
  .section-heading,
  .card,
  .search-option {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics,
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .purchase-order-header,
  .purchase-item-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-order-header > *,
  .purchase-item-fields > * {
    grid-column: auto;
  }

  .purchase-header-notes,
  .purchase-header-main-image,
  .purchase-item-link,
  .purchase-item-notes,
  .purchase-item-image {
    grid-column: span 2;
  }

  .wide {
    grid-column: span 2;
  }

  .operation-workspace { grid-template-columns: 1fr; }
  .operation-editor { position: static; border-right: 0; border-bottom: 1px solid var(--line); }
  .acceptance-builder { grid-template-columns: 1fr; }
  .acceptance-preview {
    border-top: 1px solid #cfe0d6;
    border-left: 0;
    padding-top: 13px;
    padding-left: 0;
  }
  .acceptance-document-mode .operation-editor { border-bottom: 0; }
}

@media (max-width: 560px) {
  .app-shell {
    width: calc(100% - 14px);
    padding-top: 12px;
  }

  .topbar {
    border-radius: 12px;
    padding: 13px;
  }

  .workspace-layout {
    gap: 12px;
  }

  .app-sidebar,
  .workspace-page {
    border-radius: 12px;
  }

  .workspace-page {
    min-height: auto;
    padding: 12px;
  }

  .modal.workspace-embedded > .modal-panel {
    min-height: auto;
    border-radius: 12px;
  }

  .modal.workspace-embedded .modal-close {
    width: 100%;
  }

  .function-card {
    flex-basis: 194px;
  }

  .modal-panel.auth-panel {
    max-height: calc(100dvh - 16px);
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  }

  .auth-heading,
  .auth-account-card,
  .auth-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-status-badge {
    align-self: flex-start;
  }

  .auth-actions > * {
    width: 100%;
  }

  .auth-provider-actions {
    grid-template-columns: 1fr;
  }

  .auth-actions {
    position: sticky;
    bottom: calc(-16px - env(safe-area-inset-bottom));
    z-index: 2;
    margin-inline: -16px;
    margin-bottom: calc(-16px - env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 20px rgba(22, 32, 28, 0.08);
  }

  .auth-modal[data-auth-view="ready"] .auth-heading {
    align-items: center;
    flex-direction: row;
  }

  .auth-modal[data-auth-view="ready"] .auth-heading-copy {
    flex: 1 1 auto;
  }

  .auth-modal[data-auth-view="ready"] #closeAuthDialogButton {
    flex: 0 0 auto;
    width: auto;
  }

  .auth-modal[data-auth-view="ready"] .auth-account-card {
    align-items: center;
    flex-direction: row;
  }

  .auth-modal[data-auth-view="ready"] .auth-actions {
    position: static;
    grid-template-columns: minmax(0, 1fr);
    margin: 16px 0 0;
    border: 0;
    padding: 0;
    box-shadow: none;
  }

  .metrics,
  .form-grid,
  .search-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .wide {
    grid-column: auto;
  }

  .project-resource-sections {
    grid-template-columns: 1fr;
  }

  .acceptance-preview-heading,
  .acceptance-preview-title,
  .acceptance-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .acceptance-preview-basic,
  .acceptance-preview-sections {
    grid-template-columns: 1fr;
  }

  .acceptance-preview-basic > div:nth-child(3) { grid-column: auto; }
  .acceptance-preview-title small { text-align: left; }
  .acceptance-preview-sheet { padding: 13px; }

  .contractor-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 34px;
  }

  .contractor-row .compact-symbol-button {
    grid-column: 3;
    grid-row: 1 / span 2;
    height: 100%;
  }

  .project-resource-source-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .project-resource-source-heading small { text-align: left; }

  .material-row { grid-template-columns: 1fr; }

  .date-range-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .issue-entry-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .issue-entry-row,
  .issue-existing-row {
    grid-template-columns: 1fr;
  }

  .report-work-entry {
    grid-template-columns: 1fr;
  }

  .same-work-detail > label:first-child {
    grid-column: auto;
  }

  .report-work-actions {
    grid-template-columns: 1fr;
  }

  .report-work-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .report-work-heading-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .report-work-delete {
    width: 100%;
    border-radius: 6px;
  }

  .report-photo-upload-row {
    grid-template-columns: 1fr;
  }

  .compact-file-field input[type="file"] {
    max-width: none;
  }

  .report-image-delete { width: 100%; border-radius: 6px; }

  .issue-row-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .project-issue-item {
    grid-template-columns: 1fr;
  }

  .project-issue-wide {
    grid-column: auto;
  }

  .panel {
    padding: 14px;
  }

  .modal {
    padding: 8px;
  }

  .modal-panel {
    max-height: calc(100vh - 16px);
    padding: 14px;
  }

  .modal-heading {
    align-items: stretch;
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .operation-center-heading { position: static; }
  .operation-form-actions button,
  .operation-record-actions button,
  .operation-special-card > button { width: auto; }
  .operation-dashboard { padding: 10px 12px; }
  .operation-stat { flex: 1 1 110px; }
  .operation-chart { flex-basis: 100%; min-width: 0; border-left: 0; border-top: 1px solid var(--line); padding: 10px 0 0; }
  .operation-editor,
  .operation-record-section { padding: 13px; }
  .operation-fields,
  .operation-record-body,
  .purchase-order-header,
  .purchase-item-fields,
  .acceptance-fields { grid-template-columns: 1fr; }
  .purchase-order-header > *,
  .purchase-item-fields > * { grid-column: auto; }
  .operation-fields .wide,
  .operation-record-field.wide { grid-column: auto; }
  .operation-list-heading { align-items: stretch; flex-direction: column; }
  .operation-list-controls { justify-content: stretch; width: 100%; }
  .operation-list-controls select { flex: 0 0 148px; width: 148px; }
  .operation-list-controls input { flex: 1 1 auto; width: auto; }
  .operation-record { grid-template-columns: 1fr; }
  .access-role-merge-control { grid-template-columns: 1fr; }
  .access-role-merge-control button { width: 100%; }
  .operation-record-actions { justify-content: flex-end; }
  .repair-overview-record { grid-template-columns: 1fr; }
  .repair-dashboard { grid-template-columns: 1fr; }
  .repair-dashboard-integrity,
  .repair-dashboard-chart-grid { grid-template-columns: 1fr; }
  .repair-dashboard-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .repair-dashboard-active-list { grid-template-columns: 1fr; }
  .repair-dashboard-bars button { grid-template-columns: minmax(110px, .8fr) minmax(80px, 1.2fr); }
  .repair-overview-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .repair-overview-cell.content,
  .repair-overview-cell.result { grid-column: 1 / -1; }
  .repair-overview-cell b { white-space: normal; }
  .repair-overview-actions { justify-content: flex-start; }
  .lighting-catalog-content { grid-template-columns: 1fr; }
  .assignment-record-header { grid-template-columns: minmax(0, 1fr) 66px; gap: 5px; padding-right: 6px; }
  .assignment-record-content { grid-template-columns: 1fr; }
  .assignment-record-summary {
    grid-template-columns: 3.25rem minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, .8fr) 10px;
    gap: 4px;
    padding-inline: 7px;
  }
  .assignment-record-summary span { font-size: .72rem; }
  .assignment-summary-project,
  .assignment-summary-item,
  .assignment-summary-person { padding-left: 4px; }
  .assignment-record-status-control { width: 66px; }
  .assignment-complete-button { font-size: 1.05rem; }
  .purchase-order-record-content { grid-template-columns: 1fr; }
  .purchase-order-heading,
  .purchase-order-footer,
  .purchase-order-line { align-items: stretch; flex-direction: column; }
  .purchase-order-heading > button,
  .purchase-order-footer > button { width: 100%; }
  .purchase-order-preview-heading { align-items: flex-start; flex-direction: column; }
  .purchase-order-progress-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .purchase-order-thumb { align-self: flex-start; }
  .spec-item-row,
  .spec-note-row,
  .spec-note-editor { grid-template-columns: 1fr; }
  .spec-note-row { padding-left: 8px; }
  .operation-special-card { align-items: stretch; flex-direction: column; }
  .operation-special-card.operation-project-entry { grid-template-columns: 1fr; }
  .spec-import-card { grid-template-columns: 1fr; }
  .spec-import-card > div:first-child,
  .spec-import-preview { grid-column: auto; }
  .active-google-login,
  .user-context { width: 100%; }

  .project-overview-page .workspace-page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .project-year-filter {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 56px;
  }

  .project-year-filter select {
    min-height: 44px;
    font-size: 1rem;
  }

  .project-list-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .project-list-actions select {
    width: 100%;
    min-width: 0;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .metric {
    min-height: 82px;
    padding: 12px;
  }

  .metric strong {
    margin-top: 3px;
    font-size: 1.55rem;
  }

  .project-card-toggle {
    grid-template-columns: minmax(90px, 1fr) minmax(110px, 42%) 26px;
    gap: 8px;
  }

  .project-card.collapsed .project-card-toggle {
    grid-template-columns: minmax(88px, 0.8fr) minmax(0, 1.4fr) minmax(95px, 0.8fr) 22px;
  }

  .collapsed-header-meta {
    grid-template-columns: 1fr;
    gap: 3px;
    font-size: 0.66rem;
  }

  .collapsed-header-meta > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .collapsed-header-meta small {
    margin-right: 4px;
    font-size: 0.6rem;
  }

  .collapse-mark {
    border-right-width: 8px;
    border-bottom-width: 12px;
    border-left-width: 8px;
  }

  .work-strip.week-grid {
    padding: 4px;
    gap: 2px;
  }

  .work-day {
    min-height: 72px;
    padding: 5px 2px;
  }

  .work-day-date,
  .work-day-empty,
  .work-day-items span {
    font-size: 0.64rem;
  }

  .report-history-row {
    grid-template-columns: minmax(180px, 1fr) auto;
    overflow-x: auto;
  }

  .report-history-actions button {
    width: auto;
  }
}

.operation-assignee-field small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.line-bot-settings-panel {
  max-width: 1040px;
}

.line-bot-profile-picker {
  display: grid;
  gap: 11px;
  margin: 2px 0 16px;
}

.line-bot-profile-picker-heading,
.line-bot-profile-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.line-bot-profile-picker-heading > div,
.line-bot-profile-detail-heading > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.line-bot-profile-picker-heading strong,
.line-bot-profile-detail-heading h3 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 1rem;
}

.line-bot-profile-picker-heading span:not(.line-bot-profile-count),
.line-bot-profile-detail-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.55;
}

.line-bot-profile-count {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #d8cab4;
  border-radius: 999px;
  background: #faf6ef;
  color: #745a33;
  font-size: .68rem;
  font-weight: 900;
}

.line-bot-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.line-bot-profile-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 106px;
  padding: 14px 15px;
  border: 1px solid #d3d8d5;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff 0%, #f5f6f4 100%);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 6px 16px rgba(27, 36, 31, .06);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.line-bot-profile-card:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #b79056;
  box-shadow: 0 10px 22px rgba(27, 36, 31, .1);
}

.line-bot-profile-card.is-active {
  border-color: #a87a36;
  background: linear-gradient(145deg, #fffdf8 0%, #f5ecdc 100%);
  box-shadow: inset 0 0 0 1px rgba(168, 122, 54, .2), 0 9px 22px rgba(86, 61, 23, .1);
}

.line-bot-profile-card:focus-visible {
  outline: 3px solid rgba(183, 144, 86, .28);
  outline-offset: 3px;
}

.line-bot-profile-card:disabled {
  cursor: progress;
  opacity: .68;
}

.line-bot-profile-illustration {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid #c7d9cf;
  border-radius: 16px;
  background: #eaf5ef;
  color: #255d48;
}

.line-bot-profile-illustration.is-kd {
  border-color: #dbc7a9;
  background: #f3e6d1;
  color: #815c2a;
}

.line-bot-profile-illustration svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-bot-profile-card-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.line-bot-profile-card-copy strong {
  color: var(--brand-dark);
  font-size: .91rem;
}

.line-bot-profile-card-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-bot-profile-card-copy em {
  justify-self: start;
  margin-top: 2px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #ecefeb;
  color: #59645e;
  font-size: .64rem;
  font-style: normal;
  font-weight: 900;
}

.line-bot-profile-card.is-active .line-bot-profile-card-copy em {
  background: #e5d4b6;
  color: #6d4b1c;
}

.line-bot-profile-arrow {
  color: #8a8d8a;
  font-size: 1.35rem;
}

.line-bot-profile-detail {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 13px 14px;
  border: 1px solid #d7ddd9;
  border-radius: 12px;
  background: #fafbf9;
}

.line-bot-profile-detail-heading .eyebrow {
  margin: 0;
  color: #92703b;
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .14em;
}

.line-bot-capability-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 48%;
}

.line-bot-capability-badges span {
  padding: 4px 8px;
  border: 1px solid #c9dcd3;
  border-radius: 999px;
  background: #edf6f1;
  color: #315c4c;
  font-size: .66rem;
  font-weight: 800;
}

.line-bot-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin: 4px 0 18px;
}

.line-bot-status-grid > div {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faf8;
}

.line-bot-status-grid span {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.line-bot-status-grid strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.line-bot-status-grid strong.ready {
  color: #16733f;
}

.line-bot-status-grid strong.missing {
  color: #a84b21;
}

.line-bot-status-grid strong.warning {
  color: #9a6415;
}

.line-bot-status-grid > div[hidden],
.line-bot-settings-form [data-line-bot-capability][hidden],
.line-bot-managed-note[hidden],
#lineBotSettingsActions[hidden] {
  display: none !important;
}

.line-bot-settings-form {
  padding: 0;
}

.line-bot-capability-section,
.line-bot-knowledge-capture-admin {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid #d3ddd7;
  border-radius: 12px;
  background: #f8fbf9;
}

.line-bot-section-heading {
  display: grid;
  gap: 3px;
}

.line-bot-section-heading strong {
  color: var(--brand-dark);
  font-size: .9rem;
}

.line-bot-section-heading span {
  color: var(--muted);
  font-size: .73rem;
  line-height: 1.55;
}

.line-bot-ai-admin > .form-grid {
  padding: 0;
}

.line-bot-ai-test-action {
  justify-content: flex-start;
}

.line-bot-ai-test-action button {
  width: auto;
}

.line-bot-runtime-controls,
.line-bot-group-admin,
.line-bot-catalog-admin,
.line-bot-recovery-admin,
.line-bot-record-admin,
.line-bot-capture-preflight {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid #d9d3c8;
  border-radius: 12px;
  background: #fffdf8;
}

.line-bot-preflight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.line-bot-preflight-grid article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #e1ddd5;
  border-radius: 9px;
  background: #fff;
}

.line-bot-preflight-grid span {
  color: var(--muted);
  font-size: .7rem;
}

.line-bot-preflight-grid strong {
  color: #9a6415;
  font-size: .78rem;
  line-height: 1.4;
}

.line-bot-preflight-grid strong.ready { color: #16733f; }
.line-bot-preflight-grid strong.missing { color: #a84b21; }

.line-bot-runtime-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.line-bot-runtime-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8c4d2a;
  font-size: .78rem;
  font-weight: 900;
}

.line-bot-runtime-state::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.line-bot-runtime-state.is-enabled {
  color: #16733f;
}

.line-bot-group-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.line-bot-group-columns > div {
  min-width: 0;
}

.line-bot-group-columns h4 {
  margin: 0 0 7px;
  color: var(--brand-dark);
  font-size: .78rem;
}

.line-bot-group-list {
  display: grid;
  gap: 7px;
}

.line-bot-group-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e0ddd7;
  border-radius: 9px;
  background: #fff;
}

.line-bot-group-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.line-bot-group-row strong {
  overflow: hidden;
  color: #3d453f;
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-bot-group-row small {
  overflow: hidden;
  color: #8a8175;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-bot-group-row span,
.line-bot-empty-state,
.line-bot-group-unavailable,
.line-bot-directory-meta {
  margin: 0;
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.55;
}

.line-bot-group-row button {
  min-width: 58px;
  padding: 7px 10px;
  font-size: .72rem;
}

.line-bot-catalog-admin {
  display: grid;
  gap: 11px;
}

.line-bot-catalog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.line-bot-catalog-actions button {
  width: auto;
}

.line-bot-catalog-status {
  margin: 0;
  padding: 9px 10px;
  border-radius: 9px;
  background: #f7f4ed;
  color: #665333;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.55;
}

.line-bot-catalog-status.error {
  background: #fff0ec;
  color: #a34226;
}

.line-bot-catalog-review {
  display: grid;
  gap: 7px;
  max-height: 280px;
  overflow: auto;
}

.line-bot-catalog-review-row {
  display: grid;
  grid-template-columns: minmax(90px, .45fr) minmax(0, 1fr);
  gap: 8px 12px;
  padding: 9px 10px;
  border: 1px solid #e0ddd7;
  border-radius: 9px;
  background: #fff;
}

.line-bot-catalog-review-row strong {
  color: #6e4d1e;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .77rem;
}

.line-bot-catalog-review-row span {
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.5;
}

.line-bot-recovery-admin,
.line-bot-recovery-block,
.line-bot-recovery-list {
  display: grid;
  gap: 9px;
}

.line-bot-capture-rules {
  padding: 11px 13px;
  border: 1px solid #ded8cc;
  border-radius: 10px;
  background: #fff;
}

.line-bot-capture-rules summary {
  min-height: 28px;
  color: var(--brand-dark);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 850;
}

.line-bot-capture-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.line-bot-capture-rule-grid p {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 9px;
  border: 1px solid #e8e3d9;
  border-radius: 8px;
  background: #faf9f6;
}

.line-bot-capture-rule-grid strong,
.line-bot-message-template strong {
  color: #6e4d1e;
  font-size: .72rem;
}

.line-bot-capture-rule-grid span,
.line-bot-message-template {
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.55;
}

.line-bot-message-template {
  display: grid;
  grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
  gap: 10px;
  margin: 9px 0 0;
  align-items: start;
}

.line-bot-message-template code {
  display: block;
  padding: 8px 10px;
  border-radius: 7px;
  background: #f2efe8;
  color: #4d4437;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: normal;
}

.line-bot-record-admin,
.line-bot-record-list {
  display: grid;
  gap: 9px;
}

.line-bot-record-filters {
  display: grid;
  grid-template-columns: minmax(200px, 1.4fr) minmax(120px, .6fr) minmax(120px, .6fr) auto;
  align-items: end;
  gap: 8px;
}

.line-bot-record-filters button {
  width: auto;
  min-height: 42px;
}

.line-bot-record-summary {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f7f4ed;
  color: #665333;
  font-size: .7rem;
  font-weight: 750;
}

.line-bot-record-policy {
  margin: 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.55;
}

.line-bot-record-summary.error {
  background: #fff0ec;
  color: #a34226;
}

.line-bot-record-row {
  display: grid;
  gap: 7px;
  padding: 10px 11px;
  border: 1px solid #e0ddd7;
  border-radius: 9px;
  background: #fff;
}

.line-bot-record-row.is-voided {
  background: #f5f4f1;
  opacity: .82;
}

.line-bot-record-row-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.line-bot-record-row-heading > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.line-bot-record-row-heading strong {
  color: #3d453f;
  font-size: .78rem;
  overflow-wrap: anywhere;
}

.line-bot-record-row-heading small,
.line-bot-record-row p,
.line-bot-record-row details {
  margin: 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.line-bot-record-row-heading em {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: #efece5;
  color: #5f594f;
  font-size: .65rem;
  font-style: normal;
  font-weight: 850;
}

.line-bot-record-row-heading em.is-ready { background: #e9f6ee; color: #16733f; }
.line-bot-record-row-heading em.is-review { background: #fff2d7; color: #91600d; }
.line-bot-record-row-heading em.is-voided { background: #eee7e4; color: #8d3e2a; }

.line-bot-record-row details {
  padding: 7px 8px;
  border-radius: 7px;
  background: #faf9f6;
}

.line-bot-record-row summary {
  cursor: pointer;
  color: #6e4d1e;
  font-weight: 800;
}

.line-bot-record-row details p { margin-top: 6px; white-space: pre-wrap; }
.line-bot-record-void-detail { color: #8d3e2a !important; }

.line-bot-record-row-actions,
.line-bot-record-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
}

.line-bot-record-row-actions button,
.line-bot-record-pagination button {
  width: auto;
  min-height: 32px;
  padding: 6px 10px;
  font-size: .68rem;
}

.line-bot-record-row-actions .danger {
  border-color: #d5a495;
  background: #fff4f0;
  color: #9a3d25;
}

.line-bot-record-pagination span {
  color: var(--muted);
  font-size: .68rem;
}

.line-bot-recovery-block,
.line-bot-catalog-rollback {
  padding: 11px;
  border: 1px solid #e0ddd7;
  border-radius: 9px;
  background: #fff;
}

.line-bot-recovery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.line-bot-recovery-heading > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.line-bot-recovery-heading strong,
.line-bot-catalog-rollback summary {
  color: var(--brand-dark);
  font-size: .8rem;
  font-weight: 850;
}

.line-bot-recovery-heading small,
.line-bot-catalog-rollback p {
  margin: 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.5;
}

.line-bot-recovery-actions,
.line-bot-recovery-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.line-bot-recovery-actions button,
.line-bot-recovery-row button,
.line-bot-rollback-fields button {
  width: auto;
  min-height: 34px;
  padding: 7px 10px;
  font-size: .7rem;
}

.line-bot-recovery-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #e4e1db;
  border-radius: 8px;
  background: #fafaf8;
}

.line-bot-recovery-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.line-bot-recovery-row strong {
  color: #6e4d1e;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .75rem;
}

.line-bot-recovery-row span,
.line-bot-recovery-row small {
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.line-bot-catalog-rollback summary {
  min-height: 34px;
  cursor: pointer;
}

.line-bot-catalog-rollback p {
  margin-bottom: 9px;
}

.line-bot-rollback-fields {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.2fr) auto;
  align-items: end;
  gap: 8px;
}

.line-bot-empty-state,
.line-bot-group-unavailable {
  padding: 10px;
  border: 1px dashed #d6d3cc;
  border-radius: 9px;
  background: #faf9f6;
}

.line-bot-group-unavailable {
  color: #9a6415;
}

.line-bot-directory-meta {
  padding: 0 2px;
  text-align: right;
}

.line-bot-runtime-controls[hidden],
.line-bot-group-admin[hidden],
.line-bot-catalog-admin[hidden],
.line-bot-recovery-admin[hidden],
.line-bot-record-admin[hidden],
.line-bot-capture-preflight[hidden],
.line-bot-group-unavailable[hidden],
.line-bot-directory-meta[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .line-bot-preflight-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .line-bot-group-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .line-bot-capture-rule-grid,
  .line-bot-record-filters,
  .line-bot-message-template {
    grid-template-columns: minmax(0, 1fr);
  }

  .line-bot-record-filters button {
    width: 100%;
  }

  .line-bot-runtime-control-row {
    align-items: stretch;
    flex-direction: column;
  }

  .line-bot-runtime-control-row button {
    width: 100%;
  }

  .line-bot-catalog-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .line-bot-catalog-actions button {
    width: 100%;
  }

  .line-bot-catalog-review-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .line-bot-recovery-heading,
  .line-bot-recovery-row {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
    flex-direction: column;
  }

  .line-bot-recovery-actions,
  .line-bot-recovery-row-actions,
  .line-bot-rollback-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .line-bot-recovery-actions button,
  .line-bot-recovery-row button,
  .line-bot-rollback-fields button {
    width: 100%;
  }
}

.line-bot-module-fieldset {
  margin: 0;
  padding: 13px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.line-bot-module-fieldset legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 0.83rem;
  font-weight: 800;
}

#lineBotAllowedModules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
}

#lineBotAllowedModules label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  color: var(--ink);
  font-size: 0.82rem;
}

.line-bot-clear-key {
  color: #922f26;
}

.line-bot-settings-form > .line-rich-menu-admin,
.line-bot-settings-form > .line-bot-capability-section,
.line-bot-settings-form > .line-bot-knowledge-capture-admin,
.line-bot-settings-form > .line-bot-module-fieldset,
.line-bot-settings-form > .line-bot-security-note,
.line-bot-settings-form > .line-bot-managed-note,
.line-bot-settings-form > .form-actions,
.line-bot-settings-form > .save-feedback {
  grid-column: 1 / -1;
}

.access-role-mode .operation-dashboard { display: none; }
.access-role-mode #operationSpecialActions { width: 100%; }
.access-role-mode .operation-record-section[hidden],
.access-role-mode #operationForm[hidden] { display: none; }

.access-role-hub,
.access-role-subview { display: grid; gap: 16px; min-width: 0; }
.access-role-hub-heading { display: grid; gap: 4px; padding: 2px 2px 4px; }
.access-role-hub-heading p,
.access-role-subview-heading p { margin: 0; color: #92703b; font-size: .66rem; font-weight: 900; letter-spacing: .14em; }
.access-role-hub-heading h3,
.access-role-subview-heading h3 { margin: 0; color: var(--brand-dark); font-size: 1.16rem; }
.access-role-hub-heading > span,
.access-role-subview-heading > div > span { color: var(--muted); font-size: .78rem; line-height: 1.55; }

.access-role-menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.access-role-menu-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  min-height: 184px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid #d1d6d3;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff 0%, #f4f4f1 100%);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 7px 18px rgba(28, 35, 31, .07);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.access-role-menu-card:hover:not(:disabled) { transform: translateY(-2px); border-color: #b79056; box-shadow: 0 11px 24px rgba(28, 35, 31, .11); }
.access-role-menu-card:focus-visible { outline: 3px solid rgba(183, 144, 86, .28); outline-offset: 3px; }
.access-role-menu-card:disabled { cursor: not-allowed; opacity: .58; }
.access-role-menu-illustration,
.access-role-subview-illustration {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid #d8cab4;
  border-radius: 18px;
  background: #eee6d9;
  color: #745a33;
}
.access-role-menu-illustration svg,
.access-role-subview-illustration svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.access-role-menu-copy { display: grid; gap: 5px; min-width: 0; }
.access-role-menu-copy strong { color: var(--brand-dark); font-size: .96rem; }
.access-role-menu-copy small { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: .72rem; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.access-role-menu-copy em { margin-top: 3px; color: #87683b; font-size: .68rem; font-style: normal; font-weight: 900; }
.access-role-menu-arrow { position: absolute; top: 17px; right: 16px; color: #8a8d8a; font-size: 1.35rem; line-height: 1; }

.access-role-subview-heading { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 13px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.access-role-subview-heading > div { display: grid; gap: 3px; min-width: 0; }
.access-role-subview-heading h3:focus-visible { outline: 3px solid rgba(183, 144, 86, .28); outline-offset: 4px; border-radius: 4px; }
.access-role-subview-illustration { width: 54px; height: 54px; border-radius: 14px; }
.access-role-subview-illustration svg { width: 28px; height: 28px; }
.access-role-back-button { align-self: stretch; width: auto; min-height: 44px; white-space: nowrap; }
.access-role-subview-body { display: grid; gap: 14px; min-width: 0; }

.access-role-account-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.access-role-account-overview > div { display: grid; gap: 3px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f7f8f6; }
.access-role-account-overview strong { color: var(--brand-dark); font-size: 1.2rem; }
.access-role-account-overview span { color: var(--muted); font-size: .7rem; font-weight: 800; }
.access-role-account-guidance { margin: 0; padding: 11px 12px; border-left: 4px solid #b79056; border-radius: 0 8px 8px 0; background: #faf6ef; color: #65543c; font-size: .76rem; line-height: 1.55; }

.role-permission-card,
.role-permission-panel { display: grid; gap: 14px; min-width: 0; }
.role-permission-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.role-permission-heading > div { min-width: 0; }
.role-permission-heading strong { color: var(--brand-dark); font-size: 1rem; }
.role-permission-heading p { margin: 5px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.6; }
.role-permission-heading button { width: auto; flex: 0 0 auto; }
.role-permission-summaries { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.role-permission-summary { display: grid; align-content: start; gap: 5px; min-height: 82px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #f7faf8; }
.role-permission-summary strong { color: var(--brand-dark); font-size: .82rem; }
.role-permission-summary span { color: var(--muted); font-size: .7rem; line-height: 1.5; }
.role-permission-table-wrap { max-width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.role-permission-table { width: 100%; min-width: 820px; border-collapse: collapse; background: #fff; }
.role-permission-table th,
.role-permission-table td { padding: 8px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: middle; }
.role-permission-table th:last-child,
.role-permission-table td:last-child { border-right: 0; }
.role-permission-table thead th { position: sticky; top: 0; z-index: 1; background: #eaf4ee; color: var(--brand-dark); font-size: .75rem; }
.role-permission-table td:first-child { width: 40%; min-width: 290px; }
.role-permission-table td strong,
.role-permission-table td small,
.role-permission-table td em { display: block; }
.role-permission-table td strong { color: var(--ink); font-size: .78rem; }
.role-permission-table td small { margin-top: 2px; color: var(--muted); font-size: .69rem; line-height: 1.45; }
.role-permission-table td em { margin-top: 4px; color: #8a5b19; font-size: .66rem; font-style: normal; font-weight: 800; }
.role-permission-table select { min-width: 112px; min-height: 34px; padding: 6px 8px; font-size: .74rem; }
.role-permission-table select:disabled { cursor: not-allowed; opacity: .72; background: #edf0ee; }

.d3-daily-source-card { display: grid; gap: 12px; padding: 14px; border: 1px solid #c9dcd3; border-radius: 12px; background: #f4faf7; }
.d3-daily-source-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.d3-daily-source-heading > div { min-width: 0; }
.d3-daily-source-heading strong { display: block; color: var(--brand-dark); font-size: 1rem; }
.d3-daily-source-heading p { margin: 5px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.6; }
.d3-daily-source-heading > span { flex: 0 0 auto; color: #527266; font-size: .7rem; font-weight: 800; line-height: 1.5; text-align: right; }
.d3-daily-source-fields { grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr) auto; align-items: end; }
.d3-daily-source-fields .wide { grid-column: auto; }
.d3-daily-source-fields button { width: auto; min-height: 42px; white-space: nowrap; }
.d3-daily-source-note { margin: 0; color: #527266; font-size: .72rem; line-height: 1.55; }

.line-conversation-simulator-card { display: grid; gap: 12px; padding: 14px; border: 1px solid #b9d8c7; border-radius: 12px; background: #eef8f2; }
.line-conversation-simulator-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.line-conversation-simulator-heading > div { min-width: 0; }
.line-conversation-simulator-heading strong { display: block; color: #126f3b; font-size: 1rem; }
.line-conversation-simulator-heading p { margin: 5px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.6; }
.line-conversation-simulator-heading > span { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; background: #d7f0df; color: #126f3b; font-size: .68rem; font-weight: 900; }
.line-simulator-controls { display: grid; grid-template-columns: minmax(230px, .8fr) minmax(0, 1.7fr) auto; align-items: end; gap: 10px; }
.line-simulator-controls .wide { grid-column: auto; }
.line-simulator-controls textarea { min-height: 42px; max-height: 110px; resize: vertical; }
.line-simulator-controls button { width: auto; min-height: 42px; white-space: nowrap; }
.line-simulator-presets { display: flex; flex-wrap: wrap; gap: 7px; }
.line-simulator-presets button { width: auto; min-height: 30px; padding: 5px 10px; border: 1px solid #a9cbbb; border-radius: 999px; background: #fff; color: #245c4a; font-size: .72rem; font-weight: 800; }
.line-simulator-presets button:hover { background: #e1f2e8; }
.line-simulator-output { min-width: 0; overflow: hidden; padding: 12px; border: 1px solid #c7d7cf; border-radius: 12px; background: #dfe8e3; }
.line-simulator-empty { margin: 0; color: #587066; font-size: .76rem; line-height: 1.55; text-align: center; }
.line-simulator-result-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; margin-bottom: 10px; color: #426056; font-size: .7rem; }
.line-simulator-result-meta strong { color: #183f31; font-size: .82rem; }
.line-simulator-result-meta em { margin-left: auto; font-style: normal; font-weight: 800; }
.line-simulator-chat { display: grid; justify-items: start; gap: 8px; }
.line-simulator-text-bubble { max-width: min(680px, 92%); padding: 10px 12px; border-radius: 4px 14px 14px 14px; background: #fff; color: #24352f; font-size: .78rem; line-height: 1.55; box-shadow: 0 2px 8px rgba(29,62,49,.08); }
.line-simulator-card-strip { display: flex; gap: 10px; margin-top: 10px; padding-bottom: 5px; overflow-x: auto; scroll-snap-type: x proximity; }
.line-simulator-flex-card { flex: 0 0 300px; max-width: 86vw; overflow: hidden; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(29,62,49,.12); scroll-snap-align: start; }
.line-simulator-flex-card > header { display: grid; gap: 3px; padding: 11px 12px; background: #245c4a; color: #fff; }
.line-simulator-flex-card > header strong { overflow: hidden; font-size: .76rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.line-simulator-flex-body { display: grid; gap: 7px; padding: 11px 12px; }
.line-simulator-flex-body > div { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 7px; padding-bottom: 6px; border-bottom: 1px solid rgba(36,92,74,.11); }
.line-simulator-flex-body > div:last-child { padding-bottom: 0; border-bottom: 0; }
.line-simulator-flex-body b { color: #527266; font-size: .67rem; }
.line-simulator-flex-body span { color: #273c34; font-size: .7rem; line-height: 1.45; white-space: pre-wrap; }
.line-simulator-flex-card > footer { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 10px; border-top: 1px solid #e2e9e5; background: inherit; }
.line-simulator-flex-card > footer span { flex: 1 1 calc(50% - 6px); padding: 6px; border: 1px solid #8ebaa5; border-radius: 6px; color: #245c4a; font-size: .66rem; font-weight: 900; text-align: center; }

.line-rich-menu-admin {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, .9fr) auto;
  align-items: end;
  gap: 12px;
  border: 1px solid #c9dcd3;
  border-radius: 12px;
  background: #f5faf7;
  padding: 13px 14px;
}

.line-rich-menu-admin > div { align-self: center; }
.line-rich-menu-admin > div strong,
.line-rich-menu-admin > div span { display: block; }
.line-rich-menu-admin > div strong { margin-bottom: 3px; color: var(--brand-dark); }
.line-rich-menu-admin > div span { color: var(--muted); font-size: .76rem; line-height: 1.5; }
.line-rich-menu-admin button { width: auto; min-height: 42px; }

.line-bot-knowledge-capture-admin {
  border-color: #d8c6a8;
  background: #fcf8f1;
}

.line-bot-knowledge-capture-admin input[readonly] {
  cursor: text;
  background: #fff;
  color: #4d4436;
}

.line-bot-capture-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.line-bot-capture-notes p {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 10px 11px;
  border: 1px solid #e0d5c3;
  border-radius: 9px;
  background: rgba(255, 255, 255, .78);
}

.line-bot-capture-notes strong {
  color: #70542d;
  font-size: .72rem;
}

.line-bot-capture-notes p span {
  color: var(--muted);
  font-size: .69rem;
  line-height: 1.5;
}

.line-bot-managed-note {
  margin: 0;
  padding: 11px 13px;
  border-left: 4px solid #b79056;
  border-radius: 0 8px 8px 0;
  background: #faf6ef;
  color: #65543c;
  font-size: .74rem;
  line-height: 1.6;
}

.line-bot-security-note {
  padding: 12px 14px;
  border: 1px solid #c9dcd3;
  border-radius: 12px;
  background: #eef7f2;
  color: #305447;
  font-size: 0.8rem;
  line-height: 1.65;
}

@media (max-width: 760px), (max-device-width: 760px), (hover: none) and (pointer: coarse) {
  .line-bot-profile-picker-heading,
  .line-bot-profile-detail-heading {
    align-items: stretch;
  }

  .line-bot-profile-grid,
  .line-bot-status-grid {
    grid-template-columns: 1fr;
  }

  .line-bot-profile-card {
    min-height: 92px;
    padding: 12px;
  }

  .line-bot-profile-illustration {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }

  .line-bot-profile-illustration svg {
    width: 26px;
    height: 26px;
  }

  .line-bot-capability-badges {
    justify-content: flex-start;
    max-width: none;
  }

  .line-bot-capture-notes {
    grid-template-columns: 1fr;
  }

  #lineBotAllowedModules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .line-rich-menu-admin { grid-template-columns: 1fr; align-items: stretch; }
  .line-rich-menu-admin button { width: 100%; }
  .access-role-menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .access-role-menu-card { min-height: 168px; gap: 9px; padding: 12px; border-radius: 12px; }
  .access-role-menu-illustration { width: 54px; height: 54px; border-radius: 14px; }
  .access-role-menu-illustration svg { width: 28px; height: 28px; }
  .access-role-menu-copy strong { padding-right: 12px; font-size: .84rem; }
  .access-role-menu-copy small { font-size: .67rem; -webkit-line-clamp: 3; }
  .access-role-menu-copy em { font-size: .63rem; }
  .access-role-menu-arrow { top: 13px; right: 12px; }
  .access-role-subview-heading { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .access-role-back-button { grid-column: 1 / -1; justify-self: start; }
  .access-role-account-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .role-permission-heading { display: grid; }
  .role-permission-heading button { width: 100%; }
  .role-permission-summaries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d3-daily-source-heading { display: grid; gap: 8px; }
  .d3-daily-source-heading > span { text-align: left; }
  .d3-daily-source-fields { grid-template-columns: 1fr; align-items: stretch; }
  .d3-daily-source-fields .wide { grid-column: auto; }
  .d3-daily-source-fields button { width: 100%; }
  .line-conversation-simulator-heading { display: grid; gap: 8px; }
  .line-conversation-simulator-heading > span { justify-self: start; }
  .line-simulator-controls { grid-template-columns: 1fr; align-items: stretch; }
  .line-simulator-controls .wide { grid-column: auto; }
  .line-simulator-controls button { width: 100%; }
  .line-simulator-result-meta em { width: 100%; margin-left: 0; }
}

/* Simple Design Studio brand alignment: monochrome structure with warm-gold detail. */
::selection {
  background: rgba(200, 160, 99, 0.28);
  color: #111;
}

body {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.68), transparent 38%),
    #efefec;
}

h1,
h2,
.card-title {
  font-weight: 500;
  letter-spacing: 0.025em;
}

.topbar {
  border: 1px solid #d7d5d0;
  border-top: 3px solid #1f1f1f;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.94);
  padding: 17px 20px;
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.045);
  backdrop-filter: none;
}

.brand-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #777673;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.brand-eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: #c8a063;
}

.app-sidebar {
  border: 1px solid #d7d5d0;
  border-radius: 2px;
  background: #fff;
  color: #111;
  box-shadow: 0 18px 38px rgba(17, 17, 17, 0.1);
}

.sidebar-heading > span {
  color: #111;
  font-weight: 500;
  letter-spacing: 0.2em;
}

.sidebar-heading h2 {
  color: #111;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.sidebar-heading p {
  color: #444;
}

.sidebar-group {
  border-top: 1px solid #e4e3df;
  border-radius: 0;
  background: transparent;
}

.sidebar-group-toggle {
  border-radius: 0;
  color: #111;
  font-weight: 500;
  transition: color 300ms ease-out, background-color 300ms ease-out;
}

.sidebar-group-toggle:hover,
.sidebar-group-toggle:focus-visible {
  background: #f2f2f0;
  color: #000;
}

.sidebar-group.expanded > .sidebar-group-toggle {
  background: #f2f2f0;
  color: #111;
}

.function-grid {
  scrollbar-color: #777 transparent;
}

.sidebar-group-title svg {
  color: #111;
}

.function-card {
  border-radius: 2px;
  border-color: #e1e0dc;
  background: #fff;
  color: #111;
  transition: transform 300ms ease-out, background-color 300ms ease-out, border-color 300ms ease-out, box-shadow 300ms ease-out;
}

.function-card:hover:not(:disabled),
.function-card:focus-visible {
  border-color: #1f1f1f;
  background: #f2f2f0;
  box-shadow: none;
  transform: translateX(4px);
}

.function-card.active {
  border-color: #1f1f1f;
  border-left: 3px solid #c8a063;
  background: #ededeb;
  color: #111;
  box-shadow: none;
}

.function-card.active:hover,
.function-card.active:focus-visible {
  border-color: #1f1f1f;
  border-left-color: #c8a063;
  background: #e5e5e2;
  color: #111;
}

.function-icon {
  border: 1px solid #aaa8a3;
  border-radius: 1px;
  background: #fff;
  color: #111;
}

.function-card.active .function-icon {
  border-color: #1f1f1f;
  background: #fff;
  color: #111;
}

.function-card.active .function-card-copy > strong {
  color: #555;
}

.function-card-copy > strong {
  color: #666;
}

.function-arrow,
.function-card.active .function-arrow,
.function-card:hover:not(:disabled) .function-arrow,
.function-card:focus-visible .function-arrow {
  color: #111;
}

.function-card:hover:not(:disabled) .function-icon,
.function-card:focus-visible .function-icon {
  background: #f2f2f0;
  color: #111;
}

.mobile-navigation-scroll-hint {
  display: none;
}

.workspace-page,
.modal.workspace-embedded > .modal-panel {
  border-color: #d7d5d0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(17, 17, 17, 0.05);
}

.workspace-page,
.modal.workspace-embedded.open > .modal-panel {
  /* A filled transform makes the panel a containing block for fixed dialogs. */
  animation: brand-page-enter 420ms ease-out backwards;
}

@keyframes brand-page-enter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

html:has(.lr-ca-conflict-shade, .lr-k-conflict-overlay, .lr-delete-overlay, .lr-pdf-overlay),
body:has(.lr-ca-conflict-shade, .lr-k-conflict-overlay, .lr-delete-overlay, .lr-pdf-overlay) {
  overflow: hidden;
}

.panel,
.card {
  border-color: #d7d5d0;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(17, 17, 17, 0.04);
}

.metric {
  border-radius: 2px;
  box-shadow: 0 5px 14px rgba(17, 17, 17, 0.045);
  transition: transform 300ms ease-out, border-color 300ms ease-out, box-shadow 300ms ease-out;
}

button.metric:hover:not(:disabled) {
  border-color: #777673;
  box-shadow: 0 10px 20px rgba(17, 17, 17, 0.08);
  transform: translateY(-2px);
}

button.metric.active {
  border-color: #1f1f1f;
  box-shadow: inset 0 -3px 0 #c8a063, 0 8px 18px rgba(17, 17, 17, 0.08);
}

.project-card {
  transition: border-color 300ms ease-out, box-shadow 300ms ease-out, transform 300ms ease-out;
}

.project-card:hover {
  border-color: #aaa8a3;
  box-shadow: 0 11px 24px rgba(17, 17, 17, 0.07);
  transform: translateY(-1px);
}

button {
  border-radius: 2px;
  font-weight: 600;
  transition: color 300ms ease-out, background-color 300ms ease-out, border-color 300ms ease-out, box-shadow 300ms ease-out, transform 300ms ease-out;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid #c8a063;
  outline-offset: 3px;
}

button:not(:disabled):active {
  transform: translateY(0) scale(0.985);
}

.primary {
  border: 1px solid #1f1f1f;
  background: #1f1f1f;
  color: #fff;
  box-shadow: inset 0 -2px 0 #c8a063;
}

.primary:hover:not(:disabled) {
  border-color: #444;
  background: #444;
  box-shadow: inset 0 -2px 0 #c8a063, 0 7px 16px rgba(17, 17, 17, 0.14);
  transform: translateY(-1px);
}

.ghost {
  border: 1px solid #d3d1cc;
  background: #f7f6f3;
  color: #1f1f1f;
}

.ghost:hover:not(:disabled) {
  border-color: #1f1f1f;
  background: #1f1f1f;
  color: #fff;
  transform: translateY(-1px);
}

.danger {
  border: 1px solid #c8b1aa;
  background: #f6eeeb;
  color: #74483c;
}

input,
select,
textarea {
  border-color: #d3d1cc;
  border-radius: 2px;
  background: #fff;
  transition: border-color 300ms ease-out, box-shadow 300ms ease-out, background-color 300ms ease-out;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #1f1f1f;
  box-shadow: 0 0 0 2px rgba(200, 160, 99, 0.28);
}

.operation-dashboard {
  background: #f3f2ef;
}

.hardware-calculator-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}

.hardware-calculator-heading {
  align-items: flex-start;
}

.hardware-heading-actions,
.hardware-record-tools,
.hardware-submit-actions,
.hardware-table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.hardware-status-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid #d3d1cc;
  border-radius: 999px;
  background: #f3f2ef;
  color: #777673;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
}

.hardware-status-pill.success {
  border-color: #adc7b5;
  background: #edf5ef;
  color: #245c4a;
}

.hardware-status-pill.error {
  border-color: #d6b5ad;
  background: #f8eeeb;
  color: #874c40;
}

.hardware-status-pill.busy {
  border-color: #c8a063;
  background: #f8f2e8;
  color: #5b4930;
}

.hardware-panel,
.hardware-submit-panel {
  border: 1px solid #d7d5d0;
  border-radius: 2px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 7px 20px rgba(17, 17, 17, 0.035);
}

.hardware-section-heading,
.hardware-submit-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.hardware-section-heading {
  margin-bottom: 14px;
}

.hardware-section-heading h3,
.hardware-submit-panel h3 {
  margin: 0;
  color: #1f1f1f;
  font-size: 1.05rem;
  font-weight: 650;
}

.hardware-section-heading p,
.hardware-submit-panel p {
  margin: 5px 0 0;
  color: #777673;
  font-size: 0.82rem;
}

.hardware-record-tools > label {
  min-width: 126px;
}

.hardware-record-tools input {
  width: 126px;
}

.hardware-project-grid,
.hardware-settings-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
}

.hardware-project-grid label,
.hardware-settings-grid label,
.hardware-record-tools label,
.hardware-quick-add label {
  display: grid;
  gap: 5px;
  color: #555451;
  font-size: 0.76rem;
  font-weight: 700;
}

.hardware-project-grid .hardware-wide {
  grid-column: span 2;
}

.hardware-clearable-input {
  position: relative;
  display: block;
}

.hardware-clearable-input input {
  width: 100%;
  padding-right: 34px;
}

.hardware-clearable-input button {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 24px;
  height: 24px;
  min-height: 0;
  border: 0;
  border-radius: 50%;
  background: #e6e4df;
  color: #555451;
  padding: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-50%);
}

.hardware-clearable-input button:hover {
  background: #1f1f1f;
  color: #fff;
}

.hardware-clearable-input button[hidden] {
  display: none !important;
}

#hardwareProjectDataBody[hidden] {
  display: none !important;
}

.hardware-record-history {
  margin-top: 14px;
  border-top: 1px solid #e2e0dc;
  padding-top: 12px;
}

.hardware-record-history[hidden] {
  display: none !important;
}

.hardware-record-history-heading,
.hardware-history-item,
.hardware-history-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hardware-record-history-heading {
  justify-content: space-between;
  margin-bottom: 8px;
  color: #3d3c39;
  font-size: 0.8rem;
}

.hardware-record-history-list {
  display: grid;
  gap: 6px;
}

.hardware-history-item {
  justify-content: space-between;
  border: 1px solid #deddd9;
  background: #faf9f7;
  padding: 8px 10px;
}

.hardware-history-item > div:first-child {
  display: grid;
  gap: 2px;
}

.hardware-history-item strong {
  color: #1f1f1f;
  font-size: 0.79rem;
}

.hardware-history-item span {
  color: #777673;
  font-size: 0.7rem;
}

.hardware-history-actions a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 10px;
  text-decoration: none;
}

.hardware-settings {
  margin-top: 14px;
  border-top: 1px solid #e2e0dc;
  padding-top: 12px;
}

.hardware-settings summary {
  cursor: pointer;
  color: #1f1f1f;
  font-size: 0.84rem;
  font-weight: 700;
}

.hardware-settings-grid {
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  margin-top: 12px;
}

.hardware-settings-grid .hardware-settings-wide {
  grid-column: span 2;
}

.hardware-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 8px;
}

.hardware-metrics span {
  border-left: 2px solid #c8a063;
  color: #777673;
  padding-left: 9px;
  font-size: 0.7rem;
}

.hardware-metrics strong {
  display: block;
  margin-top: 3px;
  color: #1f1f1f;
  font-size: 0.92rem;
}

.hardware-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #deddd9;
}

.hardware-line-table {
  width: 100%;
  min-width: 1260px;
  border-collapse: collapse;
  table-layout: fixed;
}

.hardware-line-table th,
.hardware-line-table td {
  border-right: 1px solid #e4e2de;
  border-bottom: 1px solid #e4e2de;
  padding: 5px;
  text-align: center;
  vertical-align: middle;
}

.hardware-line-table th {
  background: #f3f2ef;
  color: #575653;
  font-size: 0.71rem;
  font-weight: 700;
  white-space: nowrap;
}

.hardware-line-table th:nth-child(1) { width: 58px; }
.hardware-line-table th:nth-child(2) { width: 120px; }
.hardware-line-table th:nth-child(3) { width: 190px; }
.hardware-line-table th:nth-child(n+4):nth-child(-n+12) { width: 74px; }
.hardware-line-table th:nth-child(13) { width: 72px; }
.hardware-line-table th:nth-child(14) { width: 42px; }

.hardware-line-table input,
.hardware-line-table select {
  min-height: 36px;
  border-radius: 1px;
  padding: 5px 6px;
  font-size: 0.76rem;
}

.hardware-line-table input:disabled {
  border-color: transparent;
  background: #f0efec;
  color: #8a8985;
}

.hardware-row-total {
  color: #1f1f1f;
  font-size: 0.78rem;
  font-weight: 700;
}

.hardware-table-actions {
  margin-top: 10px;
}

.hardware-icon-button {
  width: 30px;
  min-height: 30px;
  border: 1px solid #d8c9c4;
  background: #f8efec;
  color: #874c40;
  padding: 0;
  font-size: 1rem;
}

.hardware-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.hardware-order-list,
.hardware-manual-list {
  display: grid;
  gap: 7px;
}

.hardware-order-item,
.hardware-manual-row {
  display: grid;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #e2e0dc;
  padding-top: 7px;
}

.hardware-order-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.hardware-order-item > span {
  color: #3d3c39;
  font-size: 0.8rem;
  line-height: 1.45;
}

.hardware-order-item > span small {
  display: block;
  color: #8a8985;
}

.hardware-order-item > strong {
  color: #1f1f1f;
  white-space: nowrap;
}

.hardware-order-item.hardware-manual-order-item > span,
.hardware-order-item.hardware-manual-order-item > span small,
.hardware-order-item.hardware-manual-order-item > strong,
.hardware-order-item.hardware-manual-order-item .hardware-order-edit-input {
  color: rgb(0, 0, 255);
}

.hardware-order-edit-input {
  width: 98px;
}

.hardware-empty {
  border: 1px dashed #d3d1cc;
  background: #faf9f7;
  color: #8a8985;
  padding: 18px;
  text-align: center;
}

.hardware-quick-add {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 72px auto;
  align-items: end;
  gap: 8px;
  margin-bottom: 10px;
}

.hardware-rod-add {
  grid-template-columns: minmax(190px, 1fr) minmax(120px, 0.6fr) 72px auto;
}

.hardware-add-manual-row-button {
  width: 100%;
  margin: 0 0 10px;
}

.hardware-quick-add button {
  min-height: 42px;
}

.hardware-quick-add small {
  color: #777673;
  font-size: 0.68rem;
}

.hardware-manual-row {
  grid-template-columns: minmax(0, 1fr) 90px 72px 34px;
}

.hardware-order-preview-section {
  overflow: hidden;
}

.hardware-order-preview {
  overflow-x: auto;
  background: #efeeeb;
  padding: 18px;
}

.hardware-template-sheet {
  width: min(100%, 920px);
  min-width: 720px;
  margin: 0 auto;
  border: 1px solid #8f8e8a;
  background: #fff;
  color: #111;
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.09);
  font-family: "Microsoft JhengHei", "微軟正黑體", sans-serif;
}

.hardware-template-sheet h4 {
  margin: 0;
  border-bottom: 1px solid #8f8e8a;
  padding: 10px;
  text-align: center;
  font-size: 1rem;
}

.hardware-template-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.hardware-template-meta > div {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  min-height: 34px;
  border-right: 1px solid #8f8e8a;
  border-bottom: 1px solid #8f8e8a;
}

.hardware-template-meta > div:nth-child(2n) {
  border-right: 0;
}

.hardware-template-meta strong,
.hardware-template-meta span {
  display: flex;
  align-items: center;
  padding: 5px 8px;
  font-size: 0.75rem;
}

.hardware-template-meta strong {
  justify-content: center;
  border-right: 1px solid #8f8e8a;
  background: #d9d9d9;
  font-weight: 500;
}

.hardware-template-meta span {
  color: rgb(0, 0, 255);
}

.hardware-preview-table-wrap {
  overflow-x: auto;
}

.hardware-preview-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  table-layout: fixed;
}

.hardware-preview-table th,
.hardware-preview-table td {
  height: 30px;
  border-right: 1px solid #8f8e8a;
  border-bottom: 1px solid #8f8e8a;
  padding: 4px 6px;
  font-size: 0.72rem;
  text-align: center;
}

.hardware-preview-table th {
  background: #d9d9d9;
  font-weight: 500;
}

.hardware-preview-table th:nth-child(1) { width: 52px; }
.hardware-preview-table th:nth-child(2) { width: 260px; }
.hardware-preview-table th:nth-child(3) { width: 72px; }

.hardware-preview-table th:last-child,
.hardware-preview-table td:last-child {
  border-right: 0;
}

.hardware-preview-manual-row td {
  color: rgb(0, 0, 255);
}

.hardware-preview-empty {
  color: #8a8985;
}

.hardware-preview-signature {
  border-bottom: 1px solid #8f8e8a;
  padding: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: right;
}

.hardware-preview-notes {
  min-height: 90px;
  padding: 8px 10px;
  font-size: 0.75rem;
}

.hardware-preview-notes p {
  margin: 6px 0 0;
  line-height: 1.45;
}

.hardware-submit-panel {
  align-items: center;
  border-left: 3px solid #c8a063;
}

.hardware-submit-actions {
  min-width: min(100%, 460px);
}

.hardware-submit-actions > small {
  min-width: 86px;
  color: #777673;
  text-align: right;
}

.hardware-pdf-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  text-decoration: none;
}

.hardware-pdf-link[hidden] {
  display: none !important;
}

.hardware-submit-progress {
  flex: 1 1 100%;
  height: 5px;
  overflow: hidden;
  background: #deddd9;
}

.hardware-submit-progress span {
  display: block;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, #1f1f1f, #c8a063, #1f1f1f);
  animation: hardware-progress 1.15s ease-in-out infinite;
}

@keyframes hardware-progress {
  from { transform: translateX(-120%); }
  to { transform: translateX(330%); }
}

@media (max-width: 1120px) {
  .hardware-project-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .hardware-settings-grid { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
  .hardware-summary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .hardware-section-heading,
  .hardware-submit-panel,
  .hardware-calculator-heading {
    display: grid;
  }
  .hardware-heading-actions,
  .hardware-record-tools,
  .hardware-submit-actions {
    justify-content: flex-start;
  }
  .hardware-project-grid,
  .hardware-settings-grid { grid-template-columns: 1fr; }
  .hardware-project-grid .hardware-wide,
  .hardware-settings-grid .hardware-settings-wide { grid-column: auto; }
  .hardware-metrics { width: 100%; }
  .hardware-quick-add,
  .hardware-rod-add { grid-template-columns: 1fr 82px auto; }
  .hardware-rod-add > label:first-child { grid-column: 1 / -1; }
  .hardware-manual-row { grid-template-columns: minmax(0, 1fr) 70px 62px 34px; }
  .hardware-history-item { align-items: flex-start; flex-direction: column; }
  .hardware-history-actions { width: 100%; justify-content: flex-end; }
}

@media (max-width: 760px), (max-device-width: 760px), (hover: none) and (pointer: coarse) {
  html {
    font-size: 16px;
    touch-action: pan-x pan-y;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    font-size: 1rem;
    line-height: 1.5;
    touch-action: pan-x pan-y;
  }

  .app-shell {
    width: auto;
    margin-right: calc(6px + var(--mobile-safe-right));
    margin-left: calc(6px + var(--mobile-safe-left));
    padding-top: calc(8px + var(--mobile-safe-top));
    padding-bottom: calc(var(--mobile-navigation-height) + 18px + var(--mobile-safe-bottom));
  }

  .workspace-layout {
    display: block;
  }

  .topbar {
    align-items: stretch;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px 12px;
  }

  .brand-eyebrow {
    display: none;
  }

  .topbar h1 {
    font-size: 1.14rem;
    line-height: 1.25;
  }

  .sync-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 6px;
    width: 100%;
  }

  .sync-panel #syncState {
    display: none;
  }

  .user-context {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }

  .active-google-login,
  .line-bind-button,
  .cloud-progress {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }

  .mobile-interface-link {
    min-height: 44px;
  }

  #loadDataButton,
  #loadCloudButton {
    min-height: 44px;
    padding-inline: 12px;
  }

  .operation-list-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    width: 100%;
  }

  .operation-list-controls select {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }

  .operation-list-controls input {
    width: 100%;
    min-width: 0;
  }

  .app-sidebar {
    position: fixed !important;
    z-index: 18;
    top: auto;
    right: var(--mobile-safe-right);
    bottom: 0;
    left: var(--mobile-safe-left);
    width: auto;
    max-height: none;
    overflow: visible;
    border: 0;
    border-top: 1px solid #1f1f1f;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.98);
    color: #111;
    padding: 0 4px var(--mobile-safe-bottom);
    box-shadow: 0 -8px 22px rgba(17, 17, 17, 0.18);
    backdrop-filter: blur(16px);
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    will-change: transform;
  }

  .sidebar-heading {
    display: none;
  }

  .function-grid {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-height: none;
    overflow: visible;
    gap: 0;
    padding: 0;
    scroll-snap-type: none;
  }

  .sidebar-group {
    position: static;
    flex: 1 1 20%;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    scroll-snap-align: none;
  }

  .sidebar-group-toggle {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    justify-items: stretch;
    gap: 0;
    width: 100%;
    min-height: var(--mobile-navigation-height);
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #111;
    padding: 7px 2px 6px;
    font-size: 0.7rem;
    line-height: 1.12;
    text-align: center;
    touch-action: manipulation;
  }

  .sidebar-group-toggle:hover,
  .sidebar-group-toggle:focus-visible,
  .sidebar-group.expanded > .sidebar-group-toggle {
    background: #f2f2f0;
    color: #111;
  }

  .sidebar-group.expanded > .sidebar-group-toggle {
    box-shadow: inset 0 3px 0 #c8a063;
  }

  .sidebar-group-title {
    display: grid;
    place-items: center;
    justify-self: stretch;
    align-self: stretch;
    align-content: center;
    gap: 4px;
    width: 100%;
    height: 100%;
    text-align: center;
  }

  .sidebar-group-title svg {
    display: block;
    width: 26px;
    height: auto;
    aspect-ratio: 1 / 1;
    margin-inline: auto;
    transform-origin: center;
    justify-self: center;
  }

  .sidebar-group-title > span {
    width: auto;
    overflow: visible;
    max-width: 100%;
    margin-inline: auto;
    text-overflow: clip;
    white-space: normal;
    word-break: keep-all;
    line-height: 1.12;
    font-weight: 750;
    text-align: center;
    justify-self: center;
  }

  .sidebar-group-mark {
    display: none;
  }

  .sidebar-group-items {
    position: fixed;
    z-index: 19;
    right: calc(8px + var(--mobile-safe-right));
    bottom: calc(var(--mobile-navigation-height) + var(--mobile-navigation-sheet-gap) + var(--mobile-safe-bottom));
    left: calc(8px + var(--mobile-safe-left));
    display: flex;
    align-items: stretch;
    gap: 8px;
    max-width: none;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid #d7d5d0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    padding: 9px;
    box-shadow: 0 -10px 28px rgba(17, 17, 17, 0.24);
    scrollbar-width: thin;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: none;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    animation: mobile-navigation-reveal 180ms ease-out both;
  }

  .sidebar-group-items[hidden] {
    display: none !important;
  }

  .sidebar-group-items .function-card {
    flex: 0 0 min(164px, calc(100vw - 58px));
    width: min(164px, calc(100vw - 58px));
    min-height: 88px;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px;
    border: 0;
    background: #fff;
    color: #111;
    border-radius: 6px;
    padding: 10px;
    box-shadow: none;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    touch-action: manipulation;
  }

  .sidebar-group-items .function-card:hover:not(:disabled),
  .sidebar-group-items .function-card:focus-visible,
  .sidebar-group-items .function-card.active,
  .sidebar-group-items .function-card.active:hover,
  .sidebar-group-items .function-card.active:focus-visible {
    border: 0;
    background: #f2f2f0;
    box-shadow: none;
    transform: none;
  }

  .sidebar-group-items .function-icon,
  .sidebar-group-items .function-card:hover:not(:disabled) .function-icon,
  .sidebar-group-items .function-card:focus-visible .function-icon,
  .sidebar-group-items .function-card.active .function-icon {
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #111;
    transform: none;
  }

  .sidebar-group-items .function-icon svg {
    width: 30px;
    height: 30px;
  }

  .sidebar-group-items .function-card-copy > span {
    overflow: visible;
    font-size: 0.86rem;
    font-weight: 750;
    line-height: 1.25;
    text-overflow: clip;
    white-space: normal;
    word-break: break-all;
  }

  .sidebar-group-items .function-card-copy > strong,
  .sidebar-group-items .function-arrow {
    display: none;
  }

  .mobile-navigation-scroll-hint:not([hidden]) {
    position: fixed;
    z-index: 19;
    bottom: calc(var(--mobile-navigation-height) + 38px + var(--mobile-safe-bottom));
    display: grid;
    place-items: center;
    width: 38px;
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #111;
    padding: 0;
    box-shadow: 0 5px 18px rgba(17, 17, 17, 0.22);
    font-size: 1.55rem;
    font-weight: 500;
    line-height: 1;
    touch-action: manipulation;
  }

  .mobile-navigation-scroll-hint.previous {
    left: 10px;
  }

  .mobile-navigation-scroll-hint.next {
    right: 10px;
  }

  .mobile-navigation-scroll-hint:hover,
  .mobile-navigation-scroll-hint:focus-visible {
    background: #ededeb;
    color: #000;
  }

  body.modal-open .app-sidebar,
  body.modal-open .mobile-navigation-scroll-hint {
    visibility: hidden;
    pointer-events: none;
  }

@keyframes mobile-navigation-reveal {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

.cloud-progress {
  background: #deddd9;
}

.cloud-progress span {
  background: linear-gradient(90deg, #444, #c8a063, #1f1f1f);
}

.user-context,
.line-bind-button,
.modal-panel,
.search-option {
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .function-card,
  .function-icon,
  .function-arrow,
  .sidebar-group-toggle,
  .sidebar-group-mark,
  .sidebar-group-title svg {
    scroll-behavior: auto;
    transition: none;
  }

  .sidebar-group-items {
    animation: none;
  }

  .workspace-page,
  .modal.workspace-embedded.open > .modal-panel {
    animation: none;
  }

  .function-card:hover:not(:disabled),
  .function-card:focus-visible,
  .function-card:hover:not(:disabled) .function-icon,
  .function-card:focus-visible .function-icon,
  .function-card:hover:not(:disabled) .function-arrow,
  .function-card:focus-visible .function-arrow {
    transform: none;
  }
}

@media (max-width: 1120px) {
  .vendor-directory-mode .operation-records { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-center-mode .operation-records { grid-template-columns: repeat(2, minmax(250px, 1fr)); }
}

@media (max-width: 760px) {
  .vendor-directory-mode .operation-records { grid-template-columns: 1fr; }
  .knowledge-center-mode .operation-records { grid-template-columns: 1fr; }
  .lighting-catalog-mode .operation-dashboard,
  .lighting-catalog-mode .operation-record-section { padding-inline: 10px; }
  .lighting-type-menu-heading { align-items: stretch; flex-direction: column; gap: 8px; }
  .lighting-type-menu-heading > div:last-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lighting-type-menu-heading button { width: 100%; min-width: 0; min-height: 44px; }
  .lighting-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .lighting-type-tile { grid-template-rows: minmax(68px, 1fr) auto; min-height: 112px; }
  .lighting-type-art { min-height: 68px; padding: 6px; }
  .lighting-type-illustration { width: min(76px, 84%); max-height: 60px; }
  .lighting-type-copy { padding: 8px; }
  .lighting-type-copy strong { white-space: normal; overflow-wrap: anywhere; }
  .lighting-catalog-mode .operation-records { grid-template-columns: minmax(0, 1fr); }
  .lighting-catalog-record,
  .lighting-catalog-record[open] { grid-column: auto; min-width: 0; }
  .lighting-catalog-summary { grid-template-columns: 64px minmax(0, 1fr) 10px; gap: 8px; min-height: 80px; padding: 7px 9px 7px 7px; }
  .lighting-image-frame.summary { width: 64px; height: 60px; }
  .lighting-catalog-summary-copy > strong { font-size: .8rem; }
  .lighting-catalog-summary-copy > span { font-size: .65rem; }
  .lighting-catalog-content { grid-template-columns: minmax(0, 1fr); padding: 9px; }
  .lighting-catalog-mode.lighting-editor-open .operation-editor {
    width: calc(100vw - 18px);
    max-width: calc(100vw - 18px);
    max-height: calc(100dvh - 24px - var(--mobile-safe-top) - var(--mobile-safe-bottom));
    padding: 14px;
    overscroll-behavior: contain;
  }
  .knowledge-toolbar { grid-template-columns: 1fr; }
  .knowledge-add-button { width: 100%; }
  .knowledge-blog-summary { grid-template-columns: 96px minmax(0, 1fr) 13px; min-height: 164px; gap: 9px; }
  .knowledge-blog-cover,
  .knowledge-blog-cover img { min-height: 164px; }
  .knowledge-blog-summary p { -webkit-line-clamp: 2; }
  .knowledge-center-mode.knowledge-editor-open .operation-editor { width: calc(100vw - 18px); max-height: calc(100dvh - 120px); padding: 15px; }
  .project-reference-strip { grid-template-columns: 1fr; gap: 4px; }
  .project-reference-strip > strong { line-height: 1.4; }
  .project-reference-strip button b { max-width: 205px; }
  .project-contractor-unfiled b { max-width: 150px; }
  .knowledge-category-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .knowledge-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-scope-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .knowledge-record-meta { grid-template-columns: 1fr; }
  .knowledge-source-line { align-items: stretch; flex-direction: column; }
  .knowledge-source-line > a { text-align: center; }
  .vendor-directory-toolbar { align-items: stretch; flex-direction: column; }
  .vendor-directory-toolbar > .vendor-directory-toolbar-actions { justify-content: stretch; }
  .vendor-directory-toolbar-actions button { flex: 1 1 calc(50% - 7px); }
  .vendor-trade-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vendor-record-summary { grid-template-columns: 36px minmax(82px, .7fr) minmax(110px, 1.3fr) 16px; gap: 7px; padding: 8px; }
  .estimate-catalog-summary { grid-template-columns: 34px minmax(125px, 1.2fr) minmax(105px, 1fr) minmax(95px, .85fr) minmax(100px, .75fr) 16px; }
  .vendor-record-summary > em { display: none; }
  .vendor-directory-mode .vendor-record-summary { grid-template-columns: 30px minmax(0, 1fr) minmax(118px, auto) 12px; }
  .vendor-directory-mode .vendor-record-icon { width: 30px; height: 30px; }
  .vendor-directory-mode .vendor-summary-metrics { min-width: 118px; gap: 2px 4px; }
  .vendor-directory-mode .vendor-summary-metrics b { padding: 2px 4px; font-size: .62rem; }
  .vendor-directory-mode .vendor-summary-metrics small { font-size: .5rem; }
  .vendor-record-icon { width: 36px; height: 36px; }
  .vendor-record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vendor-contact-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 38px; }
  .vendor-project-assignment-list { grid-template-columns: 1fr; }
  .vendor-project-assignment-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vendor-project-assignment-controls label { display: grid; gap: 3px; }
  .vendor-project-assignment-controls select { width: 100%; min-width: 0; }
  .cloud-sync-source-fields { grid-template-columns: 1fr; }
  .vendor-trade-mapping-labels { display: none; }
  .vendor-trade-mapping-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vendor-trade-mapping-row > [data-mapping-field="id"] { display: none; }
  .vendor-mapping-field { display: grid; gap: 3px; }
  .vendor-mapping-field > span { display: block; color: var(--muted); font-size: .68rem; font-weight: 900; }
  .vendor-trade-mapping-actions { align-items: stretch; flex-direction: column; }
  .vendor-trade-mapping-actions button { width: 100%; }
  .vendor-directory-mode.vendor-editor-open .operation-editor,
  .vendor-price-mode.vendor-editor-open:not(.vendor-price-analysis-mode) .operation-editor,
  .vendor-quote-mode.vendor-editor-open .operation-editor,
  .estimate-catalog-mode.vendor-editor-open .operation-editor { width: calc(100vw - 18px); max-height: calc(100dvh - 130px); padding: 15px; }
  .vendor-price-view-tabs { display: flex; width: 100%; }
  .vendor-price-view-tabs button { flex: 1 1 50%; min-height: 46px; }
  .vendor-price-analysis-subtabs { display: grid; grid-template-columns: 1fr 1.35fr; width: 100%; }
  .vendor-price-analysis-subtabs button { width: 100%; min-height: 44px; white-space: normal; }
  .vendor-price-toolbar { align-items: stretch; flex-direction: column; }
  .vendor-price-toolbar > button { width: 100%; min-height: 46px; }
  .vendor-company-price-batch-bar { align-items: stretch; flex-direction: column; }
  .vendor-company-price-batch-actions { display: grid; grid-template-columns: 1fr 1.25fr; width: 100%; }
  .vendor-company-price-batch-actions button { width: 100%; min-height: 46px; white-space: normal; }
  .vendor-price-catalog-filters,
  .vendor-price-analysis-filters { grid-template-columns: 1fr; }
  .vendor-price-analysis-filters .vendor-price-comparable-toggle { min-height: 48px; }
  .vendor-price-vendor-picker {
    margin-inline: -2px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .vendor-price-vendor-chip { min-height: 46px; scroll-snap-align: start; font-size: .82rem; }
  .vendor-price-selection-meta { align-items: flex-start; flex-direction: column; }
  .vendor-project-profit-filters { grid-template-columns: 1fr; }
  .vendor-project-profit-filters select,
  .vendor-project-profit-filters input { min-height: 46px; }
  .vendor-project-profit-status { align-items: stretch; flex-direction: column; }
  .vendor-project-profit-status button { width: 100%; min-height: 44px; }
  .vendor-project-profit-card-grid { grid-template-columns: 1fr; }
  .vendor-project-profit-table { width: max-content; min-width: 900px; font-size: .73rem; }
  .vendor-project-profit-table th,
  .vendor-project-profit-table td { min-width: 112px; padding: 8px 7px; }
  .vendor-project-profit-table thead th:first-child,
  .vendor-project-profit-table tbody th { min-width: 180px; max-width: 200px; }
  .vendor-price-score-grid { grid-template-columns: 1fr; }
  .vendor-price-record-summary { grid-template-columns: minmax(0, 1fr) auto 16px; gap: 7px; padding: 9px; }
  .vendor-price-record-grid { grid-template-columns: 1fr; }
  .vendor-price-record-grid > span.wide { grid-column: auto; }
  .vendor-company-price-inline { grid-template-columns: 1fr; align-items: stretch; }
  .vendor-company-price-inline > .vendor-company-price-picker { grid-template-columns: 1fr; }
  .vendor-company-price-search-count { grid-column: auto; }
  .vendor-company-price-inline select { min-height: 46px; }
  .vendor-company-price-inline .vendor-company-price-search input { min-height: 46px; }
  .vendor-price-comparison-scroll { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .vendor-price-comparison-table { width: max-content; min-width: 900px; font-size: .76rem; }
  .vendor-price-comparison-table th,
  .vendor-price-comparison-table td { min-width: 132px; padding: 9px; }
  .vendor-price-comparison-table th:first-child { min-width: 190px; max-width: 210px; }
  .estimate-items-heading { align-items: stretch; flex-direction: column; }
  .estimate-items-heading button { width: 100%; }
  .estimate-item-row { min-width: 900px; }
  .estimate-record-summary { grid-template-columns: minmax(0, 1fr) auto 16px; gap: 7px; }
  .estimate-record-meta { grid-template-columns: 1fr; }
  .estimate-record-lines { overflow-x: auto; }
  .estimate-record-lines > div { min-width: 680px; }
}

/* Shared workspace headings live beside the brand; the original nodes keep their controls and labels. */
.topbar:has(.workspace-header-host:not([hidden])) {
  display: grid;
  grid-template-columns: minmax(270px, .85fr) minmax(0, 2fr);
  align-items: center;
  gap: 22px;
  padding: 12px 18px;
}

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

.topbar:has(.workspace-header-host:not([hidden])) .topbar-brand h1 {
  font-size: clamp(1.2rem, 1.75vw, 1.75rem);
  line-height: 1.3;
}

.workspace-header-host {
  min-width: 0;
  border-left: 1px solid var(--line);
  padding-left: 22px;
}

.workspace-header-host[hidden] {
  display: none !important;
}

.workspace-header-host > .workspace-page-heading,
.workspace-header-host > .modal-heading {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 9px 16px;
  min-width: 0;
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.workspace-header-host > .workspace-page-heading > div:first-child,
.workspace-header-host > .modal-heading > div:first-child {
  flex: 1 1 180px;
  min-width: 0;
}

.workspace-header-host h2 {
  margin: 0;
  font-size: clamp(1.1rem, 1.45vw, 1.35rem);
  line-height: 1.4;
}

.workspace-header-host .eyebrow {
  margin-bottom: 1px;
  font-size: .56rem;
  letter-spacing: .1em;
}

.workspace-header-host > .workspace-page-heading > div:first-child > p:not(.eyebrow),
.workspace-header-host > .modal-heading > div:first-child > p {
  margin: 2px 0 0;
  font-size: .7rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.workspace-header-host .home-dashboard-heading-tools {
  flex: 1 1 330px;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  width: auto;
  max-width: none;
}

.workspace-header-host .home-dashboard-status {
  flex: 1 1 170px;
  padding: 5px 8px;
  font-size: .66rem;
  overflow-wrap: anywhere;
}

.workspace-header-host button,
.workspace-header-host .button-link {
  min-height: 36px;
  padding-inline: 11px;
  font-size: .75rem;
}

.workspace-header-host .home-dashboard-heading-tools > button,
.workspace-header-host .modal-close {
  width: auto;
  white-space: nowrap;
}

.workspace-header-host .project-year-filter {
  flex: 0 0 150px;
  gap: 3px;
  padding: 5px 8px;
}

.workspace-header-host .project-year-filter > span {
  font-size: .65rem;
}

.workspace-header-host .project-year-filter select {
  min-height: 30px;
  padding-block: 3px;
}

.workspace-header-host .system-cabinet-heading-actions {
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .topbar:has(.workspace-header-host:not([hidden])) {
    grid-template-columns: minmax(240px, .7fr) minmax(0, 1.5fr);
    gap: 16px;
  }

  .workspace-header-host {
    padding-left: 16px;
  }
}

@media (max-width: 760px), (max-device-width: 760px), (hover: none) and (pointer: coarse) {
  .topbar:has(.workspace-header-host:not([hidden])) {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    padding: 10px 12px;
  }

  .topbar:has(.workspace-header-host:not([hidden])) .topbar-brand h1 {
    font-size: 1.05rem;
  }

  .workspace-header-host {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 9px;
    padding-left: 0;
  }

  .workspace-header-host > .workspace-page-heading,
  .workspace-header-host > .modal-heading {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .workspace-header-host > .workspace-page-heading > div:first-child,
  .workspace-header-host > .modal-heading > div:first-child {
    flex-basis: 160px;
  }

  .workspace-header-host .home-dashboard-heading-tools {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .workspace-header-host .home-dashboard-status {
    flex-basis: 100%;
  }

  .workspace-header-host button,
  .workspace-header-host .button-link {
    min-height: 44px;
  }
}

/* Phase 12: permission-aware home dashboard and account/system workspace. */
.workspace-page[hidden] {
  display: none !important;
}

.home-dashboard-page,
.system-management-page,
.admin-iframe-workspace {
  display: grid;
  align-content: start;
  gap: 14px;
}

.home-dashboard-heading,
.home-dashboard-heading-tools,
.home-dashboard-section-heading,
.home-dashboard-heading-actions,
.system-data-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-dashboard-heading-tools {
  justify-content: flex-end;
  min-width: 0;
  max-width: min(58%, 720px);
}

.home-dashboard-heading-tools > button {
  flex: 0 0 auto;
}

.home-dashboard-status {
  min-width: 0;
  border-left: 3px solid #c8a063;
  background: #f7f6f2;
  color: #4e4d49;
  padding: 7px 10px;
  font-size: 0.78rem;
  line-height: 1.4;
}

.home-dashboard-status.loading {
  border-left-color: #6d8f82;
}

.home-dashboard-status.error {
  border-left-color: #a4483d;
  background: #fff3f1;
  color: #7b3028;
}

.home-dashboard-simulator {
  border: 1px solid #b99052;
  background: #fffaf0;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(74, 52, 18, 0.08);
}

.home-dashboard-simulator-heading,
.home-dashboard-simulator-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.home-dashboard-simulator-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.home-dashboard-simulator-badge {
  border-radius: 999px;
  background: #8b5f1f;
  color: #fff;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.home-dashboard-simulator-notice,
.home-dashboard-simulator-status {
  margin: 8px 0 0;
  color: #68542f;
  font-size: 0.76rem;
  line-height: 1.55;
}

.home-dashboard-simulator-controls {
  justify-content: flex-start;
  margin-top: 10px;
}

.home-dashboard-simulator-controls .field-label {
  flex: 1 1 360px;
  max-width: 620px;
}

.home-dashboard-simulator-status.error {
  color: #8b3028;
}

.project-personnel-binding-status {
  display: block;
  margin-top: 5px;
  color: #756b5d;
  font-size: 0.7rem;
  line-height: 1.4;
}

.project-personnel-binding-status.bound {
  color: #236148;
  font-weight: 750;
}

.home-dashboard-panel,
.system-management-card {
  border: 1px solid #d7d5d0;
  background: #fff;
  padding: 15px;
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.04);
}

.home-dashboard-section-heading {
  align-items: flex-start;
  margin-bottom: 11px;
}

.home-dashboard-section-heading h3 {
  margin: 0;
  color: #111;
  font-size: 1rem;
  font-weight: 650;
}

.home-dashboard-section-heading .eyebrow {
  margin-bottom: 1px;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.home-dashboard-section-note {
  color: #73684f;
  font-size: 0.7rem;
  font-weight: 750;
}

.home-dashboard-heading-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.home-dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.home-dashboard-metrics article {
  display: grid;
  gap: 5px;
  min-width: 0;
  border-left: 2px solid #c8a063;
  background: #f4f3f0;
  padding: 11px 12px;
}

.home-dashboard-metrics span {
  color: #66635e;
  font-size: 0.72rem;
  font-weight: 700;
}

.home-dashboard-metrics strong {
  color: #111;
  font-size: 1.5rem;
  font-weight: 550;
  line-height: 1;
}

.home-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "projects todos" "assignments department";
  align-items: start;
  gap: 14px;
}

.home-dashboard-panel[hidden] {
  display: none !important;
}

.home-dashboard-projects-panel {
  grid-area: projects;
  min-width: 0;
}

.home-dashboard-todos-panel {
  grid-area: todos;
  min-width: 0;
}

.home-dashboard-assignments-panel {
  grid-area: assignments;
  min-width: 0;
}

.home-dashboard-department-panel {
  grid-area: department;
  min-width: 0;
}

.home-dashboard-list,
.home-dashboard-project-list {
  display: grid;
  gap: 8px;
}

.home-dashboard-project-list {
  grid-template-columns: minmax(0, 1fr);
}

.home-dashboard-item,
.home-dashboard-project {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid #e2e0db;
  border-left: 3px solid #1f1f1f;
  background: #fafaf8;
}

.home-dashboard-item {
  padding: 11px 12px;
}

.home-dashboard-project {
  display: block;
  overflow: hidden;
}

.home-dashboard-item-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.home-dashboard-item-heading span,
.home-dashboard-project-title > span {
  color: #73684f;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.home-dashboard-item-heading em {
  border: 1px solid #d3b985;
  background: #fff8e8;
  color: #664e20;
  padding: 2px 6px;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 800;
}

.home-dashboard-item > strong,
.home-dashboard-project-title > strong {
  display: block;
  overflow-wrap: anywhere;
  color: #111;
  font-size: 0.88rem;
  line-height: 1.42;
}

.home-dashboard-item p,
.home-dashboard-project p,
.home-dashboard-item small {
  margin: 0;
  overflow-wrap: anywhere;
  color: #686661;
  font-size: 0.7rem;
  line-height: 1.55;
}

.home-dashboard-item button,
.home-dashboard-project-actions > button {
  justify-self: start;
  min-height: 36px;
  padding: 6px 10px;
}

.home-dashboard-project-summary {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  cursor: pointer;
  list-style: none;
}

.home-dashboard-project-summary::-webkit-details-marker {
  display: none;
}

.home-dashboard-project-summary:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: -3px;
}

.home-dashboard-project[open] > .home-dashboard-project-summary {
  border-bottom: 1px solid #e2e0db;
}

.home-dashboard-project-summary-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.home-dashboard-project-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.home-dashboard-project-toggle-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #73684f;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
}

.home-dashboard-project-toggle-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.16s ease;
}

.home-dashboard-project[open] .home-dashboard-project-toggle-label::before {
  transform: rotate(225deg) translate(-1px, -1px);
}

.home-dashboard-project-toggle-label .when-expanded {
  display: none;
}

.home-dashboard-project[open] .home-dashboard-project-toggle-label .when-collapsed {
  display: none;
}

.home-dashboard-project[open] .home-dashboard-project-toggle-label .when-expanded {
  display: inline;
}

.home-dashboard-project-summary-weeks {
  display: grid;
  gap: 7px;
}

.home-dashboard-project[open] .home-dashboard-project-summary-weeks {
  display: none;
}

.home-dashboard-project-week-preview {
  display: grid;
  gap: 5px;
  min-width: 0;
  border-top: 1px solid #e2e0db;
  padding-top: 7px;
}

.home-dashboard-project-week-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.home-dashboard-project-week-preview-heading strong {
  color: #55524c;
  font-size: 0.72rem;
}

.home-dashboard-project-week-preview-heading small {
  color: var(--muted);
  font-size: 0.66rem;
}

.home-dashboard-project-preview-items {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.home-dashboard-project-preview-item,
.home-dashboard-project-preview-empty {
  border: 1px solid #d5c39e;
  background: #f8f2e7;
  color: #514424;
  padding: 4px 7px;
  font-size: 0.67rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.home-dashboard-project-preview-empty {
  border-color: #dedbd4;
  background: #f5f4f1;
  color: var(--muted);
}

.home-dashboard-project:not([open]) > .home-dashboard-project-details {
  display: none;
}

.home-dashboard-project-details {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 11px 12px;
}

.home-dashboard-project-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.home-dashboard-department-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 12px;
  padding: 9px 10px;
}

.home-dashboard-department-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.home-dashboard-department-primary {
  justify-content: flex-start;
  min-width: 0;
}

.home-dashboard-department-primary > span,
.home-dashboard-department-primary > em {
  flex: 0 0 auto;
}

.home-dashboard-department-primary > em {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-dashboard-department-primary > strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #111;
  font-size: 0.84rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-dashboard-department-meta {
  overflow: hidden;
  line-height: 1.35 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-dashboard-department-item > button {
  align-self: start;
  justify-self: end;
  min-width: 56px;
}

.home-dashboard-project-progress {
  height: 6px;
  overflow: hidden;
  background: #e6e4df;
}

.home-dashboard-project-progress > span {
  display: block;
  height: 100%;
  background: #c8a063;
}

.home-dashboard-project-weekly {
  display: grid;
  gap: 6px;
  border-top: 1px solid #e2e0db;
  padding-top: 8px;
}

.home-dashboard-project-weekly > strong {
  color: #55524c;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.home-dashboard-project-weekly > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.home-dashboard-weekly-item {
  min-height: 34px;
  border: 1px solid #d5c39e;
  background: #f8f2e7;
  color: #514424;
  padding: 6px 9px;
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.3;
  text-align: left;
}

.home-dashboard-weekly-item:hover,
.home-dashboard-weekly-item:focus-visible {
  border-color: #a7833e;
  background: #efe1c5;
}

.home-dashboard-weekly-item:focus-visible {
  outline: 2px solid #3e6b5b;
  outline-offset: 2px;
}

.home-dashboard-weekly-empty {
  color: #7a7771;
  font-size: 0.7rem;
}

.home-dashboard-empty {
  border: 1px dashed #cfcdc7;
  background: #fafaf8;
  color: #77746e;
  padding: 18px 12px;
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: center;
}

.system-management-controls.sync-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  justify-content: stretch;
  gap: 14px;
  width: 100%;
}

.system-management-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.system-management-view-card,
.system-management-action-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 78px;
  border: 1px solid #d8e3dd;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 11px;
  text-align: left;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.system-management-view-card:hover,
.system-management-view-card:focus-visible,
.system-management-action-card:hover,
.system-management-action-card:focus-visible {
  transform: translateY(-2px);
  border-color: #8fb29f;
  box-shadow: 0 8px 20px rgba(34, 76, 56, .12);
}

.system-management-view-card.active {
  border-color: var(--brand);
  background: #eef7f1;
  box-shadow: inset 0 0 0 1px var(--brand);
}

.system-management-view-card[hidden],
.system-management-action-card[hidden] {
  display: none !important;
}

.system-management-view-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 9px;
  background: #e5efe9;
  color: var(--brand-dark);
}

.system-management-view-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.system-management-view-card > span:last-child,
.system-management-action-card > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.system-management-view-card strong,
.system-management-action-card strong {
  overflow: hidden;
  color: #111;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .94rem;
}

.system-management-view-card small,
.system-management-action-card small {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
  line-height: 1.45;
}

.system-management-controls,
.system-management-view-panel {
  min-width: 0;
  width: 100%;
}

.system-management-view-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.system-management-view-panel[hidden] {
  display: none !important;
}

.system-management-action-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.system-management-action-card {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  min-height: 92px;
}

.system-management-action-card > span:last-child {
  color: var(--brand-dark);
  font-size: 1.4rem;
}

.system-management-nas-panel > .system-management-card,
.system-management-view-panel > .system-data-card {
  grid-column: 1 / -1;
}

.admin-iframe-shell {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d7d5d0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(17, 17, 17, .05);
}

.admin-iframe-shell iframe {
  display: block;
  width: 100%;
  height: clamp(660px, calc(100vh - 176px), 980px);
  min-height: 660px;
  border: 0;
  background: #fff;
}

.system-management-card {
  display: grid;
  align-content: start;
  gap: 11px;
  min-width: 0;
}

.system-management-card[hidden] {
  display: none !important;
}

.schedule-source-card { grid-column: 1 / -1; }
.schedule-source-status-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.schedule-source-status-row p { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.schedule-source-status-row button { width: auto; }
.schedule-source-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.schedule-source-fields label { display: grid; gap: 5px; min-width: 0; color: #4a4a46; font-size: .74rem; font-weight: 750; }
.schedule-source-fields input { width: 100%; min-width: 0; box-sizing: border-box; }
.schedule-source-fields input[readonly] { background: #f3f2ef; color: #56544e; }
.schedule-source-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.schedule-source-actions button { width: auto; min-width: 100px; }
#scheduleSourceFeedback { min-height: 1.25em; }
#scheduleSourceFeedback.is-error { color: #a13c32; }
#scheduleSourceFeedback.is-success { color: #236b45; }
@media (max-width: 700px) {
  .schedule-source-fields { grid-template-columns: 1fr; }
  .schedule-source-actions button { flex: 1 1 125px; }
}

.system-management-card-heading {
  display: grid;
  gap: 2px;
}

.system-management-card-heading > span {
  color: #77746e;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.system-management-card-heading > strong {
  color: #111;
  font-size: 0.96rem;
  font-weight: 650;
}

.system-management-card > p {
  margin: 0;
  color: #696762;
  font-size: 0.74rem;
  line-height: 1.55;
}

.system-account-card .user-context,
.system-account-card .active-google-login,
.system-management-card .mobile-interface-link,
.system-management-card .line-bind-button {
  width: 100%;
  max-width: none;
}

.system-data-card {
  grid-column: 1 / -1;
}

.system-data-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.system-data-card .cloud-progress {
  width: 100%;
  max-width: none;
}

@media (max-width: 760px), (max-device-width: 760px), (hover: none) and (pointer: coarse) {
  .home-dashboard-heading,
  .home-dashboard-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .home-dashboard-heading-tools,
  .home-dashboard-heading-tools > button,
  .home-dashboard-section-heading > button,
  .home-dashboard-heading-actions,
  .home-dashboard-heading-actions > button,
  .system-data-actions,
  .system-data-actions > button {
    width: 100%;
  }

  .home-dashboard-heading-tools {
    align-items: stretch;
    flex-direction: column;
    max-width: none;
  }

  .home-dashboard-simulator-heading,
  .home-dashboard-simulator-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .home-dashboard-simulator-controls .field-label,
  .home-dashboard-simulator-controls > button {
    width: 100%;
    max-width: none;
  }

  .home-dashboard-heading-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-dashboard-metrics,
  .home-dashboard-grid,
  .home-dashboard-project-list,
  .system-management-controls.sync-panel {
    grid-template-columns: 1fr;
  }

  .system-management-view-panel,
  .system-management-action-grid {
    grid-template-columns: 1fr;
  }

  .system-management-view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .system-management-nas-panel > .system-management-card,
  .system-management-view-panel > .system-data-card,
  .system-management-action-grid {
    grid-column: auto;
  }

  .home-dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-dashboard-grid {
    grid-template-areas: "projects" "todos" "assignments" "department";
  }

  .home-dashboard-projects-panel,
  .home-dashboard-department-panel,
  .system-data-card {
    grid-column: auto;
  }

  .home-dashboard-item button,
  .home-dashboard-project-actions > button {
    justify-self: stretch;
    width: 100%;
    min-height: 44px;
  }

  .home-dashboard-department-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .home-dashboard-department-item > button {
    justify-self: end;
    width: auto;
    min-width: 52px;
  }

  .system-management-card {
    padding: 13px;
  }

  .admin-iframe-shell iframe {
    height: calc(100dvh - 138px);
    min-height: 600px;
  }
}

@media (max-width: 430px), (max-device-width: 430px) {
  .system-management-view-grid {
    grid-template-columns: 1fr;
  }
}

.sop-entry-mode .operation-record-section {
  width: 100%;
}

.sop-entry-mode .operation-workspace { grid-template-columns: minmax(0, 1fr); }
.sop-entry-mode #operationStats { display: block; }
.sop-library-menu { display: grid; gap: 12px; }
.sop-library-toolbar, .sop-library-toolbar > div:last-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sop-library-toolbar > div:first-child { display: grid; gap: 5px; }
.sop-library-toolbar small, .sop-trade-button small { color: var(--muted); font-size: .75rem; }
.sop-library-notice { margin: 0; padding: 10px 12px; background: #faf7ef; color: #77613f; font-size: .78rem; line-height: 1.6; }
.sop-trade-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; }
.sop-trade-button { display: grid; gap: 6px; min-height: 66px; text-align: left; background: white; border: 1px solid var(--line); color: var(--text); padding: 12px; }
.sop-trade-button.active { border-color: var(--brand); background: #edf3ef; box-shadow: inset 0 -3px var(--brand); }
.sop-status-filter { display: flex; align-items: center; gap: 10px; font-size: .8rem; }
.sop-status-filter select { width: auto; min-width: 150px; min-height: 44px; }
.sop-library-toolbar button { min-height: 44px; }
.home-dashboard-project-weekly > header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.home-dashboard-project-weekly > header strong { color: #55524c; font-size: .75rem; }
.home-dashboard-project-weekly > header small { color: var(--muted); font-size: .68rem; }
.home-dashboard-project-weekly > .home-dashboard-work-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 6px; width: 100%; }
.home-dashboard-work-chips > .home-dashboard-weekly-empty { grid-column: 1 / -1; }
.home-dashboard-work-chips > .home-dashboard-weekly-sop[open] { grid-column: 1 / -1; }
.home-dashboard-work-chips > .home-dashboard-weekly-sop:not([open]) > summary { display: grid; gap: 5px; padding: 8px; }
.home-dashboard-work-chips > .home-dashboard-weekly-sop:not([open]) > summary em { text-align: left; max-width: none; }
.home-dashboard-project-weekly > .home-dashboard-gantt-scroll { display: block; overflow-x: auto; width: 100%; min-width: 0; }
.home-dashboard-mini-gantt { width: 100%; table-layout: fixed; border-collapse: collapse; background: #fff; }
.home-dashboard-mini-gantt th, .home-dashboard-mini-gantt td { border: 1px solid #e2e0db; padding: 3px 2px; text-align: center; vertical-align: middle; font-size: .68rem; }
.home-dashboard-mini-gantt thead th { width: calc(100% / 7); padding: 6px 1px; background: #f0eee8; font-weight: 700; }
.home-dashboard-mini-gantt thead time { display: block; font-size: clamp(.6rem, 1.6vw, .68rem); font-variant-numeric: tabular-nums; white-space: normal; overflow-wrap: normal; }
.home-dashboard-mini-gantt td.scheduled { background: #faf5eb; }
.home-dashboard-mini-gantt .home-dashboard-gantt-bar { display: block; width: 100%; min-width: 0; min-height: 28px; margin: 0; padding: 4px 2px; border: 1px solid #9b773d; border-radius: 3px; background: #ead7b4; color: #483719; font-size: .72rem; font-weight: 650; line-height: 1.4; cursor: pointer; overflow: hidden; }
.home-dashboard-gantt-label { display: block; width: 100%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.home-dashboard-gantt-bar:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.home-dashboard-gantt-popup { position: fixed; z-index: 1100; width: max-content; max-width: min(320px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow: auto; padding: 10px 12px; border: 1px solid #9b773d; border-radius: 5px; background: #fff8e9; color: #483719; box-shadow: 0 4px 18px #302d2930; font-size: .8rem; font-weight: 500; line-height: 1.6; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; cursor: pointer; }
.home-dashboard-gantt-popup:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.home-dashboard-gantt-unplaced { display: block; padding: 5px; color: var(--muted); font-size: .68rem; line-height: 1.5; overflow-wrap: anywhere; }
.home-dashboard-photo-button { justify-self: start; }
.home-site-photo-panel { display: grid; gap: 12px; }
.home-site-photo-panel p, .home-site-photo-panel > small { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.6; }
.home-site-photo-file-list code, .home-site-photo-job-list code { overflow-wrap: anywhere; font-size: .76rem; white-space: normal; }
.home-site-photo-status { padding: 10px; background: #edf3ee; font-size: .82rem; line-height: 1.6; overflow-wrap: anywhere; }
.home-site-photo-status.error { background: #fff0e9; color: #873e22; }
.home-site-photo-picker { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafbf9; }
.home-site-photo-picker-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.home-site-photo-picker-heading > div { display: grid; gap: 3px; min-width: 0; }
.home-site-photo-picker-heading h3 { margin: 0; font-size: .94rem; }
.home-site-photo-picker-heading small, .home-site-photo-picker-help { color: var(--muted); font-size: .74rem; line-height: 1.5; }
.home-site-photo-picker-heading > strong { flex-shrink: 0; padding: 4px 8px; border-radius: 999px; background: #eaf2ec; color: #285740; font-size: .74rem; }
.home-site-photo-picker-button { position: relative; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 12px; border: 1px solid #9aad9f; border-radius: 8px; background: #fff; color: var(--text); cursor: pointer; }
.home-site-photo-picker-button:hover { border-color: var(--brand); background: #f4f8f5; }
.home-site-photo-picker-button:focus-within { outline: 3px solid rgba(36, 92, 74, .18); outline-offset: 1px; }
.home-site-photo-picker-button > span:last-of-type { display: grid; gap: 2px; min-width: 0; }
.home-site-photo-picker-button small { color: var(--muted); font-size: .72rem; font-weight: 500; }
.home-site-photo-picker-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 8px; background: #e4efe8; color: var(--brand); font-size: 1.35rem; line-height: 1; }
.home-site-photo-native-input { position: absolute; width: 1px; height: 1px; min-height: 0; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap; }
.home-site-photo-picker-button:has(.home-site-photo-native-input:disabled) { opacity: .58; cursor: wait; }
.home-site-photo-file-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.home-site-photo-file-item { display: grid; gap: 5px; min-width: 0; padding: 0; overflow-wrap: anywhere; }
.home-site-photo-preview { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid #cbd4ce; border-radius: 7px; background: #edf1ee; }
.home-site-photo-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-site-photo-preview-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); font-size: .72rem; font-weight: 700; }
.home-site-photo-preview-placeholder.accepted { background: #e3f1e7; color: #25613c; font-size: 1.45rem; }
.home-site-photo-order { position: absolute; left: 5px; bottom: 5px; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; background: rgba(20, 30, 25, .76); color: #fff; font-size: .68rem; font-weight: 800; }
.home-site-photo-remove { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border: 2px solid #fff; border-radius: 999px; background: rgba(24, 29, 26, .82); color: #fff; font-size: 1.2rem; line-height: 1; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.home-site-photo-remove:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.home-site-photo-file-meta { min-width: 0; }
.home-site-photo-file-meta strong { display: block; overflow: hidden; font-size: .69rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.home-site-photo-file-meta small, .home-site-photo-file-meta code { display: block; margin-top: 2px; color: var(--muted); font-size: .65rem; line-height: 1.35; }
.home-site-photo-file-item.error .home-site-photo-preview { border-color: #c96b57; }
.home-site-photo-file-item.error .home-site-photo-file-meta small { color: #873e22; }
.home-site-photo-upload-button { width: 100%; min-height: 48px; }
.home-site-photo-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.home-site-photo-actions a { font-size: .78rem; }
.home-site-photo-jobs { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.home-site-photo-jobs-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.home-site-photo-jobs-heading h3 { margin: 0; font-size: .94rem; }
.home-site-photo-jobs-heading small { color: var(--muted); font-size: .76rem; }
.home-site-photo-job-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.home-site-photo-job-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; padding: 9px 10px; border: 1px solid var(--line); background: #fff; overflow-wrap: anywhere; }
.home-site-photo-job-list li.empty { display: block; color: var(--muted); text-align: center; }
.home-site-photo-job-list strong { min-width: 0; }
.home-site-photo-job-list small { color: var(--muted); }
.home-site-photo-job-list .home-site-photo-job-state { align-self: start; white-space: nowrap; font-weight: 700; font-size: .76rem; }
.home-site-photo-job-list .home-site-photo-job-state.confirmed { color: #27633d; }
.home-site-photo-job-list .home-site-photo-job-state.failed { color: #9b332d; }
.home-site-photo-job-list code { grid-column: 1 / -1; }
@media (max-width: 560px) {
  .home-site-photo-panel { gap: 10px; }
  .home-site-photo-picker { padding: 10px; }
  .home-site-photo-file-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .home-site-photo-picker-heading { align-items: center; }
  .home-site-photo-picker-heading small { display: none; }
  .home-site-photo-actions { display: grid; grid-template-columns: 1fr; }
  .home-site-photo-job-list li { grid-template-columns: minmax(0, 1fr); }
  .home-site-photo-job-list .home-site-photo-job-state { white-space: normal; }
}
.home-dashboard-weekly-sop { min-width: 0; border: 1px solid var(--line); background: #fafbf9; }
.home-dashboard-weekly-sop > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; cursor: pointer; min-height: 44px; list-style: none; }
.home-dashboard-weekly-sop > summary::-webkit-details-marker { display: none; }
.home-dashboard-weekly-sop > summary > span { display: grid; gap: 4px; min-width: 0; }
.home-dashboard-weekly-sop > summary strong { font-size: .8rem; overflow-wrap: anywhere; }
.home-dashboard-weekly-sop > summary small, .home-dashboard-weekly-sop > summary em { font-size: .68rem; color: var(--muted); font-style: normal; }
.home-dashboard-weekly-sop > summary em { text-align: right; flex-shrink: 0; }
.home-dashboard-weekly-sop[open] > summary { border-bottom: 1px solid var(--line); }
.home-dashboard-weekly-sop-content { display: grid; gap: 8px; padding: 10px; }
.home-dashboard-weekly-sop-content > p { margin: 0; line-height: 1.6; font-size: .76rem; }
.home-dashboard-weekly-sop summary:focus-visible, .sop-trade-button:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.home-dashboard-weekly-sop .sop-lookup-card-content { max-height: 65vh; overflow: auto; }
@media (max-width: 680px) {
  .sop-trade-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sop-library-toolbar { align-items: flex-start; }
  .home-dashboard-weekly-sop > summary { align-items: flex-start; }
  .home-dashboard-weekly-sop > summary em { max-width: 95px; }
}

.sop-lookup-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid #b8cbc1;
  border-left: 5px solid var(--brand);
  border-radius: 10px;
  background: #f6faf7;
  padding: 14px;
}

.sop-lookup-panel.none { border-left-color: #b56a5f; background: #fff8f6; }
.sop-lookup-panel.multiple { border-left-color: #c28a2f; background: #fffaf0; }
.sop-lookup-panel.loading { border-left-color: #82968a; }

.sop-lookup-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sop-lookup-heading > div { display: grid; gap: 3px; min-width: 0; }
.sop-lookup-heading small { color: var(--muted); font-size: .65rem; font-weight: 900; letter-spacing: .04em; }
.sop-lookup-heading h3 { margin: 0; overflow-wrap: anywhere; color: var(--brand-dark); font-size: 1rem; }
.sop-lookup-heading button { flex: 0 0 auto; width: auto; min-height: 34px; padding: 0 10px; font-size: .72rem; }

.sop-lookup-state {
  display: grid;
  gap: 4px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .82);
  padding: 10px 11px;
}

.sop-lookup-state strong { color: var(--text); font-size: .82rem; line-height: 1.45; }
.sop-lookup-state p { margin: 0; color: var(--muted); font-size: .72rem; font-weight: 700; line-height: 1.55; }
.sop-lookup-candidates { display: grid; gap: 8px; }

.sop-lookup-card {
  overflow: hidden;
  border: 1px solid #cedbd4;
  border-radius: 8px;
  background: #fff;
}

.sop-lookup-card > summary,
.sop-record-summary {
  list-style: none;
  cursor: pointer;
}

.sop-lookup-card > summary::-webkit-details-marker,
.sop-record-summary::-webkit-details-marker { display: none; }

.sop-lookup-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
}

.sop-lookup-card > summary > span { display: grid; gap: 3px; min-width: 0; }
.sop-lookup-card > summary small { color: var(--muted); font-size: .64rem; font-weight: 800; }
.sop-lookup-card > summary strong { overflow-wrap: anywhere; color: var(--brand-dark); font-size: .84rem; }
.sop-lookup-card > summary em { color: var(--text); font-size: .68rem; font-style: normal; font-weight: 700; }
.sop-lookup-card > summary > b { color: var(--brand); font-size: .66rem; }
.sop-lookup-card[open] > summary { border-bottom: 1px solid var(--line); background: #eef5f1; }
.sop-lookup-card[open] > summary > b::before { content: "收合"; }
.sop-lookup-card[open] > summary > b { font-size: 0; }
.sop-lookup-card[open] > summary > b::before { font-size: .66rem; }

.sop-lookup-card-content {
  display: grid;
  gap: 11px;
  padding: 12px;
}

.sop-lookup-summary { margin: 0; color: var(--brand-dark); font-size: .78rem; font-weight: 800; line-height: 1.55; }
.sop-lookup-content,
.sop-record-text { color: var(--text); font-size: .8rem; line-height: 1.72; overflow-wrap: anywhere; }

.sop-checklist-block { display: grid; gap: 8px; border-top: 1px dashed var(--line); padding-top: 10px; }
.sop-checklist-block > div:first-child { display: grid; gap: 2px; }
.sop-checklist-block > div:first-child strong { color: var(--text); font-size: .78rem; }
.sop-checklist-block > div:first-child small { color: var(--muted); font-size: .66rem; font-weight: 700; }
.sop-checklist { display: grid; gap: 6px; }
.sop-checklist label { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: start; gap: 7px; border-radius: 6px; background: #f4f7f5; padding: 8px; cursor: pointer; }
.sop-checklist input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--brand); }
.sop-checklist span { color: var(--text); font-size: .75rem; font-weight: 700; line-height: 1.45; }
.sop-checklist em,
.sop-record-checklist em { border-radius: 999px; background: #e9efe9; color: var(--brand-dark); padding: 2px 6px; font-size: .58rem; font-style: normal; font-weight: 900; white-space: nowrap; }
.sop-checklist-empty { margin: 0; color: var(--muted); font-size: .72rem; }
.sop-checklist-editor { min-width: 0; margin: 0; border: 1px solid var(--line); padding: 12px; }
.sop-checklist-editor legend { padding: 0 6px; font-size: .8rem; font-weight: 800; }
.sop-checklist-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sop-checklist-editor-heading small, .sop-checklist-editor > small { color: var(--muted); font-size: .72rem; line-height: 1.5; }
.sop-checklist-editor-heading button { flex-shrink: 0; min-height: 44px; }
.sop-checklist-editor-rows { display: grid; gap: 10px; margin: 10px 0; }
.sop-checklist-editor-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: end; border-bottom: 1px dashed var(--line); padding-bottom: 10px; }
.sop-checklist-editor-label { display: grid; gap: 5px; min-width: 0; }
.sop-checklist-editor-label > span { color: var(--muted); font-size: .72rem; font-weight: 700; }
.sop-checklist-editor-label textarea { width: 100%; min-height: 64px; resize: vertical; }
.sop-checklist-editor-required { display: flex; align-items: center; gap: 6px; min-height: 44px; white-space: nowrap; font-size: .75rem; }
.sop-checklist-editor-required input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--brand); }
.sop-checklist-editor-row > button { min-height: 44px; }
.sop-checklist-editor-empty { color: var(--muted); font-size: .75rem; }
@media (max-width: 600px) {
  .sop-checklist-editor-row { grid-template-columns: minmax(0, 1fr) auto; }
  .sop-checklist-editor-label { grid-column: 1 / -1; }
  .sop-checklist-editor-row > button { justify-self: end; }
}
.sop-source-link { justify-self: start; width: auto; min-height: 34px; padding: 7px 10px; text-decoration: none; }

.sop-record { border-left: 4px solid #aeb9b3; }
.sop-record.published { border-left-color: var(--brand); }
.sop-record.archived { opacity: .78; }
.sop-record-summary { display: grid; grid-template-columns: auto minmax(0, 1fr) 16px; align-items: center; gap: 10px; padding: 11px 12px; }
.sop-record-summary > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.sop-record-summary small { color: var(--muted); font-size: .64rem; font-weight: 800; }
.sop-record-summary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--brand-dark); font-size: .86rem; }
.sop-record-summary em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: .68rem; font-style: normal; font-weight: 700; }
.sop-record-status { border-radius: 999px; padding: 3px 7px; background: #eeefed; color: #666; font-size: .62rem; font-weight: 900; }
.sop-record-status.published { background: #dfeee6; color: #235b47; }
.sop-record-status.archived { background: #ece8e0; color: #6b5d46; }
.sop-record-summary > b { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid var(--brand); transition: transform .2s ease; }
.sop-record[open] .sop-record-summary { border-bottom: 1px solid var(--line); background: #f4f8f5; }
.sop-record[open] .sop-record-summary > b { transform: rotate(180deg); }
.sop-record-content { display: grid; gap: 11px; padding: 12px 13px; }
.sop-record-summary-text { margin: 0; color: var(--brand-dark); font-size: .8rem; font-weight: 800; line-height: 1.55; }
.sop-alias-list { display: grid; gap: 5px; }
.sop-alias-list > small { color: var(--muted); font-size: .64rem; font-weight: 900; }
.sop-alias-list > span { display: flex; flex-wrap: wrap; gap: 5px; }
.sop-alias-list b { border-radius: 999px; background: #edf2ef; color: var(--text); padding: 3px 7px; font-size: .63rem; }
.sop-record-checklist { display: grid; gap: 7px; border-top: 1px dashed var(--line); padding-top: 10px; }
.sop-record-checklist > strong { color: var(--text); font-size: .76rem; }
.sop-record-checklist ol { display: grid; gap: 5px; margin: 0; padding-left: 22px; }
.sop-record-checklist li { color: var(--text); padding-left: 2px; font-size: .72rem; line-height: 1.45; }
.sop-record-checklist li em { margin-left: 6px; }
.sop-record-checklist p { margin: 0; color: var(--muted); font-size: .7rem; }
.sop-record-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sop-record-footer > a { width: auto; min-height: 32px; padding: 6px 9px; text-decoration: none; }

.sop-lookup-card > summary:focus-visible,
.sop-record-summary:focus-visible { outline: 3px solid rgba(43, 101, 77, .25); outline-offset: -3px; }

@media (max-width: 760px), (max-device-width: 760px), (hover: none) and (pointer: coarse) {
  .sop-lookup-heading,
  .sop-record-footer { align-items: stretch; flex-direction: column; }
  .sop-lookup-heading button,
  .sop-record-footer > a { width: 100%; }
  .sop-record-summary { grid-template-columns: minmax(0, 1fr) 16px; }
  .sop-record-status { grid-column: 1 / -1; justify-self: start; }
}

.specification-library-table { overflow-x: auto; }
.specification-library-file { display: flex; align-items: center; gap: 8px; padding: 8px; border-bottom: 1px solid #ded8cc; }
.specification-library-file span { flex: 1; overflow-wrap: anywhere; }
#specificationLibraryImport { padding: 12px; background: #f7f4ec; margin-bottom: 12px; }
.specification-library-table table { width: 100%; border-collapse: collapse; }
.specification-library-table th, .specification-library-table td { text-align: left; padding: 10px; border-bottom: 1px solid #ded8cc; }
.hardware-quantity-comparison { display: flex; align-items: center; gap: 12px; }
.hardware-quantity-comparison > span { display: grid; gap: 3px; text-align: right; }
.hardware-quantity-comparison small { font-size: 10px; color: #746d60; }
.spec-action-short { display: none; }
.knowledge-kd-category-card { grid-template-columns: 48px minmax(0, 1fr); min-height: 64px; border-color: #cabf9e; background: linear-gradient(135deg, #fbf8ee, #f3eee0); }
.knowledge-kd-category-art { display: grid; place-items: center; width: 48px; height: 42px; overflow: hidden; border-radius: 7px; background: #e9dfc5; color: #665631; }
.knowledge-kd-category-art .kd-material-vendor-illustration { width: 46px; height: 34px; }
.knowledge-kd-category-card:hover,
.knowledge-kd-category-card:focus-visible { border-color: #806f46; background: #f3ead2; }
.kd-material-history-mode .operation-dashboard { align-items: flex-start; }
.kd-material-vendor-menu { display: grid; flex: 1 0 100%; min-width: 0; gap: 10px; }
.kd-material-vendor-menu > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.kd-material-vendor-menu > header > span { display: grid; min-width: 0; gap: 3px; }
.kd-material-vendor-menu > header strong { color: #403823; font-size: .9rem; }
.kd-material-vendor-menu > header small { color: #766d57; font-size: .7rem; line-height: 1.45; }
.kd-material-vendor-menu > header > b { flex: 0 0 auto; color: #766943; font-size: .7rem; }
.kd-material-vendor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 150px)); justify-content: start; gap: 8px; min-width: 0; }
.kd-material-vendor-card {
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr);
  min-width: 0;
  min-height: 134px;
  overflow: hidden;
  border: 1px solid #d8cfb7;
  border-radius: 10px;
  background: #fffdf8;
  color: #564a2e;
  padding: 0;
  text-align: left;
}
.kd-material-history-mode .kd-material-vendor-card,
.system-board-history-mode .kd-material-vendor-card { aspect-ratio: 1 / 1; }
.kd-material-vendor-card:hover,
.kd-material-vendor-card:focus-visible { border-color: #806f46; background: #fbf5e5; transform: translateY(-1px); }
.kd-material-vendor-card.active { border-color: #806f46; background: #f5ecd4; box-shadow: inset 0 0 0 1px #806f46; }
.kd-material-vendor-art { display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid #e5dcc2; background: linear-gradient(145deg, #f6efd9, #e7dcc0); color: #806f46; }
.kd-material-vendor-card.active .kd-material-vendor-art { background: linear-gradient(145deg, #e7dcc0, #d6c59b); color: #594a29; }
.kd-material-vendor-illustration { display: block; width: min(112px, 92%); height: 58px; }
.kd-material-vendor-copy { display: grid; align-content: start; min-width: 0; gap: 2px; padding: 9px 10px 10px; }
.kd-material-vendor-copy strong { color: #403823; font-size: .78rem; line-height: 1.3; overflow-wrap: anywhere; white-space: normal; }
.kd-material-vendor-copy small { color: #6d6040; font-size: .7rem; font-weight: 900; }
.kd-material-vendor-copy em { color: #62563f; font-size: .64rem; font-style: normal; line-height: 1.35; overflow-wrap: anywhere; }
.kd-material-summary-table {
  display: grid;
  flex: 1 0 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d8cfb7;
  border-radius: 10px;
  background: #fffdf8;
}
.kd-material-summary-table > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #e5deca; background: #faf6e9; padding: 12px 14px; }
.kd-material-summary-table > header > span { display: grid; min-width: 0; gap: 3px; }
.kd-material-summary-table > header strong { color: #403823; font-size: .9rem; }
.kd-material-summary-table > header small { color: #766d57; font-size: .7rem; line-height: 1.45; }
.kd-material-summary-table > header > b { flex: 0 0 auto; border-radius: 999px; background: #e9e0c5; color: #55492c; padding: 5px 9px; font-size: .7rem; }
.kd-material-summary-scroll { max-width: 100%; max-height: 360px; overflow: auto; }
.kd-material-summary-scroll:focus-visible { outline: 3px solid rgba(128, 111, 70, .28); outline-offset: -3px; }
.kd-material-summary-table table { width: 100%; min-width: 820px; border-collapse: collapse; color: #4d4532; font-size: .76rem; }
.kd-material-summary-table th,
.kd-material-summary-table td { border-bottom: 1px solid #eee8d9; padding: 9px 11px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.kd-material-summary-table .summary-nowrap { white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
.kd-material-summary-table thead th { position: sticky; top: 0; z-index: 1; background: #f4efdf; color: #665a3d; font-size: .68rem; letter-spacing: .02em; }
.kd-material-summary-table tbody th { color: #3f361f; font-size: .78rem; }
.kd-material-summary-table tbody tr:last-child > * { border-bottom: 0; }
.kd-material-summary-table tbody tr:hover { background: #fcf9ef; }
.kd-material-summary-vendor { display: inline-block; border-radius: 999px; background: #e9e0c5; color: #55492c; padding: 3px 7px; font-size: .67rem; white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
.kd-material-summary-projects { display: flex; flex-wrap: wrap; gap: 4px; }
.kd-material-summary-projects b { border-radius: 999px; background: #f0ebdc; color: #5d5134; padding: 3px 7px; font-size: .67rem; }
.kd-material-summary-empty { color: #807761; padding: 18px !important; text-align: center !important; }
.kd-material-history-record { border-color: #d8cfb7; background: #fffdf7; }
.kd-material-history-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; cursor: pointer; list-style: none; }
.kd-material-history-summary::-webkit-details-marker { display: none; }
.kd-material-history-summary > span { display: grid; gap: 4px; min-width: 0; }
.kd-material-history-summary small { color: #806f46; font-size: .7rem; font-weight: 900; }
.kd-material-history-summary strong { color: #302a1b; font-size: 1rem; overflow-wrap: anywhere; }
.kd-material-history-summary em { color: #62583f; font-size: .8rem; font-style: normal; overflow-wrap: anywhere; }
.kd-material-history-summary > i { width: 9px; height: 9px; border-right: 2px solid #776a4b; border-bottom: 2px solid #776a4b; transform: rotate(45deg); transition: transform .18s ease; }
.kd-material-history-record[open] .kd-material-history-summary > i { transform: rotate(225deg); }
.kd-material-history-content { display: grid; gap: 14px; border-top: 1px solid #e5deca; padding: 16px 18px 18px; }
.kd-material-history-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kd-material-history-meta > span { display: grid; gap: 3px; border-radius: 8px; background: #f7f3e8; padding: 10px; }
.kd-material-history-meta > span.wide { grid-column: 1 / -1; }
.kd-material-history-meta small { color: #65593d; font-size: .68rem; font-weight: 800; }
.kd-material-history-meta b { color: #403823; font-size: .82rem; overflow-wrap: anywhere; }
.kd-material-model-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.kd-material-model-tags span { border: 1px solid #cdbf96; border-radius: 999px; background: #fbf7eb; color: #55492c; padding: 5px 9px; font-size: .75rem; font-weight: 900; }
.kd-material-item-list { display: grid; gap: 8px; }
.kd-material-item-list article { display: grid; grid-template-columns: minmax(110px, .6fr) minmax(0, 1fr); gap: 5px 12px; border-left: 3px solid #9b8957; background: #faf8f1; padding: 10px 12px; }
.kd-material-item-list article b { color: #413820; overflow-wrap: anywhere; }
.kd-material-item-list article span { color: #554f3f; overflow-wrap: anywhere; }
.kd-material-item-list article small { grid-column: 1 / -1; color: #766d57; }
.kd-material-item-summary { margin: 0; color: #5d5543; font-size: .82rem; line-height: 1.65; }
.kd-material-history-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #7a725e; font-size: .72rem; }
.project-kd-material-links > strong { color: #665631; }
.kd-alias-review-toolbar { display: grid; gap: 12px; border-color: #d5c89f; background: linear-gradient(145deg, #fffdf7, #f7f1df); }
.kd-alias-review-toolbar > div:first-child { display: grid; gap: 4px; }
.kd-alias-review-toolbar > div:first-child strong { color: #43381d; }
.kd-alias-review-toolbar > div:first-child p { margin: 0; color: #706343; font-size: .78rem; line-height: 1.55; }
.kd-alias-view-switch { display: flex; flex-wrap: wrap; gap: 8px; }
.kd-alias-view-switch button { min-height: 40px; }
.kd-alias-view-switch button.active { border-color: #806f46; background: #806f46; color: #fff; }
.kd-alias-view-switch button b { margin-left: 4px; }
.kd-alias-review-status { margin: 0; border-left: 3px solid #9d8953; color: #675a39; padding-left: 10px; font-size: .76rem; font-weight: 800; }
.kd-alias-review-status.error { border-left-color: #b75243; color: #943c31; }
.kd-alias-approved-mappings { border-top: 1px solid #ddd1ae; padding-top: 9px; }
.kd-alias-approved-mappings summary { color: #5b4c2b; cursor: pointer; font-size: .76rem; font-weight: 900; }
.kd-alias-approved-mappings > div { display: grid; gap: 5px; margin-top: 8px; }
.kd-alias-approved-mappings span { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: center; gap: 7px; border-radius: 7px; background: rgba(255, 255, 255, .7); padding: 7px 9px; color: #574c32; font-size: .72rem; }
.kd-alias-approved-mappings i { color: #9b8957; font-style: normal; }
.kd-alias-approved-mappings small { color: #827653; font-weight: 900; }
.kd-material-alias-review-mode .operation-records { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.kd-material-alias-review-mode .operation-records > datalist { display: none; }
.kd-material-alias-review-mode .operation-records > .empty { grid-column: 1 / -1; }
.kd-alias-review-card { overflow: hidden; border-color: #d7cca9; background: #fffdf8; }
.kd-alias-review-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e4dcc5; background: #faf6e9; padding: 14px; }
.kd-alias-review-card > header > div:first-child { display: grid; min-width: 0; gap: 3px; }
.kd-alias-review-card > header small { color: #806f46; font-size: .68rem; font-weight: 900; }
.kd-alias-review-card > header strong { color: #342d1d; overflow-wrap: anywhere; }
.kd-alias-review-card > header span { color: #71664c; font-size: .72rem; }
.kd-alias-count { display: grid; flex: 0 0 auto; min-width: 64px; border-radius: 9px; background: #e9e0c5; color: #4e4328; padding: 8px; text-align: center; }
.kd-alias-count b { font-size: 1.15rem; }
.kd-alias-count small { font-size: .62rem; }
.kd-alias-review-body { display: grid; gap: 12px; padding: 14px; }
.kd-alias-held-warning { margin: 0; border-radius: 7px; background: #fff2d5; color: #785a22; padding: 8px 10px; font-size: .72rem; line-height: 1.5; }
.kd-alias-suggestions { display: grid; gap: 6px; }
.kd-alias-suggestions > small { color: #776b4e; font-size: .68rem; font-weight: 900; }
.kd-alias-suggestions > div { display: flex; flex-wrap: wrap; gap: 6px; }
.kd-alias-suggestion { min-height: 36px; border: 1px solid #cdbf96; border-radius: 999px; background: #fbf7eb; color: #55492c; padding: 6px 10px; font-size: .72rem; font-weight: 900; }
.kd-alias-suggestion:hover,
.kd-alias-suggestion:focus-visible { border-color: #806f46; background: #f1e8cf; }
.kd-alias-no-suggestion { color: #8b8066; font-size: .72rem; }
.kd-alias-review-card .field-label > small { color: #796e54; font-size: .68rem; }
.kd-alias-approve-button { width: 100%; min-height: 44px; }
.kd-alias-approve-button.is-armed { background: #9b5c33; box-shadow: 0 0 0 3px rgba(155, 92, 51, .16); }

.knowledge-system-board-category-card { border-color: #b9c6b3; background: linear-gradient(135deg, #fbfcf7, #edf2e8); }
.knowledge-system-board-category-card:hover,
.knowledge-system-board-category-card:focus-visible { border-color: #65765b; background: #e8f0e2; }
.knowledge-system-board-category-art { background: #dfe8d8; color: #56674d; }
.system-board-history-mode .operation-dashboard { align-items: flex-start; }
.system-board-history-mode .operation-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  margin: 18px;
  border: 1px solid #d8cfb7;
  border-radius: 10px;
  background: #fffdf8;
}
.system-board-history-mode .operation-editor {
  position: static;
  top: auto;
  border: 0;
  border-bottom: 1px solid #e5deca;
  background: #faf6e9;
  padding: 0;
}
.system-board-history-mode .operation-record-section { width: 100%; min-width: 0; background: transparent; padding: 0; }
.system-board-history-mode .operation-list-heading {
  margin: 0;
  border-bottom: 1px solid #e5deca;
  background: #fffdf8;
  padding: 10px 14px;
}
.system-board-history-mode .operation-list-heading > div:first-child { min-width: 0; }
.system-board-history-mode #operationRecordTitle { display: none; }
.system-board-history-mode .operation-records { display: grid; gap: 0; }
.system-board-history-mode #operationFeedback:not([hidden]) { margin: 0 14px 12px; }
.system-board-history-mode #operationStats:has(#systemBoardInlineFeedback) + .operation-workspace #operationFeedback { display: none; }
.system-board-vendor-row { display: grid; grid-template-columns: 308px minmax(460px, 1fr); align-items: stretch; gap: 12px; min-width: 0; }
.system-board-vendor-grid { grid-template-columns: repeat(2, minmax(138px, 150px)); align-content: start; justify-content: start; }
.system-board-inline-controls { min-width: 0; }
.system-board-inline-controls .system-board-history-toolbar { height: 100%; overflow: hidden; border: 1px solid #d8cfb7; border-radius: 10px; background: #fffdf8; }
.system-board-inline-controls .system-board-project-panel-header { padding: 10px 12px; }
.system-board-inline-controls .system-board-project-panel-body { gap: 8px; padding: 10px 12px; }
.system-board-inline-controls .system-board-filter-groups { display: flex; flex-wrap: wrap; gap: 7px; }
.system-board-inline-controls .kd-alias-view-switch { gap: 6px; }
.system-board-inline-controls .kd-alias-view-switch button { min-height: 36px; padding: 7px 10px; }
.system-board-inline-feedback { margin: 0; padding: 7px 9px; font-size: .72rem; }
.system-board-vendor-card .kd-material-vendor-art { background: linear-gradient(145deg, #eef2e8, #d8e1d1); color: #607056; }
.system-board-vendor-card.active .kd-material-vendor-art { background: linear-gradient(145deg, #dbe5d5, #bdccb5); color: #415238; }
.system-board-summary-table table { min-width: 1120px; }
.system-board-model-button { min-height: 34px; border: 1px solid #a8b69f; border-radius: 7px; background: #f1f6ed; color: #34422d; padding: 5px 8px; font: inherit; font-weight: 900; }
.system-board-model-button.summary-model-code { white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
.system-board-model-button:hover,
.system-board-model-button:focus-visible { border-color: #65765b; background: #e3eddd; }
.kd-material-summary-table .kd-material-col-vendor,
.kd-material-summary-table .system-board-col-vendor { min-width: 76px; }
.kd-material-summary-table .kd-material-col-model { min-width: 92px; }
.kd-material-summary-table .system-board-col-model { min-width: 112px; }
.kd-material-summary-table .system-board-col-thickness { min-width: 68px; }
.kd-material-summary-table .system-board-col-ship { min-width: 112px; }
.kd-material-summary-table .system-board-col-quantity { min-width: 190px; }
.kd-material-summary-table .system-board-col-status { min-width: 112px; }
.system-board-thickness-list { color: #46533f; white-space: nowrap; }
.system-board-verified-name { display: grid; gap: 3px; min-width: 100px; }
.system-board-verified-name b { color: #514a37; font-size: .72rem; }
.system-board-related-projects button { display: inline-flex; align-items: baseline; min-height: 30px; gap: 5px; border: 0; border-radius: 999px; background: #edf2e9; color: #4c5945; padding: 4px 8px; font-size: .66rem; font-weight: 900; white-space: nowrap; }
.system-board-related-projects button time { color: #6d7867; font-size: .61rem; font-weight: 800; }
.system-board-related-projects button:hover,
.system-board-related-projects button:focus-visible { background: #dbe6d5; color: #35412f; }
.system-board-spec-list { display: flex; flex-wrap: wrap; min-width: 220px; gap: 4px; }
.system-board-spec-list > b,
.system-board-spec-list details i { border-radius: 999px; background: #f0f3e9; color: #4b5942; padding: 3px 7px; font-size: .66rem; font-style: normal; }
.system-board-spec-list details { width: 100%; }
.system-board-spec-list details summary { color: #65765b; cursor: pointer; font-size: .66rem; font-weight: 900; }
.system-board-spec-list details span { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.system-board-quantity-summary { display: inline-flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.system-board-quantity-summary i { color: #8a927e; font-style: normal; }
.system-board-quantity-meta { display: inline; margin: 0; color: #6e765f; font-size: .65rem; }
.system-board-status { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 4px 8px; font-size: .66rem; font-style: normal; font-weight: 900; line-height: 1.2; white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
.system-board-status.discontinued { background: #f6d8d3; color: #8d352b; }
.system-board-status.available { background: #dcebd9; color: #396238; }
.system-board-status.not_marked { background: #eee9dc; color: #695f46; }
.system-board-status.review { background: #fae8bd; color: #785818; }
.system-board-history-toolbar { margin: 0; border: 0; border-radius: 0; background: transparent; }
.system-board-project-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #e5deca;
  background: #faf6e9;
  padding: 12px 14px;
}
.system-board-project-panel-header > span { display: grid; min-width: 0; gap: 3px; }
.system-board-project-panel-header h3 { margin: 0; color: #3d321c; font-size: .88rem; }
.system-board-project-panel-header small { color: #7a7059; font-size: .68rem; line-height: 1.45; }
.system-board-project-panel-header > b { flex: 0 0 auto; border-radius: 999px; background: #eee4c8; color: #594b2b; padding: 7px 10px; font-size: .68rem; white-space: nowrap; }
.system-board-project-panel-body { display: grid; gap: 10px; padding: 12px 14px; }
.system-board-review-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.system-board-review-summary > span { display: grid; gap: 2px; border: 1px solid #e0dbc9; border-radius: 8px; background: rgba(255, 255, 255, .72); padding: 9px 10px; }
.system-board-review-summary b { color: #3f4d38; font-size: 1rem; }
.system-board-review-summary small { color: #706952; font-size: .66rem; font-weight: 800; }
.system-board-source-coverage { margin: 0; color: #66705d; font-size: .72rem; line-height: 1.55; }
.system-board-filter-groups { display: grid; gap: 8px; }
.system-board-status-switch button.active,
.system-board-usage-switch button.active { border-color: #65765b; background: #65765b; color: #fff; }
.system-board-history-mode .system-board-project-record {
  margin: 0;
  border: 0;
  border-bottom: 1px solid #eee8d9;
  border-radius: 0;
  background: #fffdf8;
  padding: 0;
}
.system-board-history-mode .system-board-project-record > summary { padding: 10px 14px; }
.system-board-history-mode .system-board-project-record > summary:focus-visible { outline: 3px solid rgba(128, 111, 70, .28); outline-offset: -3px; }
.system-board-project-summary small { color: #607056; }
.system-board-project-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.system-board-project-totals.has-board-feet { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.system-board-project-totals > span { display: grid; gap: 3px; border-radius: 8px; background: #f2f5ed; padding: 10px; }
.system-board-project-totals small { color: #62705a; font-size: .67rem; font-weight: 800; }
.system-board-project-totals b { color: #35412f; font-size: .85rem; overflow-wrap: anywhere; }
.system-board-drawing-list { border: 1px solid #e1ddcf; border-radius: 8px; background: #fbfaf5; padding: 9px 11px; }
.system-board-drawing-list summary { color: #58644f; cursor: pointer; font-size: .72rem; font-weight: 900; }
.system-board-drawing-list > span { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.system-board-drawing-list b { border-radius: 999px; background: #ecefe6; color: #4f5947; padding: 4px 7px; font-size: .67rem; }
.system-board-usage-list { display: grid; gap: 9px; }
.system-board-usage-list > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.system-board-usage-list > header strong { color: #35412f; }
.system-board-usage-list > header small { color: #6b745f; font-size: .68rem; font-weight: 800; }
.system-board-usage-item { display: grid; gap: 9px; border-left: 3px solid #75836b; background: #fafbf7; padding: 11px 12px; }
.system-board-usage-item > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.system-board-usage-item > header > span:first-child { display: grid; min-width: 0; gap: 2px; }
.system-board-usage-item > header b { color: #33402d; white-space: nowrap; overflow-wrap: normal; }
.system-board-usage-item > header small { display: flex; align-items: baseline; min-width: 0; gap: 6px; color: #6b745f; font-size: .7rem; }
.system-board-usage-item > header small span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.system-board-usage-item > header small b { flex: 0 0 auto; color: inherit; font-size: inherit; font-weight: inherit; white-space: nowrap; overflow-wrap: normal; }
.system-board-usage-metrics { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.system-board-usage-metrics.has-board-feet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.system-board-usage-metrics > span { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; border-radius: 6px; background: #eef2e9; padding: 6px 8px; white-space: nowrap; }
.system-board-usage-metrics small { color: #69735f; font-size: .64rem; font-weight: 800; }
.system-board-usage-metrics b { color: #3f4b38; font-size: .73rem; }
.system-board-project-specs { display: flex; flex-wrap: wrap; gap: 5px; }
.system-board-project-specs > b,
.system-board-project-specs details i { border: 1px solid #d3dbc9; border-radius: 999px; background: #f7f9f4; color: #4d5b45; padding: 4px 7px; font-size: .67rem; font-style: normal; }
.system-board-project-specs > em { color: #817a66; font-size: .7rem; }
.system-board-project-specs details { width: 100%; }
.system-board-project-specs details summary { color: #607056; cursor: pointer; font-size: .68rem; font-weight: 900; }
.system-board-project-specs details span { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.system-board-project-empty { margin: 14px; }
.system-board-footer-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid #e5deca;
  background: #f3f2ef;
  padding: 12px 14px;
}
.system-board-footer-stats .operation-stat { flex: 0 1 150px; }
.system-board-footer-stats .operation-chart { flex: 1 1 320px; }
.system-board-analysis-table table { min-width: 1080px; }
.system-board-analysis-table td > b,
.system-board-analysis-table td > small { display: block; white-space: nowrap; }
.system-board-analysis-table td > b { color: #35412f; font-size: .8rem; }
.system-board-analysis-table td > small { margin-top: 3px; color: #6d765f; font-size: .64rem; font-weight: 800; }
.system-board-analysis-projects { display: flex; flex-wrap: wrap; min-width: 240px; gap: 5px; }
.system-board-analysis-projects button { min-height: 28px; border: 0; border-radius: 999px; background: #edf2e9; color: #46533f; padding: 4px 8px; font-size: .65rem; font-weight: 900; }
.system-board-analysis-projects button:hover,
.system-board-analysis-projects button:focus-visible { background: #dbe6d5; color: #35412f; }
.system-board-analysis-empty { color: #817a66; }

@media (max-width: 1100px) {
  .system-board-vendor-row { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px), (max-device-width: 760px), (hover: none) and (pointer: coarse) {
  .system-board-history-mode .operation-workspace { margin: 10px; }
  .system-board-vendor-row { grid-template-columns: minmax(0, 1fr); }
  .system-board-project-panel-header,
  .system-board-project-panel-body { padding: 11px 12px; }
  .system-board-history-mode .operation-list-heading { align-items: stretch; flex-direction: column; padding: 10px 12px; }
  .system-board-history-mode .operation-list-controls { width: 100%; }
  .system-board-history-mode #operationSearchInput { width: 100%; min-height: 44px; }
  .system-board-footer-stats .operation-chart { flex-basis: 100%; min-width: 0; border-top: 1px solid #ddd6c5; border-left: 0; padding-top: 10px; padding-left: 0; }
  .kd-material-history-footer { align-items: stretch; flex-direction: column; }
  .kd-material-history-footer button { width: 100%; }
  .kd-material-summary-table > header { align-items: flex-start; flex-direction: column; }
  .kd-material-summary-scroll { max-height: 320px; }
  .kd-material-vendor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kd-material-vendor-card { min-height: 132px; }
  .kd-material-history-mode .kd-material-vendor-card,
  .system-board-history-mode .kd-material-vendor-card { aspect-ratio: auto; }
  .kd-material-history-meta { grid-template-columns: 1fr; }
  .kd-material-history-meta > span.wide { grid-column: auto; }
  .kd-material-item-list article { grid-template-columns: 1fr; }
  .kd-material-item-list article small { grid-column: auto; }
  .kd-material-alias-review-mode .operation-records { grid-template-columns: 1fr; }
  .kd-alias-view-switch { display: grid; grid-template-columns: 1fr; }
  .kd-alias-view-switch button,
  .kd-alias-suggestion { min-height: 44px; }
  .kd-alias-approved-mappings span { grid-template-columns: minmax(0, 1fr) auto; }
  .kd-alias-approved-mappings span i { display: none; }
  .system-board-review-summary,
  .system-board-project-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .system-board-usage-item > header,
  .system-board-usage-list > header { align-items: stretch; flex-direction: column; }
}

@media (max-width: 520px) {
  .kd-material-vendor-menu > header { align-items: flex-start; flex-direction: column; }
  .kd-material-vendor-grid { grid-template-columns: minmax(0, 1fr); }
  .kd-material-vendor-card { grid-template-columns: 92px minmax(0, 1fr); grid-template-rows: minmax(76px, auto); min-height: 76px; }
  .kd-material-vendor-art { border-right: 1px solid #e5dcc2; border-bottom: 0; }
  .kd-material-vendor-copy { align-content: center; }
  .knowledge-kd-category-card { grid-template-columns: 44px minmax(0, 1fr); }
  .knowledge-kd-category-art { width: 44px; }
  .system-board-vendor-grid,
  .system-board-review-summary,
  .system-board-project-totals,
  .system-board-usage-metrics { grid-template-columns: minmax(0, 1fr); }
  .system-board-project-totals.has-board-feet,
  .system-board-usage-metrics.has-board-feet { grid-template-columns: minmax(0, 1fr); }
  .system-board-footer-stats .operation-stat { flex: 1 1 100%; }
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.system-cabinet-management-page {
  gap: 18px;
}

.system-cabinet-management-heading,
.system-cabinet-panel-heading,
.system-cabinet-heading-actions,
.system-cabinet-import-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.system-cabinet-heading-actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.system-cabinet-feedback {
  border: 1px solid #d8cfb7;
  border-radius: 10px;
  background: #fffdf8;
  color: #665b40;
  padding: 10px 12px;
  font-size: .78rem;
  font-weight: 800;
}

.system-cabinet-feedback.loading { border-color: #c8a063; background: #faf4e8; }
.system-cabinet-feedback.success { border-color: #b9c9b1; background: #f2f7ee; color: #45583e; }
.system-cabinet-feedback.error { border-color: #dfb5ad; background: #fbefed; color: #8b3e33; }

.system-cabinet-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.system-cabinet-metrics article {
  display: grid;
  min-width: 0;
  gap: 5px;
  border: 1px solid #ded9ca;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #f5f3ec);
  padding: 16px;
  box-shadow: var(--shadow);
}

.system-cabinet-metrics span,
.system-cabinet-metrics small { color: #716b5b; font-size: .7rem; font-weight: 800; }
.system-cabinet-metrics strong { color: #35412f; font-size: 1.55rem; overflow-wrap: anywhere; }

.system-cabinet-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.system-cabinet-panel,
.system-cabinet-import-panel {
  min-width: 0;
  border: 1px solid #d9d5ca;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.system-cabinet-panel-heading {
  align-items: flex-start;
  padding: 14px 16px;
  border-bottom: 1px solid #e7e2d7;
  background: #faf9f5;
}

.system-cabinet-panel-heading h3,
.system-cabinet-import-copy h3 { margin: 2px 0 0; color: #282820; font-size: 1rem; }
.system-cabinet-panel-heading > span { color: #777060; font-size: .68rem; font-weight: 800; text-align: right; }

.system-cabinet-table-wrap {
  max-height: 520px;
  overflow: auto;
  overscroll-behavior: contain;
}

.system-cabinet-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: .72rem;
}

.system-cabinet-table th,
.system-cabinet-table td {
  border-bottom: 1px solid #ebe7dd;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.system-cabinet-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #f2f1ec;
  color: #5d584b;
  font-size: .66rem;
  white-space: nowrap;
}

.system-cabinet-table td strong,
.system-cabinet-table td small { display: block; }
.system-cabinet-table td strong { color: #33352d; }
.system-cabinet-table td small { margin-top: 3px; color: #797466; }
.system-cabinet-status {
  display: inline-flex;
  border-radius: 999px;
  background: #eee9dc;
  color: #655d48;
  padding: 4px 8px;
  font-size: .65rem;
  font-weight: 900;
  white-space: nowrap;
}
.system-cabinet-status.active { background: #f7e7bd; color: #755516; }
.system-cabinet-status.complete { background: #dcebd9; color: #396238; }

.system-cabinet-import-panel {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(260px, .7fr);
  gap: 0;
}

.system-cabinet-import-copy,
.system-cabinet-import-actions { padding: 18px; }
.system-cabinet-import-copy { border-right: 1px solid #e5e0d5; background: #faf9f4; }
.system-cabinet-import-copy p,
.system-cabinet-import-copy ol { color: #676254; font-size: .76rem; line-height: 1.65; }
.system-cabinet-import-copy ol { margin: 10px 0 0; padding-left: 20px; }
.system-cabinet-import-copy .new-cabinet-privacy-note {
  margin: 12px 0 0;
  border-left: 3px solid #75836b;
  background: #f1f4ee;
  padding: 9px 11px;
  color: #485242;
  font-size: .7rem;
}
.system-cabinet-import-actions { align-content: start; align-items: stretch; flex-direction: column; justify-content: flex-start; }
.system-cabinet-import-actions > .button-link,
.system-cabinet-import-actions > button { width: 100%; min-height: 42px; }
.system-cabinet-import-actions > small { color: #716b5b; font-size: .7rem; overflow-wrap: anywhere; }
.system-cabinet-file-field { display: grid; gap: 6px; color: #4c493f; font-size: .72rem; font-weight: 900; }
.system-cabinet-file-field input { width: 100%; border: 1px solid #d5d0c4; border-radius: 8px; background: #fff; padding: 9px; }

.new-cabinet-extension-install { display: grid; gap: 9px; border: 1px solid #cfd8c9; border-radius: 10px; background: #f3f7f0; padding: 12px; }
.new-cabinet-extension-install-heading { display: grid; gap: 3px; }
.new-cabinet-extension-install-heading > span { color: #687b60; font-size: .62rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.new-cabinet-extension-install-heading > strong { color: #35432f; font-size: .78rem; }
.new-cabinet-extension-install > p { margin: 0; color: #5f6859; font-size: .69rem; line-height: 1.55; }
.new-cabinet-extension-install > .button-link { width: 100%; min-height: 40px; }
.new-cabinet-extension-install details { border-top: 1px solid #d9e0d4; padding-top: 8px; color: #596252; font-size: .68rem; }
.new-cabinet-extension-install summary { cursor: pointer; color: #46533f; font-weight: 900; }
.new-cabinet-extension-install ol { margin: 8px 0 0; padding-left: 19px; line-height: 1.6; }
.new-cabinet-extension-install code { overflow-wrap: anywhere; color: #384432; font-size: .64rem; }
.new-cabinet-extension-install small { display: block; margin-top: 8px; color: #6f756a; font-size: .64rem; line-height: 1.5; }

.new-cabinet-bridge-control { display: grid; gap: 8px; border: 1px solid #d9d4c7; border-radius: 10px; background: #fbfaf6; padding: 11px; }
.new-cabinet-bridge-control > button { width: 100%; min-height: 40px; }
.new-cabinet-bridge-control > small { color: #746e60; font-size: .66rem; line-height: 1.5; }
.new-cabinet-bridge-status { border-radius: 8px; background: #efeee8; color: #5e5a50; padding: 8px 10px; font-size: .7rem; font-weight: 800; line-height: 1.5; }
.new-cabinet-bridge-status.ready { background: #e8f2e5; color: #365b35; }
.new-cabinet-bridge-status.loading { background: #faf0d7; color: #765719; }
.new-cabinet-bridge-status.error { background: #fae9e5; color: #873c32; }
.new-cabinet-manual-divider { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; color: #817a6a; font-size: .65rem; font-weight: 900; }
.new-cabinet-manual-divider::before,
.new-cabinet-manual-divider::after { content: ""; height: 1px; background: #ddd8cc; }

.new-cabinet-bridge-candidates { grid-column: 1 / -1; display: grid; gap: 9px; border-top: 1px solid #e5e0d5; background: #f7f6f1; padding: 15px 18px; }
.new-cabinet-bridge-candidates[hidden] { display: none; }
.new-cabinet-bridge-candidates > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.new-cabinet-bridge-candidates > header h4 { margin: 0; color: #34352f; font-size: .86rem; }
.new-cabinet-bridge-candidates > header span { color: #777064; font-size: .68rem; font-weight: 800; }
.new-cabinet-bridge-candidate { display: grid; grid-template-columns: minmax(160px, 1fr) repeat(2, minmax(110px, .55fr)) minmax(100px, .45fr) auto; align-items: center; gap: 10px; border: 1px solid #dfdbd0; border-radius: 10px; background: #fff; padding: 11px 12px; }
.new-cabinet-bridge-candidate > div { min-width: 0; }
.new-cabinet-bridge-candidate strong,
.new-cabinet-bridge-candidate small { display: block; overflow-wrap: anywhere; }
.new-cabinet-bridge-candidate strong { color: #34362f; font-size: .74rem; }
.new-cabinet-bridge-candidate small { margin-top: 3px; color: #777064; font-size: .64rem; }
.new-cabinet-bridge-candidate .system-cabinet-status { justify-self: start; }
.new-cabinet-bridge-candidate button { min-height: 36px; white-space: nowrap; }

.new-cabinet-draft {
  grid-column: 1 / -1;
  border-top: 1px solid #e5e0d5;
  padding: 16px 18px;
}

.new-cabinet-draft-card { display: grid; gap: 13px; }
.new-cabinet-draft-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.new-cabinet-draft-heading h4 { margin: 0; font-size: 1rem; }
.new-cabinet-draft-heading p { margin: 4px 0 0; color: #736d5e; font-size: .72rem; }
.new-cabinet-confidence { border-radius: 999px; background: #edf2e9; color: #46533f; padding: 6px 9px; font-size: .7rem; font-weight: 900; white-space: nowrap; }
.new-cabinet-draft-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.new-cabinet-draft-meta span { display: grid; gap: 3px; border-radius: 8px; background: #f4f2ec; padding: 9px; }
.new-cabinet-draft-meta small { color: #777064; font-size: .63rem; font-weight: 800; }
.new-cabinet-draft-meta b { color: #3d3b34; font-size: .72rem; overflow-wrap: anywhere; }
.new-cabinet-draft-warning { margin: 0; border-left: 3px solid #c39138; background: #fbf2dc; color: #72551e; padding: 9px 11px; font-size: .72rem; line-height: 1.55; }
.new-cabinet-draft-lines { display: grid; gap: 6px; }
.new-cabinet-draft-lines article { display: grid; grid-template-columns: minmax(120px, .75fr) minmax(0, 1.25fr); gap: 10px; border-bottom: 1px solid #ece8de; padding: 7px 0; font-size: .72rem; }
.new-cabinet-draft-lines article span { color: #706a5c; overflow-wrap: anywhere; }
.new-cabinet-draft-actions { display: flex; justify-content: flex-end; gap: 8px; }

.project-nas-source-path {
  display: grid;
  gap: 3px;
  border-left: 3px solid #75836b;
  background: #f4f6f1;
  padding: 9px 11px;
  color: #43503d;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.project-nas-source-path small { color: #6f7869; font-size: .65rem; font-weight: 900; }
.project-nas-source-path code { font-family: "Noto Sans Mono", Consolas, monospace; font-size: .7rem; white-space: normal; }

.navigation-feature-panel { display: grid; gap: 16px; }
.navigation-feature-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.navigation-feature-heading strong { display: block; color: #34362f; font-size: .92rem; }
.navigation-feature-heading p { max-width: 720px; margin: 5px 0 0; color: #706a5e; font-size: .72rem; line-height: 1.6; }
.navigation-feature-heading > span { border-radius: 999px; background: #efeee8; color: #625e54; padding: 6px 10px; font-size: .66rem; font-weight: 900; white-space: nowrap; }
.navigation-feature-locked { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; border: 1px solid #d9e2d5; border-radius: 10px; background: #f3f7f0; padding: 12px 14px; color: #42533e; }
.navigation-feature-locked strong { margin-right: 3px; font-size: .74rem; }
.navigation-feature-locked span { border-radius: 999px; background: #fff; padding: 5px 8px; font-size: .66rem; font-weight: 800; }
.navigation-feature-locked small { flex-basis: 100%; color: #687361; font-size: .65rem; }
.navigation-feature-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.navigation-feature-group { min-width: 0; margin: 0; border: 1px solid #e2ded3; border-radius: 11px; background: #faf9f5; padding: 10px; }
.navigation-feature-group legend { padding: 0 6px; color: #4d5047; font-size: .7rem; font-weight: 900; }
.navigation-feature-switches { display: grid; gap: 7px; }
.navigation-feature-switch { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; border-radius: 8px; background: #fff; padding: 9px 10px; cursor: pointer; }
.navigation-feature-switch span { min-width: 0; }
.navigation-feature-switch strong,
.navigation-feature-switch small { display: block; }
.navigation-feature-switch strong { color: #3f413b; font-size: .72rem; }
.navigation-feature-switch small { margin-top: 2px; color: #817a6e; font-size: .62rem; }
.navigation-feature-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.navigation-feature-switch i { position: relative; width: 36px; height: 20px; border-radius: 999px; background: #c8c6bf; transition: background .16s ease; }
.navigation-feature-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .16s ease; }
.navigation-feature-switch input:checked + i { background: #567a59; }
.navigation-feature-switch input:checked + i::after { transform: translateX(16px); }
.navigation-feature-switch input:focus-visible + i { outline: 3px solid rgba(58, 100, 66, .25); outline-offset: 2px; }
.navigation-feature-switch input:disabled + i { opacity: .45; }
.navigation-feature-actions { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 1100px) {
  .system-cabinet-dashboard-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px), (max-device-width: 760px), (hover: none) and (pointer: coarse) {
  .system-cabinet-management-heading,
  .system-cabinet-panel-heading,
  .new-cabinet-draft-heading { align-items: stretch; flex-direction: column; }
  .system-cabinet-heading-actions { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .system-cabinet-metrics { grid-template-columns: minmax(0, 1fr); }
  .system-cabinet-import-panel { grid-template-columns: minmax(0, 1fr); }
  .system-cabinet-import-copy { border-right: 0; border-bottom: 1px solid #e5e0d5; }
  .new-cabinet-bridge-candidates { grid-column: auto; }
  .new-cabinet-bridge-candidates > header { align-items: flex-start; flex-direction: column; }
  .new-cabinet-bridge-candidate { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .new-cabinet-bridge-candidate button { width: 100%; }
  .new-cabinet-draft { grid-column: auto; }
  .new-cabinet-draft-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .new-cabinet-draft-lines article { grid-template-columns: minmax(0, 1fr); }
  .new-cabinet-draft-actions { align-items: stretch; flex-direction: column; }
  .navigation-feature-heading { align-items: stretch; flex-direction: column; }
  .navigation-feature-heading > span { align-self: flex-start; white-space: normal; }
  .navigation-feature-groups { grid-template-columns: minmax(0, 1fr); }
  .navigation-feature-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.project-specification-panel { width: min(1480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; color: #302d29; }
.project-specification-heading { display: flex; align-items: flex-start; justify-content: center; position: relative; padding: 0 70px 16px; border-bottom: 2px solid #393632; }
.project-specification-studio { text-align: center; min-width: 0; }
.project-specification-studio > span { font-size: 17px; font-weight: 650; letter-spacing: .03em; }
.project-specification-heading h2 { margin: 8px 0 0; font-size: 25px; letter-spacing: .22em; }
.project-specification-heading > button { position: absolute; right: 0; top: 0; width: auto; }
.project-specification-document-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .7fr); gap: 24px; margin: 14px 0 10px; font-size: 12px; }
.project-specification-document-meta dl { margin: 0; display: grid; gap: 4px; align-content: start; }
.project-specification-document-meta dl > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; }
.project-specification-document-meta dt { color: #767169; }
.project-specification-document-meta dd { margin: 0; overflow-wrap: anywhere; font-weight: 550; }
.project-specification-categories { display: flex; gap: 7px; overflow-x: auto; padding: 5px 1px 10px; }
.project-specification-category { display: grid; grid-template-columns: 23px 1fr auto; align-items: center; gap: 7px; min-width: 112px; padding: 11px 12px; width: auto; flex: 0 0 auto; background: #faf9f6; border: 1px solid #dedbd5; border-radius: 5px; color: #58544d; font-size: 12px; }
.project-specification-category svg { width: 22px; height: 22px; }
.project-specification-category small { color: #8a8277; font-weight: 400; }
.project-specification-category[aria-pressed=true] { background: #343a35; color: #fff; border-color: #343a35; }
.project-specification-category[aria-pressed=true] small { color: #d5dccf; }
.project-specification-category:focus-visible, .project-specification-panel summary:focus-visible { outline: 2px solid #987642; outline-offset: 2px; }
.project-specification-path { overflow-wrap: anywhere; padding: 8px 10px; background: #f4f2ee; font-size: 12px; }
.project-specification-toolbar, .project-specification-table-tools { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.project-specification-toolbar label, .project-specification-table-tools label { display: grid; gap: 4px; flex: 1 1 240px; min-width: 0; font-size: 12px; }
.project-specification-toolbar select, .project-specification-table-tools input, .project-specification-sources select { max-width: 100%; width: 100%; padding: 7px 9px; }
.project-specification-table-tools > span { font-size: 12px; color: #706b63; align-self: center; }
.project-specification-panel button { width: auto; }
.project-specification-table-tools > button { padding: 8px 10px; font-size: 12px; }
.project-specification-table-scroll { max-width: 100%; overflow: auto; border: 1px solid #dedbd5; }
.project-specification-table { width: 100%; min-width: 1080px; border-collapse: collapse; font-size: 12px; }
.project-specification-table th, .project-specification-table td { padding: 7px 8px; border-bottom: 1px solid #e6e2da; text-align: left; vertical-align: top; }
.project-specification-table th { background: #f2f1ed; white-space: nowrap; font-size: 11px; color: #6d675f; }
.project-specification-table td { overflow-wrap: anywhere; white-space: pre-wrap; }
.project-specification-table td:first-child { min-width: 92px; }
.project-specification-table td:nth-child(2) { min-width: 200px; max-width: 350px; }
.project-specification-table td:nth-child(8) { min-width: 150px; max-width: 300px; }
.project-specification-table td:nth-child(4), .project-specification-table td:nth-child(5), .project-specification-table td:nth-child(6) { font-variant-numeric: tabular-nums; }
.project-specification-table td small, .project-specification-table td > span { display: block; color: #80786d; margin-top: 2px; font-size: 10px; }
.project-specification-row-actions { display: flex; gap: 3px; flex-wrap: nowrap; min-width: 184px; }
.project-specification-row-actions button { padding: 4px 7px; min-height: 28px; font-size: 11px; white-space: nowrap; }
.project-specification-draft-row, .project-specification-insert { background: #fff5d5; }
.project-specification-draft-detail > td, .project-specification-editor-row > td { padding: 0 8px 8px 18px; }
.project-specification-draft-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #fff5d5; border-left: 3px solid #c4a560; padding: 6px 10px; margin: 3px 0; font-size: 11px; }
.project-specification-draft-note > span { flex: 1; min-width: 150px; }
.project-specification-draft-note button { font-size: 10px; padding: 4px 7px; }
.project-specification-change { display: grid; align-items: start; grid-template-columns: minmax(90px, .8fr) minmax(0, 2fr); gap: 8px; border: 1px solid #d6bf80; background: #fff5d5; padding: 9px; margin: 5px 0; }
.project-specification-change-insert { grid-template-columns: minmax(75px, .75fr) minmax(150px, 2fr) minmax(50px, .45fr) minmax(75px, .65fr) minmax(190px, 2fr); }
.project-specification-item-input, .project-specification-remarks { display: grid; align-content: start; gap: 5px; min-width: 0; }
.project-specification-change[hidden], .project-specification-change [hidden], .project-specification-panel [hidden], .project-specification-image-viewer[hidden], .project-specification-image-viewer [hidden] { display: none !important; }
.project-specification-inline-heading, .project-specification-wide, .project-specification-inline-buttons { grid-column: 1 / -1; }
.project-specification-inline-heading { display: flex; gap: 12px; align-items: baseline; }
.project-specification-inline-heading span { color: #81734f; font-size: 11px; }
.project-specification-change label { display: grid; align-content: start; gap: 3px; min-width: 0; font-size: 11px; }
.project-specification-change input:not([type=checkbox]), .project-specification-change textarea { width: 100%; min-width: 0; background: #fffdf6; padding: 7px; font-size: 12px; }
.project-specification-inline-buttons { display: flex; gap: 7px; margin-top: 2px; }
.project-specification-inline-buttons button { padding: 7px 11px; font-size: 11px; }
.project-specification-photo-editor > small { display: block; margin-top: 6px; color: #81734f; white-space: normal; }
#projectSpecificationNotePreviews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
#projectSpecificationNotePreviews > div { display: grid; max-width: 170px; gap: 4px; }
.project-specification-attachment { display: inline-grid; vertical-align: top; max-width: 160px; gap: 4px; margin: 4px 5px 4px 0; }
.project-specification-image-button { padding: 5px; max-width: 100%; }
.project-specification-attachment img { display: block; width: 76px; height: 58px; object-fit: contain; background: #fff; }
.project-specification-attachment small { overflow-wrap: anywhere; white-space: normal; }
.project-specification-image-viewer { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 16px; }
.project-specification-image-backdrop { position: absolute; inset: 0; background: #161616bf; }
.project-specification-image-panel { position: relative; width: min(960px, 100%); min-width: 0; max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: #fff; border: 1px solid #d4cec2; border-radius: 6px; padding: 12px; box-shadow: 0 12px 48px #0005; }
.project-specification-image-panel header { display: flex; align-items: center; gap: 12px; }
.project-specification-image-panel h3 { margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.project-specification-image-panel button { flex: 0 0 44px; width: 44px; height: 44px; font-size: 25px; padding: 0; }
.project-specification-image-panel > img { display: block; min-height: 0; max-width: 100%; max-height: calc(100dvh - 132px); object-fit: contain; margin: 8px auto 0; }
.project-specification-image-panel > p { margin: 6px 0; font-size: 13px; overflow-wrap: anywhere; }
.project-specification-row-history { margin-top: 4px; white-space: normal; }
.project-specification-row-history summary { color: #787162; cursor: pointer; font-size: 11px; }
.project-specification-row-history ol { list-style: none; padding: 0; margin: 6px 0; }
.project-specification-row-history li { padding: 7px; margin: 5px 0; border-left: 2px solid #96978f; background: #f7f6f1; }
.project-specification-row-history .project-specification-add { border-color: #78a581; }
.project-specification-row-history .project-specification-reduce { border-color: #bf8b80; }
.project-specification-row-history .project-specification-note { border-color: #8aa2b8; }
.project-specification-row-history p { margin: 4px 0; white-space: pre-wrap; }
.project-specification-row-history button { font-size: 10px; padding: 4px 6px; }
.project-specification-draftbar { position: sticky; bottom: -1px; z-index: 2; display: flex; align-items: center; gap: 8px; background: #fcfaf4; border: 1px solid #d9c89c; box-shadow: 0 -3px 14px #302d2910; padding: 11px 13px; margin: 12px 0; }
.project-specification-draftbar > div { flex: 1; min-width: 0; font-size: 13px; }
.project-specification-draftbar small { display: block; font-size: 11px; color: #897e69; margin-top: 2px; }
.project-specification-draftbar button { padding: 9px 12px; font-size: 12px; white-space: nowrap; }
.project-specification-image-sync { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; border: 1px solid #d9c89c; background: #fcfaf4; padding: 9px; margin: 10px 0; }
.project-specification-image-sync p { flex: 1 1 220px; margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.project-specification-image-sync button { max-width: 100%; padding: 8px; font-size: 12px; }
.project-specification-bottom-tools { border-top: 1px solid #dedbd5; margin-top: 17px; padding-top: 12px; font-size: 12px; }
.project-specification-bottom-tools > summary { color: #777067; cursor: pointer; font-weight: 600; }
.project-specification-sync-info { padding: 10px 12px; border: 1px solid #d8bd86; background: #fff6e2; color: #7d6238; overflow-wrap: anywhere; }
.project-specification-sources, .project-specification-save { border: 1px solid #dedbd5; background: #fcfbf8; padding: 12px; margin: 12px 0; }
.project-specification-sources summary { cursor: pointer; font-weight: 700; }
.project-specification-sources > label { display: grid; gap: 5px; margin: 10px 0; }
.project-specification-save > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.project-specification-save p { overflow-wrap: anywhere; }
#projectSpecificationStatus { margin: 8px 0; font-size: 12px; color: #787266; overflow-wrap: anywhere; }
#projectSpecificationStatus.is-error { color: #9a3412; }
@media (max-width: 900px) {
  .project-specification-table-scroll { overflow-x: clip; }
  .project-specification-table, .project-specification-table tbody { display: block; width: 100%; min-width: 0; }
  .project-specification-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .project-specification-table .project-specification-data-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; border-bottom: 2px solid #d5cfc2; padding: 5px; }
  .project-specification-table td { display: block; min-width: 0 !important; max-width: none !important; padding: 5px 4px; border: 0; }
  .project-specification-data-row > td::before { content: attr(data-spec-label); display: block; margin-bottom: 3px; color: #746d60; font-size: 10px; line-height: 1.2; font-weight: 400; white-space: normal; }
  .project-specification-data-row > td:nth-child(1) { grid-column: span 2; }
  .project-specification-data-row > td:nth-child(2) { grid-column: span 4; padding-top: 40px; position: relative; }
  .project-specification-data-row > td:nth-child(2)::before { position: absolute; top: 12px; left: 4px; }
  .project-specification-data-row > td:nth-child(4) { grid-column: span 2; }
  .project-specification-data-row > td:nth-child(8), .project-specification-data-row > td:nth-child(9) { grid-column: 1 / -1; border-top: 1px solid #e5dfd2; }
  .project-specification-data-row { position: relative; }
  .project-specification-data-row > td:nth-child(9) { position: absolute; right: 9px; top: 7px; padding: 0; border: 0; }
  .project-specification-data-row > td:nth-child(9)::before { display: none; }
  .project-specification-row-actions { width: 100%; min-width: 0; gap: 5px; }
  .project-specification-row-actions button { flex: none; width: 24px; min-width: 24px; min-height: 32px; padding: 4px 2px; }
  .project-specification-row-actions { gap: 2px; }
  .spec-action-full { display: none; }
  .spec-action-short { display: inline; }
  .project-specification-draft-detail, .project-specification-editor-row { display: block; }
  .project-specification-draft-detail > td, .project-specification-editor-row > td { padding: 0 5px 5px; }
  .project-specification-draft-note > span { min-width: 0; overflow-wrap: anywhere; }
  .project-specification-change, .project-specification-change-insert { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 7px; }
  .project-specification-change-insert [data-spec-field=category] { grid-column: 1 / -1; }
  .project-specification-item-input, .project-specification-remarks { grid-column: 1 / -1; }
  .project-specification-inline-heading { flex-wrap: wrap; gap: 3px 8px; }
  .project-specification-change input:not([type=checkbox]), .project-specification-change textarea { font-size: 16px; min-height: 36px; padding: 5px; }
  .project-specification-change input[type=file] { font-size: 11px; }
  .project-specification-inline-buttons button { flex: 1; min-height: 36px; padding: 6px 3px; }
}
@media (max-width: 600px) {
  .project-specification-panel { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); padding: 11px; }
  .project-specification-heading { padding: 0 39px 12px; }
  .project-specification-studio > span { font-size: 12px; }
  .project-specification-heading h2 { font-size: 20px; letter-spacing: .14em; }
  .project-specification-heading > button { padding: 6px; font-size: 11px; }
  .project-specification-document-meta { grid-template-columns: 1fr; gap: 6px; font-size: 11px; margin: 10px 0; }
  .project-specification-document-meta dl > div { grid-template-columns: 105px minmax(0, 1fr); gap: 5px; }
  .project-specification-category { min-width: 98px; padding: 9px; gap: 5px; }
  .project-specification-categories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; gap: 5px; }
  .project-specification-category { min-width: 0; padding: 7px 5px; grid-template-columns: 18px minmax(0, 1fr); font-size: 11px; text-align: left; }
  .project-specification-category svg { width: 18px; height: 18px; }
  .project-specification-category small { display: none; }
  .project-specification-table-tools label { flex-basis: 100%; }
  .project-specification-table-tools > span { flex: 1; }
  .project-specification-table-tools > button { padding: 7px; font-size: 11px; }
  .project-specification-draftbar { flex-wrap: wrap; gap: 6px; padding: 9px; }
  .project-specification-draftbar > div { flex-basis: 100%; }
  .project-specification-draftbar > button { flex: 1; padding: 9px 6px; font-size: 11px; }
  .project-specification-toolbar > button { flex: 1 1 auto; }
}
.nas-specification-sync-card { grid-column: 1 / -1; }
.nas-specification-sync-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.nas-specification-sync-actions button { width: auto; }
.nas-specification-sync-results { margin-top: 12px; font-size: 12px; }
.nas-specification-sync-results summary { cursor: pointer; }
.nas-specification-sync-results ul { list-style: none; padding: 0; max-height: 420px; overflow-y: auto; }
.nas-sync-result-filter { display: flex; align-items: end; gap: 12px; margin-top: 10px; }
.nas-sync-result-filter label { flex: 1 1 280px; display: flex; flex-direction: column; gap: 4px; font-weight: 800; }
.nas-sync-result-filter input { width: 100%; min-width: 0; box-sizing: border-box; }
.nas-sync-result-filter small { flex: 0 0 auto; color: var(--muted); padding-bottom: 10px; white-space: nowrap; }
.nas-sync-result-empty { color: var(--muted); padding: 14px 10px; border: 1px dashed var(--line); text-align: center; }
.nas-specification-sync-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; padding: 10px 0; border-bottom: 1px solid #e2ded5; overflow-wrap: anywhere; }
.nas-specification-sync-item span { color: #786c58; }
.nas-specification-sync-item p { grid-column: 1 / -1; margin: 0; color: #827a70; }
#nasSpecificationSyncStatus.is-error { color: #9a3412; }
#nasRoutingStatus.is-error { color: #9a3412; }
.nas-source-label { display: inline-block; margin-inline-end: 8px; font-size: 12px; color: #675e50; }
.nas-routing-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.nas-routing-filters label { flex: 1 1 240px; }
.nas-routing-filters button { width: auto; }
.nas-routing-table-scroll { overflow-x: auto; max-height: 520px; }
.nas-routing-table { border-collapse: collapse; width: 100%; min-width: 700px; font-size: 13px; }
.nas-routing-table th, .nas-routing-table td { padding: 10px; border-bottom: 1px solid #e2ded5; text-align: left; }
.nas-routing-table th { position: sticky; top: 0; background: #faf8f3; z-index: 1; }
.nas-routing-table td:first-child { min-width: 200px; overflow-wrap: anywhere; }
.nas-routing-table small { display: block; color: #786c58; margin-top: 3px; }
.nas-routing-table select { min-width: 165px; }
.nas-routing-table button { width: auto; white-space: nowrap; }
.nas-specification-catalog-notice { margin: 12px 0; padding: 10px 12px; background: #fff6e2; border: 1px solid #d8bd86; color: #7d6238; font-size: 12px; }
@media (max-width: 600px) { .nas-specification-sync-actions button { flex: 1 1 140px; } .nas-specification-sync-item { grid-template-columns: minmax(0, 1fr); } }

.sync-health-banner { margin: 0 20px 8px; padding: 10px 14px; border: 1px solid #e1bd57; border-radius: 10px; background: #fff2c6; color: #664500; font-size: 13px; font-weight: 650; line-height: 1.5; }
.sync-health-banner[hidden], .sync-report-card[hidden] { display: none; }
.sync-report-card { grid-column: 1 / -1; }
.sync-report-card #syncReportTime { margin: 4px 0 14px; color: #635b4f; }
.sync-report-source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sync-report-source { display: grid; gap: 5px; min-width: 0; padding: 13px; border: 1px solid #ded9ce; border-radius: 12px; background: #fcfaf6; }
.sync-report-source strong { font-size: 15px; }
.sync-report-source b { font-size: 13px; color: #324a36; }
.sync-report-source small { color: #726b61; line-height: 1.45; }
.sync-report-source.is-failed b, .sync-report-source.is-unknown b { color: #9a4b10; }
.sync-report-totals { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.sync-report-totals span { display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 12px; border-radius: 20px; background: #eeeae2; font-size: 13px; }
.sync-report-totals b { font-size: 17px; }
.sync-report-groups { display: grid; gap: 10px; }
.sync-report-group { border: 1px solid #e1ddd4; border-radius: 12px; background: #fff; }
.sync-report-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; cursor: pointer; font-weight: 700; list-style: none; }
.sync-report-group > summary::-webkit-details-marker { display: none; }
.sync-report-group > summary span:last-child { white-space: nowrap; color: #705e3f; }
.sync-report-group-body { display: grid; gap: 9px; padding: 0 14px 14px; }
.sync-report-group-body p { margin: 0; color: #625d54; line-height: 1.55; }
.sync-report-group-items { display: grid; gap: 5px; max-height: 230px; overflow-y: auto; padding: 0; margin: 0; list-style: none; }
.sync-report-group-items li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid #f0ede8; overflow-wrap: anywhere; }
.sync-report-group-items button, .sync-report-group-action { flex: none; width: auto; }
.sync-report-actions { margin-top: 12px; }
#syncReportStatus { min-height: 1.25em; margin: 10px 0 0; color: #795422; }
.sync-report-year-warnings { margin: 10px 0 0; padding: 10px 12px; border-left: 3px solid #a8742d; background: #fbf4e8; color: #704915; line-height: 1.5; }
@media (max-width: 700px) { .sync-health-banner { margin: 0 10px 8px; } .sync-report-source-grid { grid-template-columns: 1fr; } .sync-report-group-items li { align-items: flex-start; } }
.cloud-master-toolbar { display:flex; gap:8px; margin:12px 0; flex-wrap:wrap; }
#cloudMasterModal .hidden { display:none !important; }
#cloudMasterTotals { white-space:pre-line; }
#cloudMasterCostMatrix { margin:14px 0; }
#cloudMasterCostPaste { width:100%; }
.cloud-master-toolbar input { flex:1; min-width:180px; }
.cloud-master-project-controls { display:grid; grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) auto; align-items:end; gap:8px 12px; margin:10px 0; }
.cloud-master-project-controls label { display:grid; gap:4px; min-width:0; }
.cloud-master-project-controls input,.cloud-master-project-controls select { width:100%; min-width:0; }
#cloudMasterProjectSearchStatus,#cloudMasterTotals { grid-column:1 / -1; margin:0; }
.cloud-master-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px; padding:12px; background:#fff8e8; }
.cloud-master-fields label { display:flex; flex-direction:column; gap:4px; }
.cloud-master-row { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:12px; border-bottom:1px solid #ddd; }
.cloud-master-row > div { flex:1; min-width:0; }
#cloudMasterModal button { width:auto; flex-shrink:0; }
#cloudMasterModal .modal-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
@media(max-width:600px) { .cloud-master-toolbar input { flex-basis:100%; } }
.cloud-master-row dl { display:flex; flex-wrap:wrap; gap:8px 20px; margin:6px 0 0; }
.cloud-master-row dt { font-size:11px; color:#777; }
.cloud-master-row dd { margin:0; overflow-wrap:anywhere; }
#cloudMasterModal .modal-panel { width:100%; max-width:1400px; }
.cloud-master-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; }
.cloud-master-row > div { min-width:0; }
.project-personnel-additional { grid-column:1 / -1; }
#projectAdditionalPersonnel { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
#projectAdditionalPersonnel > div { display:flex; align-items:center; gap:8px; width:100%; }
#projectAdditionalPersonnel select { max-width:100%; }
.cloud-master-row dl { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); align-items:start; }
.cloud-master-row dl > div { min-width:0; }
.cloud-master-row dt,.cloud-master-row dd { text-align:left; line-height:1.5; }
.cloud-master-row dd.cloud-master-number { text-align:right; font-variant-numeric:tabular-nums; }
.cloud-master-row #cloudMasterForm { grid-column:1 / -1; width:100%; background:#fffaf0; padding:12px; border:1px solid #dfd2b7; }
.cloud-master-fields label { display:flex; flex-direction:column; align-items:stretch; gap:4px; }
.cloud-master-filter-group { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0; }
.cloud-master-filter-group button { display:grid; gap:6px; justify-items:center; min-width:100px; padding:12px; border:1px solid #d8d1c3; background:#faf8f3; }
.cloud-master-filter-group button > span { font-size:24px; }
.cloud-master-filter-group button[aria-pressed="true"] { background:#ead8b3; border-color:#91641f; }
.cloud-master-price-heading { display:grid; grid-template-columns:minmax(0,1fr) 72px; gap:12px; padding:10px 12px; background:#f1eee7; border-bottom:1px solid #d8d1c3; font-size:12px; font-weight:700; }
.cloud-master-price-heading > div,.cloud-master-price-list .cloud-master-row > div:not(#cloudMasterForm) { display:grid; grid-template-columns:minmax(110px,1.2fr) minmax(95px,.8fr) minmax(140px,1.8fr) 48px 90px; gap:12px; align-items:start; }
.cloud-master-price-list .cloud-master-row { grid-template-columns:minmax(0,1fr) 72px; padding:10px 12px; }
.cloud-master-price-list .cloud-master-row dl { display:contents; }
.cloud-master-price-list .cloud-master-row dt { display:none; }
.cloud-master-price-list .cloud-master-row strong { font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.cloud-master-price-heading .cloud-master-number { text-align:right; }
.cloud-master-price-list .cloud-master-row > button { width:72px; }
.cloud-master-price-batch-bar { margin:10px 0 12px; }
.cloud-master-price-editor dd { display:grid; justify-items:stretch; gap:3px; }
.cloud-master-price-editor input {
  width:100%; min-width:0; height:34px; padding:5px 7px; border:1px solid #c9c1b3; border-radius:5px;
  background:#fff; color:var(--ink); text-align:right; font-variant-numeric:tabular-nums;
}
.cloud-master-price-editor input:focus { border-color:#91641f; box-shadow:0 0 0 2px rgba(145,100,31,.14); outline:0; }
.cloud-master-price-editor small { min-height:14px; color:#8a6426; font-size:10px; font-weight:800; text-align:right; }
.cloud-master-price-list .cloud-master-row.has-unsaved-price { box-shadow:inset 4px 0 #c68a22; background:#fffaf0; }
.cloud-master-price-list .cloud-master-row.has-invalid-price { box-shadow:inset 4px 0 #b94b3d; background:#fff3f1; }
.cloud-master-price-list .cloud-master-row.has-invalid-price .cloud-master-price-editor input { border-color:#b94b3d; }
.cloud-master-price-full-editor {
  grid-column:1 / -1; display:grid; gap:8px; width:100%; margin-top:2px; padding:12px;
  border:1px solid #dfd2b7; background:#fffaf0;
}
.cloud-master-price-full-editor .cloud-master-fields { grid-template-columns:minmax(150px,.85fr) minmax(220px,1.3fr) minmax(260px,1.6fr) minmax(70px,.4fr) minmax(110px,.55fr); }
.cloud-master-price-full-editor input { width:100%; min-width:0; }
.cloud-master-price-full-editor input[aria-invalid="true"] { border-color:#b94b3d; box-shadow:0 0 0 2px rgba(185,75,61,.12); }
.cloud-master-price-editor-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.cloud-master-price-editor-actions small { color:var(--muted); line-height:1.45; }
.cloud-master-price-list .cloud-master-row.is-editing-price { border-color:#d7bd88; background:#fffdf7; }
.cloud-master-cost-matrix-heading { display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin:0 0 8px; }
.cloud-master-cost-matrix-heading strong { color:var(--brand-dark); }
.cloud-master-cost-matrix-heading span { color:var(--muted); font-size:12px; }
.cloud-master-cost-matrix-table { width:max-content; min-width:100%; }
.cloud-master-cost-matrix-table td.cloud-master-cost-vendor { min-width:220px; vertical-align:top; }
.cloud-master-cost-matrix-table .cloud-master-company-price { min-width:150px; background:#fff8e8; text-align:right; font-variant-numeric:tabular-nums; }
.cloud-master-cost-entry { display:grid; gap:3px; padding:2px 0; font-variant-numeric:tabular-nums; }
.cloud-master-cost-entry + .cloud-master-cost-entry { margin-top:8px; border-top:1px dashed #d8d1c3; padding-top:8px; }
.cloud-master-cost-entry > b,.cloud-master-cost-entry > small { text-align:right; }
.cloud-master-cost-multiple { margin-bottom:6px; color:#76541d !important; font-weight:900; text-align:left !important; }
.cloud-master-cost-difference.is-positive { color:#38633e !important; font-weight:900; }
.cloud-master-cost-difference.is-negative { color:#a13e2f !important; font-weight:900; }
.cloud-master-cost-notes { margin-top:3px; border-top:1px dotted #ddd; padding-top:3px; color:var(--ink) !important; text-align:left !important; overflow-wrap:anywhere; }
@media(max-width:760px) {
  .cloud-master-project-controls { grid-template-columns:minmax(0,1fr); }
  #cloudMasterProjectSearchStatus,#cloudMasterTotals { grid-column:1; }
  .cloud-master-price-heading { display:none; }
  .cloud-master-price-list .cloud-master-row > div:not(#cloudMasterForm) { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; }
  .cloud-master-price-list .cloud-master-row strong { grid-column:1 / -1; }
  .cloud-master-price-list .cloud-master-row dt { display:block; }
  .cloud-master-price-batch-bar { align-items:stretch; flex-direction:column; }
  .cloud-master-price-editor input { max-width:none; }
  .cloud-master-price-full-editor .cloud-master-fields { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .cloud-master-price-full-editor .cloud-master-fields label:nth-child(3) { grid-column:1 / -1; }
  .cloud-master-price-editor-actions { align-items:stretch; flex-direction:column; }
  .cloud-master-price-editor-actions button { width:100% !important; }
  .cloud-master-cost-matrix-heading { align-items:flex-start; flex-direction:column; gap:3px; }
  .cloud-master-cost-matrix-table td.cloud-master-cost-vendor { min-width:205px; }
}
.hardware-detail-focus .hardware-table-wrap { max-height:65dvh; overflow:auto; overscroll-behavior:contain; }
.hardware-detail-focus .hardware-line-table thead th { position:sticky; top:0; z-index:2; background:#eeebe5; box-shadow:0 1px #b8b2a8; }
#hardwareDetailBody[hidden] { display:none; }
.hardware-metrics button { align-self:center; }
.hardware-order-item,.hardware-order-item > span,.hardware-order-item > span small,.hardware-order-item strong,.hardware-order-edit-input { color:#111; }
.hardware-order-item.hardware-manual-order-item strong,.hardware-order-item.hardware-manual-order-item small { color:#0000ff; }
.hardware-template-meta > div,.hardware-template-meta span { min-width:0; overflow-wrap:anywhere; white-space:normal; }
.nas-inline-routing { display:flex; flex-wrap:wrap; gap:8px; align-items:flex-start; margin-top:8px; }
.nas-inline-routing details { flex:1 1 280px; min-width:0; }
.nas-inline-routing summary { cursor:pointer; padding:8px; border:1px solid #d9d5cb; }
.nas-inline-routing label, #nasRoutingRows label { display:flex; flex-direction:column; gap:4px; margin-top:8px; }
.nas-inline-routing input { width:100%; min-width:0; box-sizing:border-box; }
.nas-inline-routing small { display:block; margin:8px 0; }

@media (max-width: 640px) {
  .nas-sync-result-filter { align-items: stretch; flex-direction: column; gap: 4px; }
  .nas-sync-result-filter label { flex-basis: auto; }
  .nas-sync-result-filter small { padding-bottom: 0; }
}
.cloud-master-quote-tabs { display:flex; gap:10px; padding:4px 0 18px; border-bottom:1px solid var(--line,#ddd); margin-bottom:18px; }
.cloud-master-quote-tabs button { flex:1; min-height:58px; font-size:16px; font-weight:800; border-radius:14px; }
.cloud-master-quote-tabs button[aria-pressed="true"] { background:var(--ink,#282d29); border-color:var(--ink,#282d29); color:#fff; }
.cloud-master-quote-tabs[hidden], #cloudMasterDataPanel[hidden], #projectQuoteEstimate[hidden] { display:none !important; }
#projectQuoteEstimate { margin:12px 0 24px; }
.quote-estimate-version label, .quote-estimate-engineering label { display:grid; gap:7px; font-size:13px; font-weight:700; }
.quote-estimate-version select, .quote-estimate-engineering input, .quote-estimate-engineering select { width:100%; min-width:0; min-height:44px; }
.quote-estimate-overview { display:flex; gap:24px; align-items:center; justify-content:space-between; background:#f1f4ee; border:1px solid #dfe7da; border-radius:16px; margin:18px 0; padding:22px; }
.quote-estimate-overview div { display:grid; gap:7px; flex-shrink:0; }
.quote-estimate-overview strong { font-size:30px; font-variant-numeric:tabular-nums; }
.quote-estimate-overview small, .quote-estimate-overview p { color:var(--muted,#6a7068); }
.quote-estimate-overview p { max-width:360px; line-height:1.7; font-size:13px; }
.quote-estimate-categories { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:9px; margin:16px 0; }
.quote-estimate-categories button { display:grid; gap:6px; text-align:left; padding:14px; border-radius:12px; }
.quote-estimate-categories button[aria-pressed="true"] { background:#edf2e8; border-color:#819672; box-shadow:inset 0 0 0 1px #819672; }
.quote-estimate-categories span { font-variant-numeric:tabular-nums; font-weight:700; }
.quote-estimate-categories small { color:var(--muted,#6a7068); }
.quote-estimate-engineering { display:grid; grid-template-columns:1fr 1fr; gap:15px; margin:20px 0 12px; }
#projectQuoteEstimate .vendor-project-profit-table small { display:block; margin-top:5px; color:var(--muted,#6a7068); font-size:11px; font-weight:400; }
#projectQuoteEstimate .vendor-project-profit-table th { white-space:normal; }
#projectQuoteEstimate .quote-estimate-company-mapping { min-width:250px; margin-top:8px; border-top:1px solid #e5e1d8; padding-top:7px; text-align:left; }
#projectQuoteEstimate .quote-estimate-company-mapping summary { cursor:pointer; color:var(--brand-dark,#254d3d); font-size:11px; font-weight:800; line-height:1.45; }
#projectQuoteEstimate .quote-estimate-company-mapping label { display:grid; gap:3px; margin-top:7px; }
#projectQuoteEstimate .quote-estimate-company-mapping label > span { color:var(--muted,#6a7068); font-size:10px; font-weight:800; }
#projectQuoteEstimate .quote-estimate-company-mapping input,
#projectQuoteEstimate .quote-estimate-company-mapping select { width:100%; min-width:0; min-height:38px; font-size:12px; }
#projectQuoteEstimate .quote-estimate-company-mapping.has-unsaved-price { border-top-color:#c8912d; background:#fff9eb; box-shadow:0 0 0 6px #fff9eb; }
#cloudMasterSavedCostsToggle { margin:0 0 16px; }
@media (max-width:640px) {
  .cloud-master-quote-tabs { gap:8px; }
  .cloud-master-quote-tabs button { padding:10px 8px; font-size:14px; }
  .quote-estimate-overview { align-items:flex-start; flex-direction:column; gap:8px; padding:17px; }
  .quote-estimate-overview strong { font-size:26px; }
  .quote-estimate-categories { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .quote-estimate-engineering { grid-template-columns:1fr; gap:12px; }
  #projectQuoteEstimate .quote-estimate-company-mapping { min-width:220px; }
}

/* LOCAL-19 platform shell and frequently used functions. */
body.local19-shell{--bg:#f2f0eb;--surface:#fff;--text:#141413;--muted:#5f5c55;--line:#dedad2;--brand:#141413;--brand-dark:#141413;--accent:#a9783c;--mobile-navigation-height:0px;background:#f2f0eb;color:#141413;font-family:"Noto Sans TC","Microsoft JhengHei","PingFang TC",system-ui,sans-serif;letter-spacing:0}
body.local19-shell .app-shell{width:100%;max-width:none;margin:0;padding:0 0 48px}
body.local19-shell .workspace-layout{display:block;width:100%;min-width:0}
body.local19-shell .app-sidebar,body.local19-shell .mobile-navigation-scroll-hint{display:none!important}
body.local19-shell .workspace-main{width:100%;min-width:0}
body.local19-shell .workspace-page{min-height:calc(100dvh - 64px);border:0;border-radius:0;background:transparent;box-shadow:none}
body.local19-shell .topbar{position:sticky;top:0;z-index:48;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:18px;width:100%;height:64px;min-height:64px;margin:0;padding:0 28px;border:0;border-bottom:1px solid #dedad2;border-radius:0;background:#ffffffef;box-shadow:none;backdrop-filter:blur(14px)}
body.local19-shell .topbar button,body.local19-shell .app-menu-panel button,body.local19-shell .frequent-workspace button{font-family:inherit;cursor:pointer}
body.local19-shell .topbar :is(button,input):focus-visible,body.local19-shell .app-menu-panel :is(button,input):focus-visible,body.local19-shell .frequent-workspace button:focus-visible{outline:3px solid #a9783c;outline-offset:2px}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
body.local19-shell .topbar-brand{display:flex;flex-direction:column;justify-content:center;gap:2px;flex:0 0 auto;min-width:0;color:#141413}
body.local19-shell button.topbar-brand{width:auto;height:44px;padding:0;border:0;background:transparent;text-align:left}
body.local19-shell .topbar-brand-eyebrow{color:#6f6a60;font-size:10px;letter-spacing:.2em;line-height:1}
body.local19-shell .topbar-brand-full{font-size:15px;font-weight:600;letter-spacing:.04em;white-space:nowrap}
body.local19-shell .topbar-brand-short{display:none;font-size:15px;font-weight:700;letter-spacing:.06em;white-space:nowrap}
body.local19-shell .app-menu-trigger{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:0 0 88px;width:88px;min-width:88px;height:44px;min-height:44px;padding:0 13px;border:1px solid #141413;border-radius:2px;background:#141413;color:#fff;font-size:14px;font-weight:700}
body.local19-shell .app-menu-trigger svg,body.local19-shell .app-top-search svg,body.local19-shell .app-top-search-button svg,body.local19-shell .app-menu-search svg,body.local19-shell .app-menu-heading svg{width:18px;height:18px;flex:0 0 auto}
body.local19-shell .app-breadcrumb{display:flex;align-items:center;gap:8px;min-width:0;max-width:31vw;font-size:14px;white-space:nowrap}
body.local19-shell .app-breadcrumb:has(#appBreadcrumbCurrent:empty){display:none}
body.local19-shell .app-breadcrumb button{flex:0 0 auto;width:auto;min-height:44px;padding:4px 0;border:0;background:none;color:#5f5c55;font-size:14px;text-decoration:underline;text-decoration-color:#a9783c;text-underline-offset:4px;white-space:nowrap}
body.local19-shell .app-breadcrumb strong{flex:0 1 auto;min-width:0;overflow:hidden;font-size:15px;font-weight:700;text-overflow:ellipsis}
body.local19-shell .app-breadcrumb-separator{flex:0 0 auto;color:#a9783c;font-size:18px}
body.local19-shell .app-top-search{display:flex;align-items:center;gap:9px;flex:0 1 380px;min-width:130px;height:40px;margin-left:auto;padding:0 11px;border:1px solid #dedad2;border-radius:2px;background:#faf9f6;color:#5f5c55}
body.local19-shell .app-top-search input{flex:1;min-width:0;height:100%;border:0;background:transparent;color:#141413;font-size:14px;outline:0}
body.local19-shell .app-top-search:focus-within{outline:2px solid #a9783c;outline-offset:1px}
body.local19-shell .app-top-search kbd,body.local19-shell .app-menu-panel kbd{display:inline-block;min-width:18px;padding:1px 5px;border:1px solid #dedad2;border-bottom-width:2px;border-radius:3px;background:#fff;color:#3d3b36;font-family:inherit;font-size:11px;text-align:center;white-space:nowrap}
body.local19-shell .app-top-search-button{display:none;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;border:1px solid #dedad2;border-radius:2px;background:#fff;color:#141413}
body.local19-shell .app-account-button{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:#fff;font-size:13px;font-weight:700}
body.local19-shell .app-account-button span{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#141413;color:#fff}
body.local19-shell #workspaceHeaderHost[hidden]{display:none!important}
body.local19-shell #workspaceHeaderHost:not([hidden]){max-width:1200px;margin:12px auto 0;padding:0 28px}
body.local19-shell #workspaceHeaderHost .workspace-page-heading,body.local19-shell #workspaceHeaderHost .modal-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;margin:0;padding:8px 0;border:0;background:transparent;box-shadow:none}
body.local19-shell #workspaceHeaderHost :is(.workspace-page-heading,.modal-heading) h2{margin:0;color:#141413;font-size:16px;line-height:1.35}
body.local19-shell #workspaceHeaderHost :is(.workspace-page-heading,.modal-heading) .eyebrow,body.local19-shell #workspaceHeaderHost :is(.workspace-page-heading,.modal-heading) p{display:none}
body.local19-shell .embedded-workspace-host{width:100%;min-width:0}
body.local19-shell .modal.workspace-embedded{width:100%;max-width:none;margin:0;padding:0}
body.local19-shell .modal.workspace-embedded>.modal-panel{width:100%;max-width:none;min-height:calc(100dvh - 64px);max-height:none;margin:0;padding:24px 28px;overflow:visible;border:0;border-radius:0;background:#f2f0eb;box-shadow:none}
body.local19-shell #operationCenterModal.lighting-workspace-mode>.operation-center-panel{padding:0}
body.local19-shell #operationCenterModal.lighting-workspace-mode.workspace-embedded>.operation-center-panel>.operation-center-heading{display:none}
body.local19-shell #lightingWorkspaceHost{width:100%;max-width:none;margin:0;padding:24px 28px}
body.local19-shell .operation-center-heading{margin:0}
body.local19-shell .workspace-page:not(.frequent-workspace){padding:24px max(28px,calc((100vw - 1200px)/2))}

body.local19-shell .frequent-workspace{padding:0}
.frequent-wrap{display:flex;flex-direction:column;gap:28px;width:min(100%,1256px);margin:0 auto;padding:56px 28px 64px}
.frequent-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:16px}
.frequent-date{display:block;margin-bottom:10px;color:#6f6a60;font-size:12px;letter-spacing:.18em}
.frequent-intro h1{margin:0;color:#141413;font-size:40px;font-weight:500;letter-spacing:.05em;line-height:1.15}
.frequent-intro p{margin:10px 0 0;color:#5f5c55;font-size:15px;line-height:1.5}
.frequent-bento{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:218px;gap:16px;min-width:0}
.frequent-bento>[hidden]{display:none!important}
.frequent-feature{display:flex;flex-direction:column;grid-column:span 2;grid-row:span 2;gap:16px;min-width:0;padding:28px 30px;border:1px solid #141413;border-radius:4px;background:#141413;color:#fff;animation:local19-rise .5s cubic-bezier(.2,.7,.2,1) both;transition:transform .22s,box-shadow .22s}
.frequent-feature:hover{transform:translateY(-3px);box-shadow:0 22px 40px #14141338}
.frequent-feature-open{display:flex;flex:1;flex-direction:column;justify-content:space-between;gap:16px;min-width:0;width:100%;padding:0;border:0;background:transparent;color:#fff;text-align:left}
.frequent-feature-top,.frequent-tile-top{display:flex;align-items:flex-start;justify-content:space-between;width:100%}
.frequent-index{color:#6f6a60;font-size:11px;letter-spacing:.18em;font-variant-numeric:tabular-nums}
.frequent-feature .frequent-index{color:#c9c3b6}
.frequent-arrow{display:inline-block;font-size:21px;line-height:1;transition:transform .22s}
.frequent-feature:hover .frequent-arrow,.frequent-tile:hover .frequent-arrow,.frequent-all:hover em span{transform:translateX(4px)}
.frequent-feature-art{display:grid;place-items:center;flex:1;min-height:0}
.frequent-feature-art svg{width:min(260px,100%);height:170px;color:#f2f0eb}
.frequent-accent{stroke:#a9783c;stroke-dasharray:120;animation:local19-draw 1.1s .35s ease-out both}
.frequent-feature .frequent-accent{stroke:#d9a866}
.frequent-feature-copy,.frequent-tile-copy{display:flex;flex-direction:column;gap:5px;min-width:0}
.frequent-feature-copy strong{font-size:28px;font-weight:700;letter-spacing:.03em}
.frequent-feature-copy small{color:#d7d2c6;font-size:14px;line-height:1.5}
.frequent-continue{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;width:100%;padding:9px 12px;border:0;border-radius:2px;background:#2a2926;color:#fff;text-align:left}
.frequent-continue:hover{background:#34322e}
.frequent-continue[hidden]{display:none!important}
.frequent-continue>span{display:flex;flex-direction:column;gap:2px;min-width:0}
.frequent-continue small{color:#c9c3b6;font-size:12px}
.frequent-continue strong{overflow:hidden;max-width:100%;font-size:14px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}
.frequent-continue em{flex:0 0 auto;padding:7px 12px;border-radius:2px;background:#f2f0eb;color:#141413;font-size:13px;font-style:normal;font-weight:700}
.frequent-tile{display:flex;flex-direction:column;justify-content:space-between;gap:12px;min-width:0;padding:22px 24px;border:1px solid #dedad2;border-radius:4px;background:#fff;color:#141413;text-align:left;animation:local19-rise .5s cubic-bezier(.2,.7,.2,1) both;transition:transform .22s,box-shadow .22s,border-color .22s}
.frequent-tile:nth-child(2){animation-delay:.06s}.frequent-tile:nth-child(3){animation-delay:.12s}.frequent-tile:nth-child(4){animation-delay:.18s}.frequent-tile:nth-child(5){animation-delay:.24s}
.frequent-tile:hover{transform:translateY(-3px);border-color:#141413;box-shadow:0 18px 34px #1414131a}
.frequent-tile svg{width:120px;max-width:100%;height:70px;align-self:center}
.frequent-tile-copy strong{font-size:19px;font-weight:700;letter-spacing:.03em}
.frequent-tile-copy small{color:#5f5c55;font-size:13px;line-height:1.5}
.frequent-tile[data-paused="true"]{border-color:#d5c8ad;background:#f8f5ee}
.frequent-tile[data-paused="true"] .frequent-tile-copy small{color:#665b49}
.frequent-all{display:flex;align-items:center;gap:18px;min-height:72px;width:100%;padding:16px 24px;border:1px solid #dedad2;border-radius:4px;background:#fff;color:#141413;text-align:left;transition:border-color .2s}
.frequent-all:hover{border-color:#141413}
.frequent-all>svg{flex:0 0 22px;width:22px;height:22px}
.frequent-all>span{display:flex;flex:1;flex-direction:column;gap:2px;min-width:0}
.frequent-all strong{font-size:15px;font-weight:700}
.frequent-all small{overflow:hidden;color:#5f5c55;font-size:13px;text-overflow:ellipsis;white-space:nowrap}
.frequent-all em{flex:0 0 auto;color:#141413;font-size:13px;font-style:normal;font-weight:700;white-space:nowrap}
.frequent-all em span{display:inline-block;transition:transform .22s}
.frequent-recent{overflow:hidden;border:1px solid #dedad2;border-radius:4px;background:#fff}
.frequent-recent-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px}
.frequent-recent-heading h2{margin:0;color:#141413;font-size:16px;font-weight:700}
.frequent-recent-heading>span{color:#5f5c55;font-size:12px}
.frequent-recent-item{display:grid;grid-template-columns:120px minmax(0,1fr) auto;gap:14px;align-items:center;min-height:62px;width:100%;padding:12px 20px;border:0;border-top:1px solid #ece9e2;background:#fff;color:#141413;text-align:left;font-size:14px}
.frequent-recent-item:hover{background:#faf9f6}
.frequent-recent-item>*{min-width:0;overflow-wrap:anywhere}
.frequent-recent-item small{display:block;color:#5f5c55;font-size:12px}
.frequent-recent-empty{margin:0;padding:16px 20px;border-top:1px solid #ece9e2;color:#5f5c55;font-size:14px}
@keyframes local19-rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes local19-draw{from{stroke-dashoffset:120}to{stroke-dashoffset:0}}

body.local19-shell:has(.app-menu-overlay:not([hidden])){overflow:hidden}
.app-menu-overlay[hidden]{display:none!important}
.app-menu-overlay{position:fixed;inset:0;z-index:80;display:block;min-width:0}
.app-menu-backdrop{position:absolute;inset:0;background:#14141361}
.app-menu-panel{position:absolute;top:76px;left:20px;display:flex;flex-direction:column;width:min(1080px,calc(100vw - 40px));max-height:calc(100dvh - 96px);overflow:hidden;border:1px solid #dedad2;border-radius:6px;background:#fff;color:#141413;box-shadow:0 30px 80px #14141347;animation:local19-menu-drop .22s cubic-bezier(.2,.7,.2,1) both}
.app-menu-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:46px;padding:4px 20px;border-bottom:1px solid #ece9e2}
.app-menu-heading h2{flex:1;min-width:0;margin:0;color:#141413;font-size:15px;font-weight:700;letter-spacing:.03em;white-space:nowrap}
.app-menu-heading button{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:0 0 auto;width:auto;min-width:78px;min-height:44px;padding:0 10px;border:1px solid #dedad2;border-radius:2px;background:#fff;color:#141413;font-size:13px;font-weight:700}
.app-menu-search-wrap{display:flex;align-items:center;gap:12px;padding:12px 20px;border-bottom:1px solid #ece9e2}
.app-menu-search{display:flex;align-items:center;gap:12px;flex:1;min-width:0;min-height:52px;padding:0 16px;border:2px solid #141413;border-radius:3px;background:#fff}
.app-menu-search svg{color:#141413}
.app-menu-search input{flex:1;min-width:0;width:100%;height:48px;border:0;background:transparent;color:#141413;font-size:16px;outline:0}
.app-menu-search:focus-within{border-color:#a9783c;outline:0;box-shadow:inset 0 0 0 1px #a9783c}
body.local19-shell .app-menu-panel .app-menu-search input:focus-visible{outline:0;box-shadow:none}
.app-menu-escape{flex:0 0 auto;color:#5f5c55;font-size:12px;white-space:nowrap}
.app-menu-favorites{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-height:64px;padding:12px 20px;border-bottom:1px solid #ece9e2;background:#faf9f6}
.app-menu-favorites:empty{display:none}
.app-menu-favorites::before{content:"常用";margin-right:6px;color:#5f5c55;font-size:12px;font-weight:700;letter-spacing:.16em}
.app-menu-favorite{display:inline-flex;align-items:center;justify-content:center;width:auto;min-height:44px;padding:5px 14px;border:1px solid #dedad2;border-radius:999px;background:#faf9f6;color:#141413;font-size:13px;font-weight:700;white-space:nowrap}
.app-menu-favorite:hover{border-color:#141413;background:#fff}
.app-menu-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-flow:row dense;align-content:start;align-items:start;gap:15px 28px;min-height:0;overflow:auto;padding:20px 20px 14px}
.app-menu-group{min-width:0}
.app-menu-groups:has(>.app-menu-group:nth-child(4)) .app-menu-group[data-menu-group="project-operations"]{grid-column:span 2}
.app-menu-group-toggle{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;margin:0 0 5px;padding:2px 0;border:0;background:transparent;color:#5f5c55;text-align:left;font-size:12px;font-weight:800;letter-spacing:.12em}
.app-menu-group-toggle::before{content:"";width:14px;height:1px;flex:0 0 14px;background:#a9783c}
.app-menu-group-toggle small{margin-left:auto;font-size:11px;font-weight:600;letter-spacing:0}
.app-menu-group-toggle>span:last-child{display:none}
.app-menu-group-items{display:grid;grid-template-columns:minmax(0,1fr);gap:1px;min-width:0}
.app-menu-groups:has(>.app-menu-group:nth-child(4)) .app-menu-group[data-menu-group="project-operations"] .app-menu-group-items{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:12px}
.app-menu-group-items[hidden]{display:none!important}
.app-menu-item{display:flex;flex-direction:column;justify-content:center;gap:2px;min-width:0;min-height:44px;padding:7px 10px;border:0;border-radius:3px;background:transparent;color:#141413;text-align:left}
.app-menu-item:hover{background:#f4f1ea}
.app-menu-item:is(.active,[aria-current="page"]){background:#f4f1ea;box-shadow:inset 3px 0 0 #a9783c}
.app-menu-item[data-paused="true"]{background:#f8f5ee;color:#645a49}
.app-menu-item[data-paused="true"]:hover,.app-menu-item[data-paused="true"]:focus-visible{background:#f2eadb}
.app-menu-item b{font-size:14px;font-weight:700;line-height:1.35}
.app-menu-item small{color:#5f5c55;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.app-menu-favorite[data-paused="true"]{border-color:#d5c8ad;background:#f8f5ee;color:#645a49}
.app-menu-footer{display:flex;align-items:center;gap:18px;min-height:40px;padding:7px 20px;border-top:1px solid #ece9e2;color:#5f5c55;font-size:11px}
.app-menu-footer>span:last-child{margin-left:auto}
.app-menu-install-card{display:none}
body.local19-shell .app-action-notice{position:fixed;z-index:95;top:76px;right:28px;display:flex;align-items:center;min-height:52px;width:min(480px,calc(100vw - 56px));max-width:calc(100vw - 28px);padding:12px 16px;border:1px solid #141413;border-left:4px solid #c8a063;border-radius:3px;background:#141413;color:#fff;box-shadow:0 14px 32px #14141342;font-size:14px;line-height:1.45;overflow-wrap:anywhere;pointer-events:none}
body.local19-shell .app-action-notice[hidden]{display:none!important}
@keyframes local19-menu-drop{from{opacity:0;transform:translateY(-8px) scale(.99)}to{opacity:1;transform:none}}

@media(max-width:1000px){
  .frequent-bento{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.local19-shell .app-top-search{flex-basis:260px}
}
@media(max-width:900px){
  body.local19-shell .topbar{gap:12px;padding-inline:20px}
  body.local19-shell .topbar-brand-eyebrow{display:none}
  body.local19-shell .app-top-search{display:none}
  body.local19-shell .app-top-search-button{display:inline-flex;margin-left:auto}
}
@media(max-width:760px){
  body.local19-shell .app-shell{padding:0 0 20px}
  body.local19-shell .topbar{gap:10px;height:56px;min-height:56px;padding:0 12px;background:#f6f2ea}
  body.local19-shell .topbar-brand-full,body.local19-shell .topbar-brand-eyebrow{display:none}
  body.local19-shell .topbar-brand-short{display:inline}
  body.local19-shell .app-menu-trigger{flex-basis:82px;width:82px;min-width:82px;height:44px;padding:0 10px}
  body.local19-shell .app-menu-trigger svg{width:18px;height:18px}
  body.local19-shell .app-breadcrumb:has(#appBreadcrumbCurrent:not(:empty))~.app-top-search-button{margin-left:auto}
  body.local19-shell .topbar:has(#appBreadcrumbCurrent:not(:empty)) .topbar-brand{display:none}
  body.local19-shell .topbar:has(#appBreadcrumbCurrent:not(:empty)) .app-menu-trigger{flex-basis:44px;min-width:44px;width:44px;padding:0}
  body.local19-shell .topbar:has(#appBreadcrumbCurrent:not(:empty)) .app-menu-trigger span{display:none}
  body.local19-shell .app-breadcrumb{flex:1;max-width:none;font-size:13px}
  body.local19-shell .app-breadcrumb button{font-size:13px}
  body.local19-shell .app-breadcrumb strong{font-size:14px}
  body.local19-shell .app-top-search-button{margin-left:auto}
  body.local19-shell .app-account-button{flex-basis:44px;width:44px;height:44px}
  body.local19-shell #workspaceHeaderHost:not([hidden]){margin-top:8px;padding:0 14px}
  body.local19-shell #workspaceHeaderHost :is(.workspace-page-heading,.modal-heading){flex-wrap:wrap}
  body.local19-shell .workspace-page{min-height:calc(100dvh - 56px)}
  body.local19-shell .workspace-page:not(.frequent-workspace){padding:14px}
  body.local19-shell .modal.workspace-embedded>.modal-panel{min-height:calc(100dvh - 56px);padding:14px}
  body.local19-shell #operationCenterModal.lighting-workspace-mode>.operation-center-panel{padding:0}
  body.local19-shell #lightingWorkspaceHost{padding:14px}
  .frequent-wrap{gap:14px;padding:20px 14px 38px}
  .frequent-date{margin-bottom:5px;font-size:11px}
  .frequent-intro h1{font-size:28px}
  .frequent-intro p{margin-top:4px;font-size:13px}
  .frequent-bento{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:auto;gap:10px}
  .frequent-feature{grid-column:span 2;grid-row:auto;gap:10px;padding:17px 18px}
  .frequent-feature-open{position:relative;flex:none;min-height:108px;gap:10px}
  .frequent-feature-art{position:absolute;right:0;top:9px;display:block;width:118px;height:90px;min-height:0}
  .frequent-feature-art svg{width:118px;height:90px}
  .frequent-feature-copy{max-width:calc(100% - 114px);gap:4px}
  .frequent-feature-copy strong{font-size:23px;line-height:1.25}
  .frequent-feature-copy small{font-size:12px;line-height:1.45}
  .frequent-continue{min-height:52px;padding:8px 12px}
  .frequent-continue strong{font-size:13px}
  .frequent-continue em{font-size:12px}
  .frequent-tile{min-height:156px;gap:8px;padding:14px}
  .frequent-bento>.frequent-tile.frequent-tile-wide{display:grid;grid-column:1/-1;grid-template-columns:minmax(0,1fr) 96px;grid-template-rows:auto 1fr;align-items:end;min-height:148px}
  .frequent-tile-wide .frequent-tile-top{grid-column:1/-1}
  .frequent-bento>.frequent-tile.frequent-tile-wide>svg{grid-column:2;grid-row:2;justify-self:end;align-self:end}
  .frequent-tile-wide .frequent-tile-copy{grid-column:1;grid-row:2}
  .frequent-tile svg{width:84px;height:50px;align-self:flex-start}
  .frequent-tile-copy strong{font-size:16px;line-height:1.25}
  .frequent-tile-copy small{font-size:12px;line-height:1.4}
  .frequent-all{gap:12px;min-height:56px;padding:10px 14px}
  .frequent-all>svg{flex-basis:20px;width:20px;height:20px}
  .frequent-all small{display:none}
  .frequent-all em{font-size:0}
  .frequent-all em span{font-size:18px}
  .frequent-recent-heading{padding:14px}
  .frequent-recent-item{grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;min-height:60px;padding:10px 14px}
  .frequent-recent-item>*:first-child{grid-column:1/-1}

  .app-menu-panel{inset:0;top:0;left:0;width:100vw;max-width:none;height:100dvh;max-height:none;border:0;border-radius:0;box-shadow:none;animation:local19-menu-up .24s cubic-bezier(.2,.7,.2,1) both}
  .app-menu-heading{flex:0 0 56px;min-height:56px;padding:0 12px 0 16px}
  .app-menu-heading h2{font-size:17px}
  .app-menu-heading button{min-width:76px;min-height:44px;border-color:#141413;font-size:14px}
  .app-menu-search-wrap{flex:0 0 auto;padding:12px 16px 10px;border:0}
  .app-menu-search{min-height:48px;padding:0 14px}
  .app-menu-search input{height:44px;font-size:16px}
  .app-menu-escape{display:none}
  .app-menu-favorites{flex:0 0 auto;flex-wrap:wrap;gap:8px;min-height:0;max-width:100%;padding:4px 16px 14px;border-bottom:0;background:#fff}
  .app-menu-favorites::before{display:block;flex-basis:100%;content:"最近使用（這支手機）";margin:0;color:#6f6a60;font-size:12px;font-weight:700;letter-spacing:.03em}
  .app-menu-favorite{flex:0 0 auto;min-height:44px;font-size:14px}
  .app-menu-groups{display:block;flex:1;min-height:0;overflow-y:auto;padding:0}
  .app-menu-group{min-width:0}
  .app-menu-group-toggle{display:flex;justify-content:space-between;min-height:52px;margin:0;padding:0 16px;border-top:1px solid #ece9e2;color:#141413;font-size:15px;letter-spacing:0}
  .app-menu-group-toggle::before{display:none}
  .app-menu-group-toggle[aria-expanded="true"]{background:#faf9f6}
  .app-menu-group-toggle small{margin-left:0;color:#6f6a60;font-size:12px}
  .app-menu-group-toggle>span:last-child{display:inline;margin-left:auto;font-size:18px}
  .app-menu-group-items,.app-menu-group[data-menu-group="project-operations"] .app-menu-group-items, .app-menu-groups:has(>.app-menu-group:nth-child(4)) .app-menu-group[data-menu-group="project-operations"] .app-menu-group-items{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
  .app-menu-item{min-height:56px;padding:7px 16px 7px 30px;border-top:1px solid #f1eee8;border-radius:0}
  .app-menu-item b{font-size:15px}
  .app-menu-item small{font-size:12px}
  .app-menu-system-desktop-only{border-top:1px solid #ece9e2;background:#f6f5f1}
  .app-menu-system-desktop-only p{margin:0;padding:16px;color:#79766f;font-size:14px;line-height:1.4}
  .app-menu-install-card:not([hidden]){display:flex;align-items:center;gap:12px;flex:0 0 auto;min-height:78px;padding:12px 16px calc(12px + env(safe-area-inset-bottom));border-top:1px solid #e7e3da;background:#f6f2ea}
  .app-menu-install-card img{display:block;flex:0 0 44px;width:44px;height:44px;border-radius:10px}
  .app-menu-install-card>div{flex:1;min-width:0}
  .app-menu-install-card strong{display:block;color:#2b2a27;font-size:14px}
  .app-menu-install-card p{margin:3px 0 0;color:#666057;font-size:12px;line-height:1.4}
  body.local19-shell .app-menu-panel .app-menu-install-card button:not([hidden]){display:inline-flex;align-items:center;justify-content:center;flex:0 0 70px;width:70px;max-width:70px;min-width:70px;min-height:44px;padding:0 12px;border:0;border-radius:5px;background:#2b2a27;color:#fff;font-size:14px;font-weight:700}
  .frequent-recent[hidden]{display:none!important}
  .app-menu-footer{display:none}
  body.local19-shell .app-action-notice{top:68px;right:14px;left:14px;width:auto;max-width:none}
}
@keyframes local19-menu-up{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){
  .frequent-feature,.frequent-tile,.frequent-accent,.app-menu-panel{animation:none!important}
  .frequent-feature,.frequent-tile,.frequent-arrow,.frequent-all em span{transition:none!important}
}
.frequent-feature-copy-mobile,.specification-library-cards,.specification-library-mobile-heading{display:none}
@media(max-width:760px){
  .frequent-feature-copy-desktop{display:none}
  .frequent-feature-copy-mobile{display:block}
  body.local19-shell #projectSpecificationModal.open{z-index:60}
  body.local19-shell #projectSpecificationModal .project-specification-heading>[data-specification-close]{min-width:44px;min-height:44px;padding:8px 10px;font-size:13px}
  body.local19-shell #projectSpecificationModal .project-specification-heading>[data-specification-close]:focus-visible{outline:3px solid #a9783c;outline-offset:2px}
  body.local19-shell:has(#specificationLibraryModal.workspace-embedded.open) #workspaceHeaderHost{display:none}
  body.local19-shell:has(#specificationLibraryModal.workspace-embedded.open) #embeddedWorkspaceHost{scroll-margin-top:56px}
  .specification-library-mobile-heading{display:block;position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  #specificationLibraryModal .project-specification-table-tools{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px;margin:8px 12px 10px}
  #specificationLibraryModal .project-specification-table-tools label{min-width:0;margin:0;gap:0;font-size:12px}
  #specificationLibraryModal .project-specification-table-tools label>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  #specificationLibraryModal .project-specification-table-tools label:first-child{grid-column:1/-1}
  #specificationLibraryModal .project-specification-table-tools label:nth-child(2){grid-column:1}
  #specificationLibraryModal .project-specification-table-tools>button{grid-column:2;min-width:104px;min-height:44px;padding:8px 10px;font-size:14px;white-space:nowrap}
  #specificationLibraryModal .project-specification-table-tools input{min-height:48px;font-size:16px}
  #specificationLibraryModal .project-specification-table-tools select{width:100%;min-height:44px;padding:8px 10px;font-size:16px}
  #specificationLibraryModal #specificationLibraryImport{margin:0 12px 12px}
  #specificationLibraryModal #specificationLibraryImport summary{display:flex;align-items:center;min-height:44px;padding:8px 4px;cursor:pointer}
  #specificationLibraryModal #specificationLibraryImport summary::before{content:"▸";margin-right:8px;font-size:13px}
  #specificationLibraryModal #specificationLibraryImport[open] summary::before{content:"▾"}
  #specificationLibraryModal #specificationLibraryImport select{min-height:44px;font-size:16px}
  #specificationLibraryModal #specificationLibraryImport button{min-height:44px;font-size:14px}
  #specificationLibraryModal .specification-library-file{min-height:52px}
  #specificationLibraryModal .specification-library-file input[type=checkbox]{width:44px;height:44px;flex:0 0 44px}
  #specificationLibraryModal .specification-library-table{display:none}
  #specificationLibraryModal #specificationLibraryStatus{margin:0 12px 8px;color:#5f5c55;font-size:12px;line-height:1.5}
  #specificationLibraryModal .specification-library-cards{display:grid;gap:8px;min-width:0;margin:0 12px 20px}
  .specification-library-card{display:grid;gap:8px;min-width:0;padding:12px 14px;border:1px solid #dedad2;border-radius:4px;background:#fff;color:#141413}
  .specification-library-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
  .specification-library-card-head b{min-width:0;font-size:15px;font-weight:600;line-height:1.4;overflow-wrap:anywhere}
  .specification-library-card-status{flex:0 0 auto;padding:4px 9px;border-radius:999px;background:#ecebe7;color:#3d3b36;font-size:12px;font-weight:700;white-space:nowrap}
  .specification-library-card-meta{display:grid;grid-template-columns:64px minmax(0,1fr);gap:4px 8px;font-size:13px;line-height:1.45;overflow-wrap:anywhere}
  .specification-library-card-meta span:nth-child(odd){color:#5f5c55}
  #specificationLibraryModal .specification-library-card-action{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;padding:8px 12px;border:1px solid #141413;border-radius:2px;background:#141413;color:#fff;font-size:14px;font-weight:600;text-align:center}
  #specificationLibraryModal .specification-library-card-action:disabled{border-color:#dedad2;background:#f2f0eb;color:#5f5c55;opacity:1}
  .specification-library-card-empty{margin:0;padding:16px;border:1px solid #dedad2;border-radius:4px;background:#fff;color:#5f5c55;font-size:14px}
}
/* LOCAL-50: the loader sits outside the module host, which mount replaces. */
.lm-load-stage{position:fixed;inset:64px 0 0;z-index:47;display:grid;place-items:center;overflow:hidden;background:radial-gradient(ellipse at 50% 46%,#fffaf0 0%,#f6f2ea 46%,#f2f0eb 75%);color:#141413;font-family:"Noto Sans TC","Microsoft JhengHei","PingFang TC",system-ui,sans-serif;opacity:1;transition:opacity .3s ease;pointer-events:auto}
.lm-load-stage.is-exiting{opacity:0;pointer-events:none}
.lm-load-box{position:relative;display:flex;flex-direction:column;align-items:center;max-width:calc(100vw - 24px);text-align:center}
.lm-load-lit{position:relative;display:grid;place-items:center;width:200px;height:200px;isolation:isolate}
.lm-load-mark,.lm-load-cast{display:block;width:200px;height:200px;overflow:visible}
.lm-load-mark{position:relative;z-index:2}
.lm-load-ring{stroke-dasharray:100;stroke-dashoffset:100;animation:lm-load-ring 4s cubic-bezier(.65,0,.35,1) both}
.lm-load-band{opacity:0;transform:translate(10px,-10px);animation:lm-load-band 4s cubic-bezier(.2,.7,.2,1) both}
.lm-load-mountain{transform-box:fill-box;transform-origin:50% 100%;transform:scaleY(0);animation:lm-load-mountain 4s cubic-bezier(.2,.7,.2,1) both}
.lm-load-parts{animation:lm-load-parts 4s linear both}
.lm-load-final{opacity:0;animation:lm-load-final 4s linear both}
.lm-load-word{position:relative;z-index:3;margin-top:26px;color:#2b2a27;font-family:"Helvetica Neue",Arial,"Noto Sans TC",sans-serif;font-size:30px;font-weight:400;letter-spacing:.01em;line-height:1.15;opacity:0;animation:lm-load-word 4s ease-out both}
.lm-load-status{display:flex;flex-direction:column;align-items:center;gap:10px;margin-top:28px}
.lm-load-status b{color:#3d3b36;font-size:15px;font-weight:700;letter-spacing:.04em}
.lm-load-status small{color:#8a857a;font-size:12.5px}
.lm-load-bar{position:relative;width:220px;height:3px;overflow:hidden;border-radius:2px;background:#e6e0d3}
.lm-load-bar i{position:absolute;top:0;left:-40%;width:40%;height:100%;border-radius:2px;background:linear-gradient(90deg,rgba(169,120,60,0),#a9783c,rgba(169,120,60,0));animation:lm-load-bar 1.4s ease-in-out infinite}
.lm-load-sweep{transform:translateX(-120px);animation:lm-load-sweep 4s ease-in-out both}
.lm-load-stage.is-waiting.is-orders .lm-load-sweep{animation:lm-load-sweep-wait 2s ease-in-out infinite}
.lm-load-stage.is-catalog .lm-load-word{margin-top:40px}
.lm-load-beam{position:absolute;z-index:0;left:-70%;top:-95%;width:240%;height:200%;background:conic-gradient(from 150deg at 18% 10%,rgba(255,236,190,0) 0deg,rgba(255,236,190,.55) 12deg,rgba(255,236,190,0) 30deg);opacity:0;animation:lm-load-beam 4s ease-in-out both;pointer-events:none}
.lm-load-halo{position:absolute;z-index:1;inset:-28%;border-radius:50%;background:radial-gradient(circle,rgba(255,226,160,.85) 0%,rgba(246,223,174,.35) 38%,rgba(246,223,174,0) 66%);opacity:0;transform:scale(.7);animation:lm-load-halo 4s ease-in-out both}
.lm-load-stage.is-catalog .lm-load-mark{animation:lm-load-mark-glow 4s ease-in-out both}
.lm-load-cast{position:absolute;z-index:1;left:0;top:0;transform-origin:50% 100%;transform:translate(26%,2%) skewX(-38deg) scaleY(.32);filter:blur(5px);opacity:0;animation:lm-load-cast 4s ease-in-out both}
.lm-load-stage.is-waiting.is-catalog .lm-load-halo{animation:lm-load-halo-wait 2s ease-in-out infinite}
.lm-load-stage.is-short .lm-load-parts{animation:none;opacity:0}
.lm-load-stage.is-short .lm-load-final,.lm-load-stage.is-short .lm-load-word{animation:none;opacity:1;transform:none}
.lm-load-stage.is-short.is-orders .lm-load-sweep{animation:lm-load-sweep-wait .8s ease-in-out both}
.lm-load-stage.is-short.is-waiting.is-orders .lm-load-sweep{animation:lm-load-sweep-wait 2s ease-in-out infinite}
.lm-load-stage.is-short.is-catalog .lm-load-beam{animation:lm-load-short-beam .8s ease-in-out both}
.lm-load-stage.is-short.is-catalog .lm-load-halo{animation:lm-load-short-halo .8s ease-in-out both}
.lm-load-stage.is-short.is-catalog .lm-load-mark{animation:lm-load-short-mark .8s ease-in-out both}
.lm-load-stage.is-short.is-catalog .lm-load-cast{animation:lm-load-short-cast .8s ease-in-out both}
.lm-load-stage.is-short.is-waiting.is-catalog .lm-load-halo{animation:lm-load-halo-wait 2s ease-in-out infinite}
@keyframes lm-load-ring{0%{stroke-dashoffset:100}40%,100%{stroke-dashoffset:0}}
@keyframes lm-load-band{0%,30%{opacity:0;transform:translate(10px,-10px)}50%,100%{opacity:1;transform:none}}
@keyframes lm-load-mountain{0%,45%{transform:scaleY(0)}70%,100%{transform:scaleY(1)}}
@keyframes lm-load-parts{0%,69%{opacity:1}71%,100%{opacity:0}}
@keyframes lm-load-final{0%,69%{opacity:0}71%,100%{opacity:1}}
@keyframes lm-load-word{0%,60%{opacity:0;transform:translateY(6px)}80%,100%{opacity:1;transform:none}}
@keyframes lm-load-sweep{0%,75%{transform:translateX(-120px)}100%{transform:translateX(240px)}}
@keyframes lm-load-sweep-wait{0%{transform:translateX(-120px)}100%{transform:translateX(240px)}}
@keyframes lm-load-beam{0%,75%{opacity:0}100%{opacity:1}}
@keyframes lm-load-halo{0%,75%{opacity:0;transform:scale(.7)}90%{opacity:1;transform:scale(1.04)}100%{opacity:.85;transform:scale(1)}}
@keyframes lm-load-mark-glow{0%,75%{filter:none}100%{filter:drop-shadow(0 0 10px rgba(255,214,140,.95)) drop-shadow(0 0 26px rgba(246,200,120,.55))}}
@keyframes lm-load-cast{0%,75%{opacity:0}100%{opacity:.28}}
@keyframes lm-load-halo-wait{0%,100%{opacity:.72;transform:scale(.96)}50%{opacity:1;transform:scale(1.06)}}
@keyframes lm-load-short-beam{from{opacity:0}to{opacity:1}}
@keyframes lm-load-short-halo{from{opacity:0;transform:scale(.7)}to{opacity:.85;transform:scale(1)}}
@keyframes lm-load-short-mark{from{filter:none}to{filter:drop-shadow(0 0 10px rgba(255,214,140,.95)) drop-shadow(0 0 26px rgba(246,200,120,.55))}}
@keyframes lm-load-short-cast{from{opacity:0}to{opacity:.28}}
@keyframes lm-load-bar{0%{left:-40%}100%{left:100%}}
@media(max-width:760px){.lm-load-stage{top:56px}.lm-load-lit,.lm-load-mark,.lm-load-cast{width:132px;height:132px}.lm-load-word{font-size:22px;margin-top:22px}.lm-load-stage.is-catalog .lm-load-word{margin-top:28px}.lm-load-status{margin-top:22px}.lm-load-status b{font-size:14px}.lm-load-status small{font-size:11px}.lm-load-bar{width:160px}}
@media(prefers-reduced-motion:reduce){.lm-load-stage{transition:none}.lm-load-ring,.lm-load-band,.lm-load-mountain,.lm-load-parts,.lm-load-final,.lm-load-word,.lm-load-sweep,.lm-load-beam,.lm-load-halo,.lm-load-mark,.lm-load-cast,.lm-load-bar i{animation:none!important}.lm-load-parts{opacity:0}.lm-load-final,.lm-load-word{opacity:1;transform:none}.lm-load-sweep{opacity:0}.lm-load-stage.is-catalog .lm-load-mark{filter:drop-shadow(0 0 10px rgba(255,214,140,.9)) drop-shadow(0 0 26px rgba(246,200,120,.5))}.lm-load-stage.is-catalog .lm-load-beam{opacity:.6}.lm-load-stage.is-catalog .lm-load-halo{opacity:.85;transform:scale(1)}.lm-load-stage.is-catalog .lm-load-cast{opacity:.28}.lm-load-bar i{left:30%}}

/* LOCAL-77: schedule-derived three-category project overview. */
.project-overview-heading{align-items:flex-end}
.project-overview-sync-times{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px 18px;color:#5f625f;font-size:.78rem;line-height:1.5}
.project-overview-sync-times span{white-space:nowrap}
.project-overview-sync-times strong{color:#263d30;font-weight:800;margin-left:4px}
.project-category-tabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.project-category-tabs .metric{min-height:82px;padding:12px 16px}
.project-category-tabs .metric strong{font-size:1.65rem;margin-top:3px}
.project-category-tabs .status-construction{background:#dcefe2}
.project-category-tabs .status-designing{background:#f5e9c4}
.project-category-tabs .status-finished{background:#e9ece9}
.project-overview-filters{display:grid;grid-template-columns:150px 160px minmax(200px,1fr);gap:10px;margin:0 0 14px}
.project-overview-filters label{display:grid;gap:4px;color:#5f625f;font-size:.74rem;font-weight:800}
.project-overview-filters select,.project-overview-filters input{width:100%;min-width:0;min-height:42px;padding:8px 10px;border:1px solid #c9c7c1;background:#fff;color:#202522;font-size:.9rem}
.project-overview-page .project-card{padding:14px 16px}
.project-overview-page .project-card .project-card-toggle,
.project-overview-page .project-card.collapsed .project-card-toggle{display:grid;grid-template-columns:minmax(180px,2fr) 88px 52px minmax(170px,1.5fr) 95px 18px;gap:12px;align-items:center;min-height:58px}
.project-overview-name{display:grid;min-width:0;gap:2px}
.project-overview-name .card-title{font-size:.99rem;font-weight:800;line-height:1.35;overflow-wrap:anywhere}
.project-overview-name small{color:#626762;font-size:.7rem;font-weight:600}
.project-overview-name .project-overview-case-number{color:#315a43;min-height:.9em;font-weight:800}
.project-overview-status{justify-self:start;white-space:nowrap;font-size:.74rem;font-weight:800}
.project-overview-department{font-size:.82rem;font-weight:800;color:#555d57}
.project-overview-spec{display:grid;gap:2px;min-width:0;font-size:.77rem;line-height:1.4}
.project-overview-spec strong{font-weight:800;overflow-wrap:anywhere}
.project-overview-spec small{color:#676d68;font-size:.7rem;overflow-wrap:anywhere}
.project-overview-spec-confirmed strong{color:#286544}
.project-overview-spec-pending strong,.project-overview-spec-location strong{color:#9a6a1e}
.project-overview-spec-missing strong{color:#77716c}
.project-overview-row-action{color:#26583e;font-size:.78rem;font-weight:800;white-space:nowrap}
.project-overview-page .project-card .collapse-mark{border-left-width:7px;border-right-width:7px;border-bottom-width:10px}
@media(max-width:760px){
 .project-overview-page .workspace-page-heading{gap:6px;margin-bottom:8px}
 .project-overview-sync-times{width:100%;justify-content:flex-start;flex-wrap:nowrap;gap:8px;font-size:.62rem;overflow:hidden}
 .project-overview-sync-times span{min-width:0;white-space:nowrap}
 .project-overview-sync-times strong{margin-left:1px}
 .project-category-tabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-bottom:8px}
 .project-category-tabs .metric{min-height:66px;padding:8px}
 .project-category-tabs .metric span{font-size:.75rem}
 .project-category-tabs .metric strong{font-size:1.25rem}
 .project-overview-filters{grid-template-columns:1fr 1fr;gap:7px}
 .project-overview-search{grid-column:1/-1}
 .project-overview-page .project-card{padding:12px}
 .project-overview-page .project-card .project-card-toggle,
 .project-overview-page .project-card.collapsed .project-card-toggle{position:relative;grid-template-columns:minmax(0,1fr) auto;gap:5px 8px;padding-right:18px}
 .project-overview-name{grid-column:1/-1}
 .project-overview-status{grid-column:1}
 .project-overview-department{grid-column:2;justify-self:end}
 .project-overview-spec{grid-column:1/-1}
 .project-overview-row-action{grid-column:1/-1;margin-top:3px}
 .project-overview-page .project-card .collapse-mark{position:absolute;right:0;top:22px}
}
@media(max-width:380px){.project-overview-sync-times{font-size:.58rem;gap:5px}.project-overview-page .section-heading{display:block}.project-overview-page .project-list-actions{margin-top:8px}}
