:root {
  color-scheme: dark;
  --bg: #0b1120;
  --surface: #101827;
  --surface-strong: #111827;
  --surface-raised: #172033;
  --ink: #e5edf7;
  --muted: #9aa8ba;
  --quiet: #7f8da2;
  --line: #334155;
  --line-soft: #26364d;
  --accent: #f8bf00;
  --accent-hover: #ffd34d;
  --accent-ink: #17120a;
  --accent-strong: #fff2b3;
  --accent-soft: #332800;
  --warn: #f59e0b;
  --steel: #d8dee8;
  --blue: var(--accent);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.model-import { display: grid; gap: 12px; min-width: 0; }
.model-import p { margin: 0; color: var(--muted); line-height: 1.5; }
.model-import-drop { display: grid; gap: 8px; padding: 24px 16px; border: 1px dashed var(--quiet); border-radius: 8px; background: var(--surface-raised); text-align: center; cursor: pointer; }
.model-import-drop:hover, .model-import-drop:focus-visible { border-color: var(--accent); }
.model-import-drop span, .model-import-native span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.model-import-native, .model-import-summary { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.model-import-status { min-height: 24px; font-size: 13px; color: var(--accent-strong); overflow-wrap: anywhere; }
.model-import-rows { display: grid; gap: 8px; }
.model-import-row { padding: 12px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.model-import-row.needs-review { border-color: var(--warn); }
.model-import-path { display: flex !important; align-items: start; gap: 10px; overflow-wrap: anywhere; }
.model-import-path input { width: auto !important; flex-shrink: 0; }
.model-import-path small { display: block; color: var(--muted); margin-top: 4px; font-size: 11px; }
.model-import-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; align-items: end; }
.model-import-fields label { min-width: 0; font-size: 12px; }
.model-import-fields input, .model-import-fields select { width: 100%; min-width: 0; }
.model-import .detail-actions { flex-wrap: wrap; }
.model-import-native, .model-import-summary, .model-import-drop { min-width: 0; overflow-wrap: anywhere; }
.model-import .detail-actions button { white-space: normal; max-width: 100%; }
body.tekla-panel { overflow: auto; }
.tekla-panel .app-shell { height: auto; min-height: 100vh; }
.tekla-panel .dashboard-layout { display: flex; flex-direction: column; }
.tekla-panel .layout-splitter, .tekla-panel .detail-collapse-button { display: none; }
.tekla-panel .detail-region { width: 100%; max-width: none; }
.tekla-panel .topbar, .tekla-panel .topbar-actions { flex-wrap: wrap; }
.tekla-panel .project-grid { grid-template-columns: 1fr; max-height: 220px; overflow: auto; }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(248, 191, 0, 0.82);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.app-shell {
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--bg);
}

.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #0b1736;
}

.brand-block,
.topbar-actions,
.project-meta,
.project-footer,
.detail-header,
.summary-row,
.row-actions,
.section-heading {
  display: flex;
  align-items: center;
}

.brand-block {
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid rgba(248, 191, 0, .42);
  background: #101827;
  color: #fff;
  box-shadow: 0 8px 24px rgba(248, 191, 0, .16);
  font-weight: 850;
  font-size: 12px;
}

.brand-mark img {
  width: 76%;
  height: 76%;
  display: block;
  object-fit: contain;
}

.product-nav { align-self: stretch; display: flex; align-items: center; gap: 4px; margin-left: auto; }
.product-nav a { display: inline-flex; align-items: center; height: 36px; padding: 0 11px; border-radius: 8px; color: #aebad3; text-decoration: none; font-size: 11px; font-weight: 750; }
.product-nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.product-nav a.active { color: var(--accent-strong); background: var(--accent-soft); box-shadow: inset 0 -2px var(--accent); }

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
}

h2 {
  font-size: 17px;
}

h3 {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-block span,
.section-heading span,
.project-main span,
.project-meta,
.project-footer,
.detail-header p,
.summary-row span,
.package-body span,
.package-body small,
.empty-state span,
.settings-strip span {
  color: var(--muted);
}

.topbar-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.account-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-menu {
  position: relative;
}

.account-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.account-button:hover,
.account-button[aria-expanded="true"] {
  border-color: #3d516e;
  background: #1c2840;
}

.account-button.icon-only {
  width: 36px;
  justify-content: center;
  padding: 0;
}

.account-mark,
.account-avatar {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 800;
}

.account-avatar {
  border-radius: 999px;
  background: #20314d;
  color: #dbeafe;
}

.account-label {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-caret {
  color: var(--muted);
  font-size: 11px;
}

.account-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 15;
  min-width: 230px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(3, 7, 18, 0.38);
}

.account-popover-right {
  left: auto;
  right: 0;
  min-width: 190px;
}

.account-popover-title {
  padding: 4px 6px 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.account-popover-empty {
  padding: 8px;
  color: var(--muted);
  font-size: 13px;
}

.account-menu-item {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.account-menu-item:hover,
.account-menu-item.active {
  border-color: var(--line);
  background: var(--surface-raised);
}

.account-menu-item small {
  color: #7dd3bc;
  font-size: 11px;
}

.account-invite-form {
  margin-top: 4px;
  padding-top: 8px;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line-soft);
}

.account-invite-form label {
  display: grid;
  gap: 4px;
}

.account-invite-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.account-invite-form input,
.account-invite-form select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-raised);
  color: var(--ink);
}

.account-invite-form select {
  color-scheme: dark;
}

.account-dialog {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  display: grid;
  gap: 14px;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.account-dialog-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.account-dialog-header p {
  margin-top: 4px;
  color: var(--muted);
}

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

.account-detail-grid div,
.team-row {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
}

.account-detail-grid div {
  display: grid;
  gap: 5px;
  padding: 10px;
}

.account-detail-grid span,
.team-row span {
  color: var(--muted);
}

.account-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.team-panel,
.team-list {
  display: grid;
  gap: 10px;
}

.team-invite-form {
  grid-template-columns: minmax(280px, 1fr) 180px auto;
  align-items: end;
  column-gap: 10px;
  row-gap: 8px;
  margin: 0;
  padding-top: 0;
  border-top: 0;
}

.team-invite-form .account-popover-title {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.team-invite-form label {
  min-height: 58px;
  padding: 0;
  border: 0;
  background: transparent;
}

.team-invite-form label span {
  min-height: 16px;
}

.team-invite-form input,
.team-invite-form select {
  min-height: 36px;
  background: var(--surface-raised);
}

.team-invite-form button {
  min-height: 36px;
  align-self: end;
  padding-inline: 14px;
}

.team-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 36px;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
}

.team-row.pending {
  grid-template-columns: minmax(0, 1fr) auto auto 36px;
}

.team-row div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.team-row strong,
.team-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-row select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  color-scheme: dark;
}

.team-row .icon-button {
  width: 34px;
  min-height: 34px;
}

.organization-choice-list {
  display: grid;
  gap: 8px;
}

.organization-choice {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--ink);
  text-align: left;
  font-weight: 700;
}

.organization-choice:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.search-box {
  width: min(360px, 44vw);
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--muted);
}

.search-box input,
.settings-strip input,
.upload-grid input,
.upload-grid select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.upload-grid select {
  color-scheme: dark;
}

.search-box input::placeholder,
.upload-grid input::placeholder,
.settings-strip input::placeholder {
  color: var(--quiet);
}

.upload-grid input::placeholder {
  opacity: 0.72;
  font-style: italic;
}

.command-button,
.icon-button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-raised);
  color: #d8dee8;
  white-space: nowrap;
}

.command-button {
  padding: 0 11px;
  font-size: 13px;
  font-weight: 700;
}

.command-button:hover,
.icon-button:hover {
  border-color: #3d516e;
  background: #1c2840;
}

.command-button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.command-button.primary:hover {
  background: var(--accent-hover);
}

.command-button.danger-solid {
  border-color: #b91c1c;
  background: #7f1d1d;
  color: #fee2e2;
}

.command-button.danger-solid:hover {
  border-color: #ef4444;
  background: #991b1b;
}

.command-button.compact {
  min-height: 32px;
  padding: 5px 10px;
}

.icon-button.danger {
  color: #f3a6a6;
}

.icon-button.danger:hover {
  border-color: #7f2d2d;
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
}

.icon-button {
  width: 36px;
  padding: 0;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 8px minmax(360px, var(--detail-width, 520px));
  gap: 0;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}

.dashboard-layout.detail-collapsed {
  grid-template-columns: minmax(360px, 1fr) 8px 38px;
}

.layout-splitter {
  width: 8px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 0;
  background:
    linear-gradient(90deg, transparent 0 2px, rgba(96, 165, 250, 0.24) 2px 3px, transparent 3px 5px, rgba(96, 165, 250, 0.24) 5px 6px, transparent 6px),
    #0d1524;
  cursor: col-resize;
  touch-action: none;
}

.layout-splitter:hover,
.layout-splitter:focus-visible {
  border-color: #3d516e;
  background:
    linear-gradient(90deg, transparent 0 2px, var(--accent) 2px 3px, transparent 3px 5px, var(--accent) 5px 6px, transparent 6px),
    #122033;
}

.dashboard-layout.detail-collapsed .layout-splitter {
  cursor: default;
  background: #0d1524;
}

.is-resizing-layout,
.is-resizing-layout * {
  cursor: col-resize !important;
  user-select: none;
}

.projects-region,
.detail-region,
.settings-strip {
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-strong);
}

.projects-region,
.detail-region {
  min-height: 0;
  padding: 10px;
  overflow: auto;
}

.section-heading {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  min-height: 28px;
}

.section-heading.compact {
  margin-bottom: 10px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.project-tile {
  min-height: 206px;
  display: grid;
  grid-template-rows: auto 58px auto auto auto;
  gap: 8px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface);
  color: var(--ink);
}

.project-tile:hover,
.project-tile.selected {
  border-color: var(--accent);
  background: var(--surface-raised);
  box-shadow: none;
}

.project-status,
.state-pill,
.eyebrow {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1;
}

.project-status,
.state-pill {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.state-pill.subtle {
  background: #202b42;
  color: var(--steel);
}

.eyebrow {
  margin-bottom: 6px;
  display: inline-block;
  background: #202b42;
  color: var(--quiet);
}

.project-image {
  min-height: 58px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid rgba(51, 65, 85, 0.75);
  background: #0f172a;
}

.project-image img {
  width: 100%;
  height: 100%;
  min-height: 58px;
  display: block;
  object-fit: cover;
}

.project-image.empty {
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(148, 163, 184, 0.1) 1px, transparent 1px),
    #0f172a;
  background-size: 24px 24px;
}

.project-image.empty span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.project-main {
  display: grid;
  gap: 4px;
}

.project-main strong {
  font-size: 16px;
}

.project-meta,
.project-footer {
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.detail-region {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

.detail-content {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.detail-region.collapsed {
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.detail-region.collapsed .detail-content {
  display: none;
}

.detail-collapse-button {
  z-index: 8;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #172033;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.detail-collapse-button:hover,
.detail-collapse-button:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.detail-region.collapsed .detail-collapse-button {
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 12px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.detail-region.collapsed .detail-collapse-button::after {
  content: "Details";
  overflow: hidden;
  max-height: 180px;
  font-size: 12px;
  font-weight: 800;
  text-orientation: mixed;
  text-overflow: ellipsis;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.detail-header {
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.dashboard-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.dashboard-panel-header {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  padding: 0 36px 0 12px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.dashboard-panel-header-shell {
  position: relative;
}

.dashboard-panel-header-control {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(-50%);
}

.dashboard-panel-header-shell.has-control .dashboard-panel-header {
  padding-right: 245px;
}

.dashboard-panel.open .dashboard-panel-header {
  border-bottom-color: var(--line);
}

.dashboard-panel.closed .dashboard-panel-header {
  border-bottom-color: transparent;
}

.dashboard-panel-header:hover,
.dashboard-panel-header:focus-visible {
  background: #172033;
}

.dashboard-panel-icon,
.dashboard-panel-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.dashboard-panel-icon svg {
  width: 14px;
  height: 14px;
}

.dashboard-panel-chevron svg {
  width: 13px;
  height: 13px;
}

.dashboard-panel-chevron {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  pointer-events: none;
}

.dashboard-panel-title {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.dashboard-panel-count {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.dashboard-panel-content {
  min-width: 0;
  min-height: 0;
  padding: 12px;
}

.dashboard-panel-content:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-panel-packages .dashboard-panel-content,
.dashboard-panel-reference-models .dashboard-panel-content {
  padding: 10px;
}

.dashboard-panel-packages .dashboard-panel-content:not([hidden]),
.dashboard-panel-reference-models .dashboard-panel-content:not([hidden]) {
  gap: 10px;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.summary-row div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
}

.summary-row strong {
  font-size: 17px;
}

.project-file-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
}

.project-file-summary div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.project-file-summary strong,
.project-file-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-file-summary span {
  color: var(--muted);
  font-size: 13px;
}

.upload-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.upload-panel.embedded {
  padding: 0;
  border: 0;
  background: transparent;
}

.reference-model-upload {
  gap: 8px;
}

.reference-model-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.reference-model-intro small {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.edit-panel {
  display: grid;
  gap: 16px;
}

.inline-editor {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f172a;
}

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

.reference-model-upload-grid {
  grid-template-columns: minmax(240px, 1.35fr) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.reference-model-dropzone {
  min-width: 0;
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 10px !important;
  border-style: dashed !important;
  cursor: pointer;
  outline: none;
}

.reference-model-dropzone:hover,
.reference-model-dropzone:focus-visible,
.reference-model-dropzone.is-dragging {
  border-color: var(--accent) !important;
  background: var(--accent-soft) !important;
}

.reference-model-dropzone.has-file {
  border-style: solid !important;
}

.reference-model-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.reference-model-dropzone-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--accent-strong) !important;
}

.reference-model-dropzone-icon svg {
  width: 20px;
  height: 20px;
}

.reference-model-dropzone-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.reference-model-dropzone-copy strong,
.reference-model-dropzone-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-model-dropzone-copy strong {
  color: var(--ink);
  font-size: 12px;
}

.reference-model-dropzone-copy small {
  color: var(--muted);
  font-size: 11px;
}

.reference-model-upload-grid .command-button {
  min-width: 104px;
  align-self: stretch;
}

.upload-grid label,
.settings-strip label {
  display: grid;
  gap: 6px;
}

.upload-grid label {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  background: var(--surface-raised);
  transition: border-color 140ms ease, background-color 140ms ease;
}

.upload-grid label:has(input[type="file"]:hover),
.upload-grid label:has(input[type="file"]:focus-visible) {
  border-color: #3d516e;
  background: #1c2840;
}

.upload-grid label span {
  color: var(--muted);
  font-size: 12px;
}

.upload-grid input[type="file"] {
  color: var(--muted);
  cursor: pointer;
}

.upload-grid input[type="file"]::file-selector-button {
  min-height: 28px;
  margin-right: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #202b42;
  color: #d8dee8;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.upload-grid input[type="file"]:hover::file-selector-button,
.upload-grid input[type="file"]:focus-visible::file-selector-button {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.upload-progress {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0f172a;
}

.upload-progress-head,
.upload-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.upload-progress-head strong {
  font-size: 13px;
}

.upload-progress-head span,
.upload-progress-meta {
  color: var(--muted);
  font-size: 12px;
}

.upload-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #0b1220;
  border: 1px solid var(--line-soft);
}

.upload-progress-track span {
  height: 100%;
  min-width: 8px;
  display: block;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255, 242, 179, 0.28), rgba(248, 191, 0, 0.96)),
    var(--accent);
  transition: width 180ms ease;
}

.upload-progress-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-input {
  grid-column: 1 / -1;
}

.package-list {
  display: grid;
  gap: 8px;
}

.package-group {
  display: grid;
  gap: 8px;
}

.package-group + .package-group {
  margin-top: 6px;
}

.package-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.package-group-heading strong {
  color: var(--ink);
  font-size: 12px;
  text-transform: uppercase;
}

.panel-sort-control {
  display: inline-flex;
  align-items: center;
  width: auto;
  min-width: 0;
  gap: 8px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
}

.panel-sort-control span,
.package-edit-grid span {
  color: var(--muted);
  font-size: 12px;
}

.panel-sort-control select,
.package-edit-grid input,
.package-edit-grid select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.panel-sort-control select {
  width: auto;
  min-width: 82px;
  font-size: 13px;
}

.panel-sort-control select,
.package-edit-grid select {
  color-scheme: dark;
}

.package-row {
  min-height: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.reference-model-row {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  padding-block: 8px;
}

.reference-model-row .package-body {
  gap: 2px;
}

.reference-model-file-details {
  min-width: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 8px;
}

.reference-model-file-details > span {
  color: var(--muted);
}

.reference-model-file-details small {
  color: var(--muted);
  font-size: 12px;
}

.reference-model-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.audit-list,
.version-list {
  display: grid;
  gap: 8px;
}

.audit-row,
.version-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.version-row.current {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
}

.audit-row.failed {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.08);
}

.audit-row div,
.version-row div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.audit-row strong,
.audit-row span,
.version-row strong,
.version-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-row span,
.version-row span {
  color: var(--muted);
}

.package-row-edit {
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

.package-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 130px;
  gap: 8px;
}

.package-edit-grid label {
  display: grid;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
}

.package-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.package-row > .state-pill {
  align-self: start;
  margin-top: 2px;
}

.package-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.package-body strong,
.package-body span,
.package-body small {
  overflow-wrap: anywhere;
  white-space: normal;
}

.package-body strong {
  line-height: 1.25;
}

.package-body span {
  line-height: 1.3;
}

.package-storage {
  color: #7dd3bc;
}

.row-actions {
  grid-column: 2 / -1;
  justify-content: flex-start;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.empty-state {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 104px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  background: rgba(15, 23, 42, 0.35);
}

.empty-state.compact {
  min-height: 72px;
  padding: 12px;
}

.empty-state.large {
  min-height: 300px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(4px);
}

.confirm-dialog {
  width: min(440px, 100%);
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.confirm-header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.confirm-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #7f2d2d;
  border-radius: 6px;
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
  font-weight: 800;
}

.confirm-dialog h2 {
  margin-bottom: 6px;
}

.confirm-dialog p {
  color: var(--muted);
  line-height: 1.45;
}

.project-share-copy-field {
  width: 100%;
  min-width: 0;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--muted);
  border-radius: 6px;
  font-size: 15px;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-strip {
  margin: 0;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
  border-width: 1px 0 0;
}

.settings-strip label {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 78% 12%, rgba(248, 191, 0, .12), transparent 30%),
    linear-gradient(145deg, #090f1d, #111b2e);
}

.auth-card {
  width: min(520px, 100%);
  color-scheme: dark;
  --surface: #111827;
  --surface-strong: #101827;
  --surface-raised: #172033;
  --ink: #d8dee8;
  --muted: #9aa8ba;
  --quiet: #7f8da2;
  --line: #334155;
  --line-soft: #26364d;
  --accent: #f8bf00;
  --accent-hover: #ffd34d;
  --accent-ink: #17120a;
  --accent-strong: #fff2b3;
  --accent-soft: #332800;
  display: grid;
  gap: 20px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101827;
  color: var(--ink);
  box-shadow: 0 22px 64px rgba(0, 0, 0, .42);
}

.auth-card .brand-block { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.auth-card .brand-block span { color: var(--muted); }
.auth-card .brand-mark { width: 44px; height: 44px; border-radius: 13px; }

.auth-card p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.tekla-login-card {
  width: min(620px, 100%);
}

.tekla-code-box {
  min-height: 76px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--accent);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

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

.session-summary div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
}

.session-summary span {
  color: var(--muted);
  font-size: 12px;
}

.session-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.tekniq-auth { display: grid; gap: 14px; }
.auth-form { display: grid; gap: 14px; }
.auth-heading { display: grid; gap: 6px; padding-bottom: 4px; }
.auth-heading h2 { color: var(--ink); font-size: 21px; letter-spacing: -.025em; }
.auth-heading p { max-width: 410px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.auth-kicker { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; overflow-wrap: anywhere; }
.auth-field { display: grid; gap: 7px; color: #c8d3e3; font-size: 11px; font-weight: 750; }
.auth-field input { width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--surface); outline: none; }
.auth-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(248, 191, 0, .14); }
.auth-submit { min-height: 44px; border: 1px solid var(--accent); border-radius: 7px; color: var(--accent-ink); background: var(--accent); font-weight: 800; cursor: pointer; box-shadow: 0 8px 20px rgba(248, 191, 0, .18); }
.auth-submit:hover { background: var(--accent-hover); }
.auth-submit:disabled, .auth-link:disabled { cursor: wait; opacity: .58; }
.auth-link { justify-self: center; padding: 2px 6px; border: 0; color: var(--accent); background: transparent; font-size: 11px; font-weight: 750; cursor: pointer; }
.auth-link.muted { color: var(--muted); font-weight: 650; }
.auth-error { padding: 10px 12px; border: 1px solid #7f1d1d; border-radius: 7px; color: #fecaca; background: #2b1118; font-size: 11px; line-height: 1.45; }
.auth-security { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 10px; }
.auth-security span { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; color: #6ee7b7; background: #12372d; font-weight: 900; }
.auth-card .organization-choice { color: var(--ink); background: var(--surface); }
.auth-card .organization-choice:hover { background: var(--accent-soft); }
.auth-card .command-button { color: var(--ink); background: var(--surface); }
.auth-card .command-button.primary { color: var(--accent-ink); background: var(--accent); }

.admin-layout {
  min-height: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 14px;
  overflow: auto;
}

.admin-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.admin-login {
  width: min(460px, 100%);
  justify-self: center;
  grid-column: 1 / -1;
}

.admin-card p,
.admin-form span,
.tenant-row span,
.admin-detail-heading p {
  color: var(--muted);
}

.admin-form {
  display: grid;
  gap: 10px;
}

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

.admin-form label {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
}

.admin-form input,
.admin-form select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.admin-form select {
  color-scheme: dark;
}

.admin-form .form-actions {
  grid-column: 1 / -1;
}

.admin-users-panel {
  display: grid;
  gap: 10px;
}

.admin-summary-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.section-heading.compact {
  margin: 0;
}

.admin-health-grid,
.admin-storage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.admin-health-item,
.admin-storage-grid div {
  display: grid;
  gap: 4px;
  min-height: 56px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
}

.admin-health-item.ok {
  border-color: rgba(16, 185, 129, 0.35);
}

.admin-health-item.warning {
  border-color: rgba(245, 158, 11, 0.45);
}

.admin-health-item span,
.admin-storage-grid span,
.admin-storage-row span {
  color: var(--muted);
}

.admin-storage-list {
  display: grid;
  gap: 8px;
}

.admin-storage-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-strong);
}

.admin-storage-row div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.admin-storage-row strong,
.admin-storage-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-form {
  grid-template-columns: minmax(220px, 1fr) 180px auto;
  align-items: end;
}

.admin-user-list {
  display: grid;
  gap: 8px;
}

.admin-user-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 36px;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.admin-user-row.pending {
  grid-template-columns: minmax(0, 1fr) auto auto 36px;
}

.admin-user-row div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.admin-user-row strong,
.admin-user-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-row span {
  color: var(--muted);
}

.admin-user-row select {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-raised);
  color: var(--ink);
  color-scheme: dark;
}

.form-error {
  padding: 10px 12px;
  border: 1px solid #7f2d2d;
  border-radius: 7px;
  background: rgba(127, 29, 29, 0.28);
  color: #fecaca;
  font-weight: 700;
}

.form-success {
  padding: 10px 12px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: rgba(5, 150, 105, 0.18);
  color: #bbf7d0;
  font-weight: 700;
}

.form-info {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(96, 165, 250, 0.10);
  color: var(--muted);
}

.admin-form label.admin-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-form label.admin-checkbox input {
  width: auto;
}

.tenant-list,
.admin-project-list {
  display: grid;
  gap: 8px;
}

.tenant-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-strong);
  color: var(--ink);
  text-align: left;
}

button.tenant-row:hover,
.tenant-row.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tenant-row div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.tenant-row strong,
.tenant-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.admin-detail-heading > div:first-child {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.admin-detail-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .topbar,
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions,
  .search-box {
    width: 100%;
  }

  .dashboard-layout {
    display: grid;
    overflow: auto;
  }

  .admin-layout,
  .admin-form-grid,
  .account-detail-grid,
  .admin-health-grid,
  .admin-storage-grid,
  .admin-storage-row,
  .admin-user-form,
  .admin-user-row,
  .admin-user-row.pending,
  .team-invite-form,
  .team-row,
  .team-row.pending {
    grid-template-columns: 1fr;
  }

  .team-invite-form .account-popover-title,
  .team-invite-form button {
    grid-column: 1;
  }

  .layout-splitter {
    display: none;
  }

  .package-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .reference-model-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }

  .reference-model-upload-grid {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.8fr);
  }

  .reference-model-upload-grid .command-button {
    grid-column: 1 / -1;
    min-height: 34px;
  }

  .package-row-edit,
  .package-edit-grid {
    grid-template-columns: 1fr;
  }

  .package-row-edit .package-icon {
    display: none;
  }

  .package-row .state-pill,
  .row-actions {
    grid-column: 2;
  }

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

@media (max-width: 560px) {
  .dashboard-layout,
  .settings-strip {
    margin: 0;
    padding: 10px;
  }

  .dashboard-layout {
    gap: 10px;
  }

  .summary-row,
  .upload-grid,
  .session-summary,
  .settings-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-panel-header-shell.has-control .dashboard-panel-header {
    padding-right: 208px;
  }

  .dashboard-panel-header-control {
    right: 34px;
    gap: 6px;
  }

  .panel-sort-control span {
    display: none;
  }

  .panel-sort-control select {
    min-width: 76px;
  }

  .dashboard-panel-header-control .dashboard-panel-count {
    font-size: 11px;
  }

  .reference-model-intro {
    align-items: flex-start;
  }

  .reference-model-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .reference-model-controls {
    grid-column: auto;
    justify-content: flex-end;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
  }
}
:root:has(.test-environment-banner) { scroll-padding-top: 32px; }
.test-environment-banner { position: sticky; top: 0; z-index: 10000; padding: 7px 16px; background: #fff2c7; color: #634600; border-bottom: 1px solid #dfc06c; text-align: center; font: 600 12px/18px system-ui, sans-serif; }

/* One full-viewport workspace; projects and tools share this header. */
:root { color-scheme: dark; font-family: Inter, Segoe UI, system-ui, sans-serif; color: var(--ink); background: var(--bg); font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, select, summary { touch-action: manipulation; }
button { cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 9px 13px; color: inherit; }
button:disabled { cursor: default; opacity: .5; }
a { color: var(--accent); text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.workspace { height: 100dvh; width: 100%; display: flex; flex-direction: column; overflow: hidden; }
.workspace > .workspace-header { display: flex; align-items: center; gap: 12px; min-height: 68px; flex: 0 0 auto; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; padding: 0; margin-right: 12px; border: 0; background: transparent; color: var(--ink); white-space: nowrap; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand .wordmark { display: grid; text-align: left; font-size: 19px; font-weight: 800; letter-spacing: 1.5px; line-height: 1; }
.brand .wordmark small { font-size: 9px; letter-spacing: 4px; color: var(--accent); margin-top: 6px; }
#products { display: flex; align-items: center; flex: 1 1 auto; min-width: 80px; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
#products button { flex: 0 0 auto; white-space: nowrap; border-color: transparent; background: transparent; font-size: 14px; }
#products button.active { color: var(--accent); background: var(--accent-soft); border-color: #665100; }
.account { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; font-size: 12px; }
.account button, .account select { min-height: 36px; white-space: nowrap; padding: 8px 10px; }
.account select { max-width: 160px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.account > span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-menu { position: relative; flex: 0 0 auto; font-size: 12px; }
.workspace-menu[hidden] { display: none; }
.workspace-menu > summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; min-height: 36px; }
.workspace-menu > summary::-webkit-details-marker { display: none; }
.workspace-menu > summary::after { content: '⌄'; color: var(--muted); }
#context-label { display: block; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-popover { position: absolute; right: 0; top: calc(100% + 12px); width: 340px; max-width: calc(100vw - 32px); max-height: 70dvh; overflow: auto; z-index: 50; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 16px 48px #0009; }
.header-popover h2 { font-size: 14px; margin: 20px 0 12px; }
.header-popover p { line-height: 1.5; color: var(--muted); }
#services-links { width: 210px; display: grid; gap: 6px; padding: 8px; }
#services-links a { display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; border: 1px solid transparent; border-radius: 6px; }
.context-field { display: grid; gap: 5px; margin-bottom: 16px; overflow-wrap: anywhere; }
.context-field small { color: var(--muted); }
.phase-list { display: flex; gap: 5px; flex-wrap: wrap; }
.phase-list span { padding: 4px 7px; background: var(--surface-raised); border-radius: 5px; }
#activity-list { padding-left: 18px; }
#activity-list li { padding-bottom: 12px; font-size: 13px; }
#activity-list small { display: block; padding-top: 4px; color: var(--muted); }
#notice { margin: 0; padding: 0 24px; font-size: 13px; background: var(--accent-soft); }
#notice:not(:empty) { padding-top: 9px; padding-bottom: 9px; }
#main { min-height: 0; min-width: 0; flex: 1; display: flex; flex-direction: column; }
#main > iframe { border: 0; width: 100%; flex: 1; min-height: 0; background: var(--surface); }
.module-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 24px; font-size: 12px; background: var(--surface); }
.home { overflow: auto; flex: 1; padding: 32px 24px; width: 100%; }
.home-heading > span { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--accent); }
h1 { font-size: 29px; font-weight: 600; letter-spacing: -.7px; margin: 10px 0; }
.home-heading p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 28px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tool-card { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 10px; padding: 22px; min-height: 200px; border-radius: 8px; }
.tool-card strong { font-size: 19px; color: var(--ink); }
.tool-card > span:not(.tool-icon) { font-size: 13px; color: var(--muted); }
.tool-card small { margin-top: auto; padding-top: 10px; color: var(--accent); }
.tool-icon { width: 36px; height: 36px; display: grid; place-content: center; background: var(--accent-soft); color: var(--accent); border: 1px solid #665100; border-radius: 6px; font-weight: 650; }
.empty { line-height: 1.7; background: var(--surface); padding: 24px; border-radius: 8px; }
/* Use explicit selectors so legacy project button rules cannot suppress feedback. */
.workspace button:not(:disabled):hover, #products button:not(:disabled):hover, .workspace-menu > summary:hover, #services-links a:hover { color: var(--accent-strong); border-color: var(--accent); background: var(--accent-soft); }
.workspace button.primary:not(:disabled):hover, #read-model:not(:disabled):hover { color: var(--accent-ink); background: var(--accent-hover); border-color: var(--accent-hover); }
.workspace-menu[open] > summary { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
#read-model:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 750; }
.access-page{max-width:440px;margin:10vh auto;padding:30px;background:#101827;border:1px solid #334155;border-radius:14px}.access-page button{margin:5px}.access-page p{line-height:1.6;color:#9aa8ba}.loading{padding:30px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.auth-form,.auth-field{display:flex;flex-direction:column;gap:10px}.auth-field input{padding:11px;border:1px solid #334155;border-radius:7px}.auth-submit{background:#e5edf7;color:white;margin-top:12px}.auth-error{color:#fecaca;padding:12px 0}.auth-security,.auth-kicker{font-size:12px;color:#9aa8ba}.auth-security{margin-top:18px}.auth-heading h2{font-size:24px}.auth-heading p{font-size:14px}.online-login{max-width:400px}.auth-actions{display:flex;gap:8px;flex-wrap:wrap}
.online-dialog{color:#e5edf7;border:1px solid #334155;border-radius:14px;padding:24px;max-width:440px;width:calc(100% - 32px);box-shadow:0 20px 80px #00000077}.online-dialog::backdrop{background:#00000088}.online-dialog h2{font-size:20px;margin-top:0}.online-dialog p{font-size:14px;line-height:1.6}.online-dialog>div{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}


.online-dialog { background: var(--surface); }
.auth-submit { background: var(--accent); color: var(--accent-ink); }
.online-auth-page { flex: none; }
@media (max-width: 1100px) {
  .workspace > .workspace-header { flex-wrap: wrap; gap: 8px; padding: 12px 16px; }
  #products { order: 5; flex-basis: 100%; }
  .brand { margin-right: auto; }
  #context-label { max-width: 140px; }
}
@media (max-width: 640px) {
  .workspace > .workspace-header { gap: 8px; padding: 10px 12px; }
  .brand img { width: 28px; height: 28px; }
  .brand .wordmark { font-size: 16px; }
  .brand .wordmark small { font-size: 8px; }
  .account { flex-basis: 100%; justify-content: flex-end; gap: 6px; }
  .account > span { margin-right: auto; max-width: 120px; }
  .account select { margin-right: auto; max-width: 135px; }
  .account button { font-size: 12px; }
  #context-label { max-width: 105px; }
  #products button { font-size: 13px; padding: 8px 10px; }
  .header-popover { position: fixed; left: 12px; right: 12px; top: 62px; width: auto; max-width: none; }
  #services-links { left: auto; width: 210px; }
  .home { padding: 24px 16px; }
  .home h1 { font-size: 25px; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tool-card { padding: 16px; min-height: 185px; }
  .tool-card strong { font-size: 16px; }
  .module-bar { padding: 8px 12px; }
  .access-page { margin: 24px 12px; }
}
.test-environment-banner button[data-release-control]{margin-left:20px;padding:6px 14px;border:1px solid #986f13;border-radius:6px;background:#fffaf0;color:#473305;font:inherit;font-weight:600;cursor:pointer}
.qloods-release-dialog{width:min(640px,calc(100vw - 32px));padding:26px;border:1px solid #d6e1ef;border-radius:16px;color:#213e68;background:white;box-shadow:0 20px 70px #17294144}
.qloods-release-dialog::backdrop{background:#12223988}
.qloods-release-dialog header,.qloods-release-dialog footer{display:flex;justify-content:space-between;align-items:center;gap:16px}
.qloods-release-dialog header{font-size:13px;color:#637c9b}.qloods-release-dialog h2{font-size:24px;margin:18px 0 12px}
.qloods-release-dialog p{line-height:1.55}.qloods-release-dialog label{display:flex;gap:12px;align-items:flex-start;padding:13px 0;line-height:1.5}
.qloods-release-dialog input{width:18px;height:18px;margin-top:3px;accent-color:#008a00;flex:none}
.release-versions{padding:8px 16px;border-radius:8px;background:#edf3fa;font-family:monospace}.release-scope{font-size:14px;color:#59718e}
.qloods-release-dialog button{padding:9px 15px;border:1px solid #d6e1ef;border-radius:7px;background:#fff;color:#213e68;cursor:pointer}
.qloods-release-dialog .release-submit{background:#008a00;border-color:#008a00;color:white}.qloods-release-dialog button:disabled{opacity:.5;cursor:not-allowed}
.qloods-release-dialog footer{margin-top:20px}.qloods-release-dialog .release-status{padding:12px;background:#fff5d5;border-radius:7px;font-size:14px}

/* Projecten occupies the remaining workspace, with its own content toolbar. */
#app { height: 100dvh; min-height: 0; }
.projects-module { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.projects-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.projects-heading { display: flex; align-items: baseline; gap: 12px; white-space: nowrap; }
.projects-heading h1 { font-size: 20px; margin: 0; letter-spacing: -.3px; }
.projects-heading > span { font-size: 12px; color: var(--muted); }
.projects-toolbar .topbar-actions { flex-wrap: wrap; }
.projects-module .dashboard-layout { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr) 6px minmax(360px, var(--detail-width, 520px)); }
.projects-module .dashboard-layout.detail-collapsed { grid-template-columns: minmax(0, 1fr) 6px 38px; }
.projects-module .layout-splitter { width: 6px; }
.projects-module .projects-region { padding: 24px; overflow: auto; border: 0; background: var(--bg); }
.projects-module .detail-region { position: relative; top: auto; right: auto; width: auto; max-width: none; max-height: none; box-shadow: none; border: 0; border-radius: 0; padding: 20px 24px 24px; z-index: auto; background: var(--surface); }
.projects-module .detail-collapse-button { align-self: flex-end; width: 32px; justify-content: center; }
.projects-module .detail-region.collapsed { padding: 0; }
.projects-module .detail-region.collapsed .detail-collapse-button { width: 100%; }
.projects-module .auth-layout { height: auto; }
.projects-module .search-box { min-width: 170px; }
.projects-module .detail-header { flex-wrap: wrap; }
.projects-module .detail-header > div { min-width: 0; max-width: 100%; }
.projects-module .detail-header p { line-height: 1.5; margin-top: 6px; }
.projects-module .detail-actions { flex-wrap: wrap; max-width: 100%; }
.projects-module .detail-actions button { white-space: normal; }
.projects-module .detail-content { min-width: 0; }
.projects-empty { grid-column: 1 / -1; max-width: 460px; padding: 24px 0; color: var(--muted); }
.projects-empty h2 { font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.projects-empty p { line-height: 1.6; margin: 0; }
body.tekla-panel .projects-module .dashboard-layout { display: flex; height: auto; flex-direction: column; overflow: auto; }
body.tekla-panel .projects-module .detail-region { overflow: visible; }
body.tekla-panel .projects-module .projects-region { flex-shrink: 0; }
body.tekla-panel .projects-module .layout-splitter { display: none; }
@media (max-width: 980px) {
  .projects-toolbar { flex-wrap: wrap; gap: 12px; padding: 16px; }
  .projects-toolbar .topbar-actions { flex: 1; }
  .projects-module .dashboard-layout { display: flex; flex-direction: column; overflow: auto; padding: 0; gap: 0; }
  .projects-module .projects-region { overflow: visible; flex: none; padding: 16px; }
  .projects-module .detail-region { flex: none; overflow: visible; min-height: 250px; padding: 16px; border-top: 1px solid var(--line); }
  .projects-module .layout-splitter, .projects-module .detail-collapse-button { display: none; }
  .projects-module .detail-region.collapsed .detail-content { display: grid; }
  .projects-module .detail-region.collapsed { padding: 16px; }
  .projects-toolbar .search-box { width: 100%; }
}
.installation-entry { max-width: 480px; margin: 24px auto; padding: 24px; background: #111b2a; border: 1px solid #344156; border-radius: 12px; color: #f0f3f8; }
.installation-entry h2 { margin: 0 0 8px; font-size: 20px; }
.installation-entry p { line-height: 1.5; }
.installation-entry form { display: grid; gap: 10px; }
.installation-entry input { padding: 10px; border: 1px solid #64748b; border-radius: 6px; background: #0d1522; color: white; }
.installation-entry button { padding: 10px; }

.project-tools { display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; }

/* Customer identity is configuration; layout and functionality remain shared. */
:root[data-brand="qloods"], :root[data-brand="qloods"] .online-auth-page, :root[data-brand="qloods"] .online-auth-page .auth-card {
  color-scheme:light; --bg:#f7f9fc; --surface:#fff; --surface-strong:#fff; --surface-raised:#edf2f9;
  --ink:#203763; --muted:#5d6d83; --quiet:#5d6d83; --line:#d8e0eb; --line-soft:#edf2f9;
  --accent:#078400; --accent-hover:#067500; --accent-ink:#fff; --accent-strong:#055e00; --accent-soft:#eaf7e9;
  color:var(--ink); background:var(--bg);
}
[data-brand="qloods"] .brand img.customer-logo, [data-brand="qloods"] .online-brand img.customer-logo { width:170px; height:46px; max-width:100%; object-fit:contain; }
[data-brand="qloods"] #products button.active { border-color:var(--accent); }
[data-brand="qloods"] .online-auth-page { background:var(--bg); }
:root[data-brand="qloods"] .online-auth-page .auth-card { background:var(--surface); color:var(--ink); border:1px solid var(--line); box-shadow:0 12px 40px #26384312; }
[data-brand="qloods"] .online-auth-page .auth-form input { background:var(--surface); color:var(--ink); }
[data-brand="qloods"] .online-auth-page .auth-submit { background:var(--accent); color:var(--accent-ink); }
[data-brand="qloods"] .online-auth-page .online-brand { border-color:var(--line); }
[data-brand="qloods"] .account select, [data-brand="qloods"] .detail-collapse-button { background:var(--surface); color:var(--ink); }
[data-brand="qloods"] .project-image.empty { background:var(--surface-raised); }
[data-brand="qloods"] .state-pill, [data-brand="qloods"] .eyebrow { background:var(--accent-soft); color:var(--accent-strong); }
[data-brand="qloods"] .empty-state, [data-brand="qloods"] .online-dialog, [data-brand="qloods"] .installation-entry { background:var(--surface); color:var(--ink); border-color:var(--line); }
[data-brand="qloods"] .form-error { background:#fff0f2; color:#a31939; }
.project-delete-action { margin-right:auto; }
[data-brand="qloods"] .command-button.project-delete-action,
[data-brand="qloods"] .confirm-dialog .command-button.danger-solid { background:#fff0f0; border-color:#efbaba; color:#a12626; }
[data-brand="qloods"] .command-button.project-delete-action:not(:disabled):hover,
[data-brand="qloods"] .confirm-dialog .command-button.danger-solid:not(:disabled):hover { background:#ffe1e1; border-color:#d88a8a; color:#861b1b; }
[data-brand="qloods"] .modal-backdrop:has(.confirm-dialog) { background:#20376355; backdrop-filter:blur(3px); }
[data-brand="qloods"] .confirm-dialog { width:min(480px,100%); padding:26px; gap:24px; border:1px solid var(--line); border-radius:16px; background:var(--surface); color:var(--ink); box-shadow:0 20px 64px #20376326; }
[data-brand="qloods"] .confirm-dialog .confirm-header { grid-template-columns:42px minmax(0,1fr); gap:16px; }
[data-brand="qloods"] .confirm-dialog .confirm-mark { width:42px; height:42px; border:1px solid #efbaba; border-radius:12px; background:#fff0f0; color:#a12626; font-size:20px; }
[data-brand="qloods"] .confirm-dialog h2 { font-size:20px; line-height:1.3; margin:0 0 10px; }
[data-brand="qloods"] .confirm-dialog p { margin:0; line-height:1.6; }
[data-brand="qloods"] .confirm-dialog .confirm-actions { padding-top:18px; border-top:1px solid var(--line); gap:10px; flex-wrap:wrap; }
[data-brand="qloods"] .confirm-dialog .command-button { min-height:38px; padding:8px 16px; }
[data-brand="qloods"] .confirm-dialog .danger-solid { border-radius:20px 5px; }
@media(max-width:480px) { [data-brand="qloods"] .confirm-dialog { padding:20px; } .project-delete-action { margin-right:0; } #project-edit-form .form-actions { gap:10px; } }
[data-brand="qloods"] .form-success, [data-brand="qloods"] .form-info { background:var(--surface-raised); color:var(--ink); }
[data-brand="qloods"] .command-button, [data-brand="qloods"] .icon-button, [data-brand="qloods"] .auth-field { color:var(--ink); }
[data-brand="qloods"] .account-avatar, [data-brand="qloods"] .inline-editor, [data-brand="qloods"] .upload-progress, [data-brand="qloods"] .upload-progress-track { color:var(--ink); background:var(--surface-raised); }
[data-brand="qloods"] .upload-grid input[type="file"]::file-selector-button { background:var(--surface); color:var(--ink); border-color:var(--line); }
[data-brand="qloods"] .auth-error { background:#fff0f2; color:#a31939; }
[data-brand="qloods"] .workspace button.primary, [data-brand="qloods"] .auth-submit { background:linear-gradient(135deg,#078400,#067500); color:#fff; border-radius:25px 5px; }
[data-brand="qloods"] .workspace button.primary:not(:disabled):hover, [data-brand="qloods"] .auth-submit:hover { background:linear-gradient(135deg,#067500,#055e00); color:#fff; }
[data-brand="qloods"] .eyebrow { color:#cb0465; background:transparent; }
#project-team[aria-busy="true"] { cursor:progress; }
@media(max-width:640px) { [data-brand="qloods"] .brand img.customer-logo { width:125px; height:34px; } }

@font-face { font-family:QLoodsLato; font-style:normal; font-weight:400; font-display:swap; src:url(/src/assets/qloods-lato-400.woff2) format("woff2"); }
@font-face { font-family:QLoodsLato; font-style:normal; font-weight:700; font-display:swap; src:url(/src/assets/qloods-lato-700.woff2) format("woff2"); }
@font-face { font-family:QLoodsLato; font-style:normal; font-weight:900; font-display:swap; src:url(/src/assets/qloods-lato-900.woff2) format("woff2"); }
[data-brand="qloods"] body, :root[data-brand="qloods"], [data-brand="qloods"] .online-auth-page { font-family:QLoodsLato,Arial,Helvetica,sans-serif; }

[data-brand="qloods"] .layout-splitter { background:var(--line-soft); }
:root[data-brand="qloods"] .online-auth-page .auth-form .auth-submit { background:linear-gradient(135deg,#078400,#067500); color:#fff; border-color:var(--accent); border-radius:25px 5px; box-shadow:0 8px 20px #07840018; }
:root[data-brand="qloods"] .online-auth-page .auth-form .auth-submit:hover { background:#055e00; }
:root[data-brand="qloods"] .online-auth-page .auth-field { color:var(--ink); }
:root[data-brand="qloods"] .online-auth-page .auth-field input:focus { box-shadow:0 0 0 3px #07840018; }
:root[data-brand="qloods"] .online-auth-page .auth-kicker { color:#cb0465; }
:root[data-brand="qloods"] .online-auth-page .auth-error { color:#a31939; background:#fff0f2; }

/* One board, one project page. The board never reserves space for a detail pane. */
#main { position:relative; }
#main > .workspace-loading { position:absolute; inset:0; min-height:0; z-index:5; }
.loading-card img { display:block; width:180px; height:54px; object-fit:contain; margin:0 auto 24px; }
.loading-symbol { display:block; width:42px; height:42px; border:3px solid #e2e8f0; border-top-color:#078400; border-radius:50%; margin:0 auto 24px; animation:workspace-spin 1.1s linear infinite; }
.loading-track { display:block; height:3px; background:linear-gradient(90deg,#07840020,#078400,#07840020); border-radius:10px; margin-top:25px; }
#startup-loading { position:fixed; inset:0; z-index:10000; }
.loading-steps { list-style:none; padding:0; margin:24px 0 0; text-align:left; }
.loading-steps li { display:flex; align-items:center; gap:10px; padding:10px 0; color:#64748b; font-size:14px; }
.loading-steps li::before { content:''; width:9px; height:9px; flex:none; border:1px solid #94a3b8; border-radius:50%; }
.loading-steps li[data-state="done"]::before { background:#078400; border-color:#078400; }
.loading-steps li[data-state="active"] { color:#203763; font-weight:600; }
.loading-steps li[data-state="active"]::before { border:3px solid #078400; width:5px; height:5px; }
.loading-steps small { margin-left:auto; font-size:11px; font-weight:400; }
@keyframes workspace-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .loading-symbol { animation:none; } }
#projects-content.projects-module { overflow:auto; display:block; height:100%; }
.projects-module.board-mode { background:var(--bg); }
.projects-module > .projects-region { overflow:visible; padding:28px 32px; border:0; }
.projects-module .project-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(265px,330px)); gap:24px; align-content:start; }
.projects-module .project-tile { position:relative; display:flex; flex-direction:column; gap:15px; padding:0 0 20px; background:var(--surface); border:1px solid var(--line); border-radius:14px; overflow:hidden; text-align:left; box-shadow:0 3px 12px #00000004; transition:box-shadow .15s,border-color .15s,transform .15s; }
.projects-module .project-tile:hover { transform:translateY(-3px); border-color:var(--accent); box-shadow:0 12px 30px #0000000b; }
.projects-module .project-tile .project-status { position:absolute; left:16px; top:16px; z-index:1; background:var(--surface); color:var(--ink); border:1px solid var(--line); }
.projects-module .project-tile .project-image { height:160px; width:100%; min-height:160px; border:0; border-radius:0; margin:0; }
.projects-module .project-image.empty { display:grid; place-items:center; background:radial-gradient(ellipse at 20% 0%,var(--accent-soft),transparent 65%),linear-gradient(140deg,var(--surface-raised),var(--bg)); }
.projects-module .project-image.empty span { border:1px solid var(--line); background:var(--surface); color:var(--ink); border-radius:18px; height:60px; width:60px; display:grid; place-items:center; font-size:23px; font-weight:700; box-shadow:0 10px 30px #00000006; }
.project-tile .project-main,.project-tile .project-meta,.project-tile .project-footer { margin:0 20px; }
.project-tile .project-main strong { font-size:18px; line-height:1.35; }
.project-tile .project-main span { font-size:13px; margin-top:5px; }
.project-tile .project-meta,.project-tile .project-footer { font-size:12px; line-height:1.5; }
.project-tile .project-footer { border-top:1px solid var(--line-soft); padding-top:12px; }
.projects-empty { grid-column:1/-1; text-align:center; padding:80px 20px; }
.project-page { padding:28px 36px 48px; max-width:1600px; margin:auto; width:100%; }
.project-page h1 { font-size:32px; margin:10px 0; }
.project-page h2 { font-size:22px; margin:0 0 10px; }
.project-page p { color:var(--muted); line-height:1.7; margin:0; }
.project-page-heading { display:flex; justify-content:space-between; gap:24px; align-items:center; margin:30px 0; }
.project-kicker { font-size:12px; letter-spacing:1px; color:var(--muted); }
.project-design-intro { display:flex; justify-content:space-between; align-items:center; gap:32px; padding:32px; background:var(--surface); border:1px solid var(--line); border-radius:14px; }
.project-design-intro h2 { margin:10px 0; }
.project-design-intro p { max-width:720px; }
.project-design-intro > button { flex-shrink:0; padding:14px 23px; font-size:15px; }
.project-dossier { margin-top:38px; }
.project-dossier .section-heading { margin-bottom:18px; }
.dossier-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:18px; }
.dossier-card { display:flex; flex-direction:column; align-items:flex-start; gap:13px; text-align:left; border-radius:12px; padding:24px; background:var(--surface); min-height:225px; }
.dossier-card:hover { border-color:var(--accent); background:var(--surface-raised); }
.dossier-card strong { font-size:17px; }
.dossier-card > span:not(.dossier-icon) { color:var(--muted); font-size:13px; line-height:1.6; }
.dossier-card small { margin-top:auto; color:var(--accent); }
.dossier-icon { display:inline-grid; place-items:center; width:46px; height:46px; border:1px solid var(--line); border-radius:12px; background:var(--surface-raised); color:var(--ink); font-size:13px; font-weight:700; }
.project-next { display:flex; gap:20px; align-items:center; padding:40px 0; }
.project-next .dossier-icon { flex-shrink:0; }
.project-next h2 { font-size:17px; }
.project-legacy-detail { max-width:1050px; margin:24px auto; }
.new-project-modal { color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:16px; width:min(620px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); padding:28px; box-shadow:0 25px 90px #0003; }
.new-project-modal::backdrop { background:#0b183d66; backdrop-filter:blur(3px); }
.new-project-modal .edit-panel { padding:0; border:0; background:transparent; }
.new-project-modal .upload-grid { gap:18px; margin-top:24px; }
.new-project-modal .detail-header h2 { font-size:25px; }
.new-project-modal .detail-header p { margin-top:10px; line-height:1.6; }
.new-project-modal .form-actions { margin-top:24px; }
.project-page > .edit-panel { margin-bottom:24px; }
@media(max-width:720px) { .projects-module > .projects-region { padding:20px; }.projects-module .project-grid { grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); }.project-page { padding:20px; }.project-page-heading,.project-design-intro { flex-direction:column; align-items:flex-start; }.project-design-intro { padding:24px; }.project-page h1{font-size:26px}.dossier-cards{grid-template-columns:1fr 1fr}.dossier-card{padding:18px}.new-project-modal{padding:22px} }
@media(max-width:420px) { .dossier-cards { grid-template-columns:1fr; }.new-project-modal .upload-grid { grid-template-columns:1fr; } }

/* The overview gives the saved model priority; supporting documents stay compact. */
.project-page-heading { margin:18px 0 24px; }
.project-page h1 { font-size:28px; margin:7px 0; }
.project-design-overview { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(310px,1fr); border:1px solid var(--line); border-radius:14px; background:var(--surface); overflow:hidden; }
.project-model { min-width:0; display:flex; flex-direction:column; }
.project-model > header { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; gap:12px; border-bottom:1px solid var(--line); }
.project-model > header h2 { margin:0; font-size:18px; }
.project-preview { position:relative; min-height:400px; flex:1; background:var(--surface-raised); }
#main .project-preview iframe { position:absolute; inset:0; display:block; width:100%; height:100%; min-height:0; border:0; }
.project-preview > p { position:absolute; inset:0; display:grid; place-content:center; padding:30px; text-align:center; z-index:1; background:var(--surface); pointer-events:none; }
.project-preview > p[hidden] { display:none; }
.project-preview > p.preview-error { pointer-events:auto; }
.project-design-state { padding:28px; border-left:1px solid var(--line); }
.project-design-state h2 { margin:10px 0 4px; font-size:23px; }
.project-design-state > p { font-size:13px; }
.project-design-facts { margin:22px 0; display:grid; gap:13px; }
.project-design-facts > div { display:flex; justify-content:space-between; gap:18px; font-size:13px; }
.project-design-facts dt { color:var(--muted); }
.project-design-facts dd { margin:0; font-weight:700; text-align:right; }
.project-next-action { border-top:1px solid var(--line); padding-top:20px; }
.project-next-action h3 { margin:0 0 7px; font-size:16px; }
.project-next-action p { font-size:13px; margin-bottom:18px; }
.project-next-action .command-button { width:100%; padding:12px; font-size:15px; }
.project-drawings-link { width:100%; display:flex; align-items:center; gap:12px; text-align:left; margin-top:18px; padding:16px 0 0; border:0; border-top:1px solid var(--line); background:transparent; border-radius:0; }
.project-drawings-link strong { display:block; font-size:15px; }
.project-drawings-link small { display:block; margin-top:5px; font-size:12px; color:var(--muted); }
.project-drawings-link > span:last-child { margin-left:auto; }
.project-drawings-link:hover strong { color:var(--accent); }
.project-dossier { margin-top:28px; }
.project-dossier .section-heading h2 { font-size:19px; }
.dossier-cards { grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.dossier-card { flex-direction:row; align-items:center; min-height:112px; padding:20px; gap:14px; }
.dossier-card .dossier-icon { flex-shrink:0; }
.dossier-card-copy { display:grid; gap:7px; }
.dossier-card-copy strong { font-size:16px; color:var(--ink); }
.dossier-card-copy > span { font-size:12px; }
.dossier-card small { margin:0 0 0 auto; white-space:nowrap; }
@media(max-width:1400px) { .dossier-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:1150px) { .dossier-card { flex-wrap:wrap; }.dossier-card small{margin-left:60px}.project-design-state{padding:22px}.project-page{padding:24px}.project-design-overview{grid-template-columns:minmax(0,1.4fr) minmax(300px,1fr)} }
@media(max-width:800px) { .project-design-overview{grid-template-columns:1fr}.project-design-state{border-left:0;border-top:1px solid var(--line)}.project-preview{min-height:360px}.dossier-cards{grid-template-columns:1fr}.dossier-card{min-height:90px;flex-wrap:nowrap}.dossier-card small{margin-left:auto}.project-page-heading{gap:15px}.project-dossier .section-heading{align-items:flex-start;gap:8px;flex-direction:column}.project-design-facts{max-width:440px} }
@media(max-width:420px) { .project-page{padding:16px}.project-preview{min-height:310px}.dossier-card{padding:16px}.dossier-card small{font-size:11px}.project-design-state{padding:20px}.project-model > header{padding:14px} }

/* One compact project heading. */
.project-page { max-width:none; }
.project-page-heading { display:flex; flex-direction:row; align-items:center; flex-wrap:wrap; margin:0 0 22px; gap:20px; }
.project-identity { display:flex; align-items:baseline; flex:1; min-width:0; gap:18px; }
.project-identity h1 { font-size:23px; margin:0; overflow-wrap:anywhere; }
.project-identity p { font-size:14px; }
.project-identity .project-kicker { white-space:nowrap; }
.project-page-heading .detail-actions { flex-wrap:nowrap; margin-left:auto; }
.project-page-heading .detail-actions button { white-space:nowrap; }
.project-page.dossier-open { padding:0; margin:0; height:100%; min-height:0; overflow:hidden; }
.project-page.dossier-open > :not(.project-design-overview) { display:none; }
.dossier-open .project-design-overview { height:100%; display:block; border:0; border-radius:0; }
.dossier-open .project-design-state,.dossier-open .project-model > header { display:none; }
.dossier-open .project-model { height:100%; }
.dossier-open .project-preview { height:100%; min-height:0; }
@media(max-width:900px) { .project-page-heading{gap:14px}.project-identity{flex-basis:70%;gap:12px}.project-identity h1{font-size:21px}.project-page-heading .detail-actions{margin-left:0} }
@media(max-width:560px) { .project-identity{flex-basis:100%;flex-wrap:wrap;gap:8px 14px}.project-identity h1{font-size:21px}.project-identity p{font-size:13px} }
/* One shared project explorer, themed by the installation tokens. */
.projects-module .project-explorer { display:grid; grid-template-columns:244px minmax(0,1fr); flex:1; min-height:0; }
.project-explorer-sidebar { padding:24px 16px; background:var(--surface); border-right:1px solid var(--line); }
.project-explorer-sidebar h2 { margin:0 10px 20px; font-size:15px; }
.project-explorer-sidebar .dashboard-panel { margin-top:16px; border-radius:9px; }
.project-explorer-sidebar .dashboard-panel-header { min-height:44px; background:var(--surface-raised); padding-left:12px; padding-right:40px; }
.project-explorer-sidebar .dashboard-panel-header:hover,.project-explorer-sidebar .dashboard-panel-header:focus-visible { background:var(--accent-soft); }
.project-explorer-sidebar .dashboard-panel-title { text-transform:none; font-size:12px; font-weight:600; }
.project-explorer-sidebar .dashboard-panel-content { padding:8px 4px; }
.project-explorer-sidebar .dashboard-panel-chevron { width:20px; height:20px; border:1px solid var(--line); border-radius:5px; background:var(--surface); color:var(--ink); }
.project-explorer-sidebar .dashboard-panel-chevron svg { display:none; }
.project-explorer-sidebar .dashboard-panel-chevron::after { content:'+'; font-size:16px; line-height:1; }
.project-explorer-sidebar .dashboard-panel.open .dashboard-panel-chevron::after { content:'\2212'; }
.explorer-node { display:flex; align-items:center; justify-content:space-between; width:100%; border:1px solid transparent; background:transparent; border-radius:7px; padding:10px 10px 10px calc(10px + var(--depth,0)*12px); text-align:left; font-size:13px; gap:8px; }
.explorer-node small,.explorer-alphabet small { color:var(--muted); font-size:11px; }
.explorer-node:hover,.explorer-alphabet button:not(:disabled):hover { background:var(--surface-raised); }
.explorer-node.active,.explorer-alphabet button.active { border-color:var(--accent); background:var(--accent-soft); color:var(--accent); }
.explorer-alphabet { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; padding:8px 4px; }
.explorer-alphabet button { display:flex; flex-direction:column; gap:3px; align-items:center; padding:7px 2px; border:1px solid transparent; border-radius:7px; background:transparent; }
.explorer-alphabet button:disabled { opacity:.4; }
.explorer-hint { color:var(--muted); font-size:11px; line-height:1.7; padding:8px 10px; }
.projects-module .project-explorer .projects-region { display:block; padding:22px 26px; min-width:0; overflow:visible; }
.explorer-controls { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-bottom:24px; }
.explorer-selection { display:flex; align-items:center; gap:12px; font-size:14px; }
.explorer-options { display:flex; align-items:center; flex-wrap:wrap; gap:16px; }
.explorer-options label { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:12px; }
.explorer-options select { border:1px solid var(--line); border-radius:6px; padding:8px; background:var(--surface); color:var(--ink); }
.explorer-views { display:flex; padding:3px; background:var(--surface); border:1px solid var(--line); border-radius:8px; }
.explorer-views button { display:flex; align-items:center; gap:6px; border:1px solid transparent; background:transparent; border-radius:5px; padding:7px 9px; font-size:12px; }
.explorer-views button[aria-pressed=true] { color:var(--accent); background:var(--accent-soft); border-color:var(--accent); }
.explorer-views button:hover { background:var(--surface-raised); }
.explorer-views button span:first-child { font-size:18px; }
.explorer-mobile-toggle { display:none; }
.explorer-results[aria-busy=true] { opacity:.5; pointer-events:none; }
.explorer-error { padding:15px; border:1px solid var(--line); border-radius:8px; margin-bottom:16px; }
.explorer-error + .explorer-results { display:none; }
.explorer-pagination { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:26px; padding-top:18px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
.explorer-pagination > div { display:flex; gap:8px; }
.projects-module .project-grid.compact { grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:14px; }
.projects-module .compact .project-tile { display:grid; grid-template-columns:56px minmax(0,1fr); grid-template-rows:56px auto auto auto; min-height:0; align-content:start; gap:10px; padding:16px; border-radius:10px; }
.projects-module .compact .project-tile .project-image { grid-row:1; grid-column:1; width:56px; height:56px; min-height:56px; border-radius:8px; }
.projects-module .compact .project-image.empty span { width:40px; height:40px; font-size:16px; border-radius:9px; }
.projects-module .compact .project-tile .project-status { position:static; grid-row:2; grid-column:1/-1; justify-self:start; align-self:start; }
.projects-module .compact .project-tile .project-main { grid-row:1; grid-column:2; margin:0; align-self:center; min-width:0; }
.projects-module .compact .project-main strong { font-size:15px; overflow-wrap:anywhere; }
.projects-module .compact .project-main span { font-size:11px; }
.projects-module .compact .project-meta,.projects-module .compact .project-footer { grid-column:1/-1; margin:0; font-size:11px; }
.project-table-scroll { overflow-x:auto; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.project-table { width:100%; border-collapse:collapse; text-align:left; font-size:13px; }
.project-table th { padding:14px 16px; background:var(--surface-raised); color:var(--muted); font-weight:500; white-space:nowrap; }
.project-table td { padding:12px 16px; border-top:1px solid var(--line); }
.project-table td:first-child { min-width:180px; }
.project-table td:last-child { white-space:nowrap; }
.project-table button { border:0; background:transparent; text-align:left; padding:4px 0; font-weight:600; color:var(--ink); }
.project-table tr:hover td { background:var(--surface-raised); }
.project-table button:hover { text-decoration:underline; color:var(--accent); }
.table-status { white-space:nowrap; font-size:11px; border:1px solid var(--line); border-radius:12px; padding:3px 8px; }
@media(max-width:1100px) { .projects-module .project-explorer{grid-template-columns:210px minmax(0,1fr)}.explorer-views button span:last-child{display:none}.projects-module .project-explorer .projects-region{padding:18px} }
@media(max-width:700px) { .projects-module .project-explorer{display:block}.project-explorer-sidebar{display:none;border-right:0;border-bottom:1px solid var(--line)}.project-explorer-sidebar.mobile-open{display:block}.explorer-mobile-toggle{display:inline-flex}.explorer-alphabet{grid-template-columns:repeat(7,minmax(0,1fr))}.explorer-options{width:100%;justify-content:space-between;gap:8px}.projects-module .project-explorer .project-grid{grid-template-columns:repeat(auto-fill,minmax(min(240px,100%),1fr))}.explorer-pagination{flex-wrap:wrap}.explorer-controls{gap:12px}.project-table{font-size:12px}.project-table td,.project-table th{padding:10px} }

.projects-module.board-mode { overflow:hidden; }
.projects-module.board-mode > .projects-toolbar { flex-shrink:0; }
.project-explorer-sidebar { min-height:0; overflow:auto; }
.projects-module .project-explorer .projects-region { display:flex; flex-direction:column; overflow:hidden; min-height:0; }
.explorer-controls,.explorer-pagination { flex-shrink:0; }
.explorer-results { flex:1; min-height:0; overflow:auto; padding:3px; }
.project-table th { position:sticky; top:0; z-index:1; }
.project-table-scroll { overflow:visible; }
@media(max-width:700px) { .projects-module .project-explorer{display:flex;flex-direction:column;overflow:hidden}.project-explorer-sidebar.mobile-open{max-height:45%;flex-shrink:0}.projects-module .project-explorer .projects-region{flex:1}.project-table-scroll{overflow-x:auto;min-height:0}.explorer-controls{margin-bottom:14px}.explorer-pagination{margin-top:14px;padding-top:12px} }
#projects-content.projects-module.board-mode { display:flex; overflow:hidden; }
.projects-module .project-image.empty { padding:0; }

.company-workspace{max-width:1400px;margin:0 auto;padding:28px;color:#203763}.company-workspace>header{display:flex;justify-content:space-between;align-items:center;gap:20px}.company-workspace h1{font-size:26px;margin:8px 0}.company-workspace h2{font-size:22px;margin:0 0 15px}.company-workspace p{line-height:1.65}.company-workspace nav,.company-actions{display:flex;gap:8px;flex-wrap:wrap}.company-workspace nav{margin:20px 0}.company-workspace button,.company-workspace .command-button{border:1px solid #cfdbe8;background:white;color:#203763;padding:10px 14px;border-radius:7px;cursor:pointer}.company-workspace button.primary,.company-workspace nav button[aria-current=page]{background:#087f08;color:white}.company-workspace button:disabled{opacity:.5;cursor:default}.company-workspace article{background:white;border:1px solid #dce5ee;border-radius:12px;padding:24px}.company-workspace fieldset{border:1px solid #dce5ee;border-radius:8px;margin:16px 0;padding:18px}.company-workspace label{display:flex;flex-direction:column;gap:6px;font-size:13px;margin-bottom:10px}.company-workspace input,.company-workspace select{min-width:0;max-width:100%;border:1px solid #bac9d9;border-radius:6px;padding:9px;color:#203763;background:white}.company-workspace input[type=checkbox]{align-self:flex-start}.company-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px}.company-workspace svg{width:100%;max-width:440px;height:220px;background:#f5f8fa;border-radius:8px}.company-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:30px;padding-left:25px}.company-workspace [data-status]{padding:12px;background:#eef4f8;border-radius:6px;overflow-wrap:anywhere}.company-workspace details{margin:12px 0}.company-workspace small{display:block;overflow-wrap:anywhere}@media(max-width:750px){.company-workspace{padding:12px}.company-workspace>header{display:block}.company-steps{display:block}.company-workspace article{padding:14px}.company-fields{grid-template-columns:1fr}}
.company-workspace{width:100%;min-height:0;overflow:auto;flex:1;background:#f6f8fb;color-scheme:light;overflow-wrap:anywhere}
