/* Final UI overrides.  This file is loaded last so the responsive table
   layout is not overwritten by the theme sheets. */
#panel-completed .table-scroll,
#panel-queued .table-scroll,
#panel-processing .table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}

/* Keep the desktop order table inside the card.  Previously the natural
   width of the timestamp/project columns pushed the operation column beyond
   the scroll viewport, leaving only the first action visible. */
#panel-completed table,
#panel-queued table,
#panel-processing table {
  width: 100%;
  table-layout: fixed;
}
#panel-completed th,
#panel-completed td,
#panel-queued th,
#panel-queued td,
#panel-processing th,
#panel-processing td {
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}
#panel-completed th:nth-child(1), #panel-completed td:nth-child(1),
#panel-queued th:nth-child(1), #panel-queued td:nth-child(1),
#panel-processing th:nth-child(1), #panel-processing td:nth-child(1) { width: 12%; }
#panel-completed th:nth-child(2), #panel-completed td:nth-child(2),
#panel-queued th:nth-child(2), #panel-queued td:nth-child(2),
#panel-processing th:nth-child(2), #panel-processing td:nth-child(2) { width: 17%; }
#panel-completed th:nth-child(3), #panel-completed td:nth-child(3),
#panel-queued th:nth-child(3), #panel-queued td:nth-child(3),
#panel-processing th:nth-child(3), #panel-processing td:nth-child(3) { width: 14%; }
#panel-completed th:nth-child(4), #panel-completed td:nth-child(4),
#panel-queued th:nth-child(4), #panel-queued td:nth-child(4),
#panel-processing th:nth-child(4), #panel-processing td:nth-child(4) { width: 7%; }
#panel-completed th:nth-child(5), #panel-completed td:nth-child(5),
#panel-queued th:nth-child(5), #panel-queued td:nth-child(5),
#panel-processing th:nth-child(5), #panel-processing td:nth-child(5) { width: 7%; }
#panel-completed th:nth-child(6), #panel-completed td:nth-child(6),
#panel-queued th:nth-child(6), #panel-queued td:nth-child(6),
#panel-processing th:nth-child(6), #panel-processing td:nth-child(6) { width: 14%; white-space: nowrap; }
#panel-completed th:nth-child(7), #panel-completed td:nth-child(7),
#panel-queued th:nth-child(7), #panel-queued td:nth-child(7),
#panel-processing th:nth-child(7), #panel-processing td:nth-child(7) { width: 15%; }
#panel-completed th:nth-child(8), #panel-completed td:nth-child(8),
#panel-queued th:nth-child(8), #panel-queued td:nth-child(8),
#panel-processing th:nth-child(8), #panel-processing td:nth-child(8) { width: 14%; min-width: 0; }

/* Keep the task id and owner as a compact two-line block instead of breaking
   the final characters of an email into a stray third line. */
#panel-completed td:first-child,
#panel-queued td:first-child,
#panel-processing td:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#panel-completed td:first-child small,
#panel-queued td:first-child small,
#panel-processing td:first-child small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#panel-completed th:last-child,
#panel-completed td:last-child,
#panel-queued th:last-child,
#panel-queued td:last-child,
#panel-processing th:last-child,
#panel-processing td:last-child {
  min-width: 190px;
}

/* Drivers page: match the upstream resource-card grid and keep unavailable
   catalog entries visible without exposing broken download links. */
.drivers-workspace {
  width: min(1180px, calc(100% - 32px));
  max-width: 1180px;
  padding-top: 34px;
}
.drivers-intro { margin: 4px 0 26px; }
.drivers-intro h1 { margin: 0; color: #f1f5f9; font-size: 28px; letter-spacing: -.02em; }
.drivers-intro > p:last-child { margin: 8px 0 0; color: #94a3b8; font-size: 13px; }
.resource-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.resource-section-header h2 { margin: 0; color: #e8edf6; font-size: 17px; font-weight: 680; }
.resource-section-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.resource-size-refresh-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 12px;
  border: 1px solid rgba(96,165,250,.28); border-radius: 10px; background: rgba(59,130,246,.09);
  color: #bfdbfe; font-size: 12px; font-weight: 680;
}
.resource-size-refresh-btn:hover { border-color: rgba(96,165,250,.5); background: rgba(59,130,246,.18); color: #fff; }
.resource-size-refresh-btn .ui-icon { width: 14px; height: 14px; }
.search-wrapper { position: relative; display: flex; align-items: center; min-width: min(280px, 42vw); }
.search-icon { position: absolute; left: 12px; width: 15px; height: 15px; color: #7f8da3; pointer-events: none; }
.glass-search-input {
  width: 100%; min-height: 38px; padding: 9px 12px 9px 36px; border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px; outline: 0; background: rgba(15,23,42,.62); color: #e8edf6; font-size: 12px;
}
.glass-search-input::placeholder { color: #71809a; }
.glass-search-input:focus { border-color: rgba(96,165,250,.65); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.resource-search-count { margin: -2px 0 13px; color: #8fa0b8; font-size: 12px; }
.resource-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); align-items: stretch; gap: 14px; margin: 0; padding: 0; list-style: none; }
.resource-card-item { min-width: 0; display: flex; }
.resource-card {
  --resource-accent-rgb: 59,130,246; isolation: isolate; position: relative; display: flex; flex: 1; flex-direction: column;
  min-width: 0; min-height: 188px; padding: 15px; overflow: hidden; border: 1px solid rgba(255,255,255,.09); border-radius: 16px;
  color: #e8edf6; background: radial-gradient(circle at 8% 0%, rgba(var(--resource-accent-rgb), .1), transparent 42%), linear-gradient(145deg, rgba(15,23,42,.76), rgba(9,15,28,.7));
  box-shadow: inset 0 1px rgba(255,255,255,.05), 0 12px 28px rgba(2,6,23,.2); transition: border-color .2s, box-shadow .2s, transform .2s;
}
.resource-card--driver { min-height: 140px; }
.resource-card:hover { border-color: rgba(var(--resource-accent-rgb), .34); box-shadow: inset 0 1px rgba(255,255,255,.08), 0 16px 36px rgba(2,6,23,.3), 0 0 0 1px rgba(var(--resource-accent-rgb), .04); transform: translateY(-1px); }
.resource-card-topline, .resource-card-kind, .resource-card-footer, .resource-card-download { display: flex; align-items: center; }
.resource-card-topline { justify-content: space-between; gap: 10px; min-width: 0; margin-bottom: 12px; }
.resource-card-kind { gap: 8px; min-width: 0; }
.resource-card-icon { display: inline-flex; flex: 0 0 27px; align-items: center; justify-content: center; width: 27px; height: 27px; border: 1px solid rgba(var(--resource-accent-rgb), .2); border-radius: 8px; background: rgba(var(--resource-accent-rgb), .11); color: #93c5fd; }
.resource-card-icon .ui-icon { width: 12px; height: 12px; }
.resource-card-eyebrow { overflow: hidden; color: #94a3b8; font-size: 10px; font-weight: 700; letter-spacing: .065em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.resource-card-size { flex: none; padding: 4px 7px; border: 1px solid rgba(255,255,255,.08); border-radius: 999px; background: rgba(255,255,255,.035); color: #b7c2d3; font-size: 10px; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
.resource-card-title { display: -webkit-box; min-width: 0; margin: 0; overflow: hidden; color: #f1f5f9; font-size: 16px; font-weight: 720; letter-spacing: -.015em; line-height: 1.28; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.resource-card-description { display: -webkit-box; min-width: 0; margin: 8px 0 0; overflow: hidden; color: #b7c2d3; font-family: Consolas, monospace; font-size: 11px; line-height: 1.42; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.resource-card-footer { justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.resource-card-format { padding: 4px 7px; border-radius: 6px; background: rgba(255,255,255,.035); color: #7f8da3; font-size: 10px; font-weight: 750; letter-spacing: .06em; }
.resource-card-download { justify-content: center; gap: 8px; min-width: 112px; min-height: 40px; padding: 8px 12px; border: 1px solid rgba(var(--resource-accent-rgb), .28); border-radius: 10px; background: linear-gradient(135deg, rgba(var(--resource-accent-rgb), .14), rgba(var(--resource-accent-rgb), .08)); color: #bfdbfe; font-size: 12px; font-weight: 680; }
.resource-card-download:hover:not(:disabled) { border-color: rgba(var(--resource-accent-rgb), .52); background: rgba(var(--resource-accent-rgb), .23); color: #fff; }
.resource-card-download .ui-icon { width: 13px; height: 13px; }
.resource-card-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; min-width: 0; }
.resource-card-delete { display: inline-flex; align-items: center; justify-content: center; width: 36px; min-width: 36px; height: 40px; padding: 8px; border: 1px solid rgba(148,163,184,.2); border-radius: 10px; background: transparent; color: #c8d6e9; cursor: pointer; }
.resource-card-delete:hover { border-color: rgba(148,163,255,.62); background: rgba(52,104,182,.16); color: #fff; }
.resource-card-delete .ui-icon { width: 14px; height: 14px; }
.resource-card-download.is-unavailable, .resource-card-download:disabled { cursor: not-allowed; border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.035); color: #71809a; opacity: .8; }
.resource-state { grid-column: 1 / -1; display: grid; place-items: center; gap: 8px; min-height: 180px; padding: 34px 16px; border: 1px dashed rgba(255,255,255,.13); border-radius: 14px; background: rgba(15,23,42,.35); color: #9eabc0; text-align: center; }
.resource-state strong { color: #e2e8f0; font-size: 15px; }
.resource-state p { margin: 0; color: #8fa0b8; font-size: 12px; }
.error-state strong { color: #ffabb6; }
.driver-admin-tools { margin-top: 25px; border-top: 1px solid rgba(255,255,255,.08); }
.driver-admin-tools > summary { display: inline-flex; align-items: center; gap: 8px; padding: 15px 2px; color: #94a3b8; cursor: pointer; font-size: 12px; font-weight: 680; list-style: none; }
.driver-admin-tools > summary::-webkit-details-marker { display: none; }
.driver-admin-tools > summary:hover { color: #f8fafc; }
.driver-admin-tools > summary .ui-icon { width: 15px; height: 15px; }
.driver-upload-form { display: grid; grid-template-columns: 1fr auto; gap: 11px; align-items: stretch; padding-bottom: 15px; }
.driver-file-picker { display: flex; align-items: center; gap: 13px; min-width: 0; min-height: 60px; padding: 12px 14px; border: 1px dashed #36537f; border-radius: 11px; background: rgba(9,17,31,.72); cursor: pointer; }
.driver-file-picker > input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.driver-file-picker > .ui-icon { width: 23px; height: 23px; color: #7caeff; }
.driver-file-picker > span { display: grid; gap: 4px; min-width: 0; }
.driver-file-picker strong { overflow: hidden; color: #dce6f5; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.driver-file-picker small { overflow: hidden; color: #6d7c94; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.driver-upload-button { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 112px; }
.additional-driver-files { padding: 2px 0 12px; }
.additional-driver-files h3 { margin: 0 0 8px; color: #94a3b8; font-size: 12px; }
.additional-driver-list { display: grid; gap: 7px; }
.additional-driver-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; background: rgba(15,23,42,.46); }
.additional-driver-row > span:first-child { display: grid; gap: 3px; min-width: 0; }
.additional-driver-row strong { overflow: hidden; color: #dce6f5; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.additional-driver-row small { color: #71809a; font-size: 10px; }
.additional-driver-actions { display: flex; align-items: center; gap: 6px; }

@media (max-width: 720px) {
  .drivers-workspace { width: min(100% - 20px, 1180px); padding-top: 22px; }
  .resource-section-header { align-items: stretch; flex-direction: column; }
  .resource-section-actions { justify-content: stretch; flex-direction: column-reverse; align-items: stretch; }
  .search-wrapper { min-width: 0; }
  .resource-size-refresh-btn { justify-content: center; }
  .resource-card-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .resource-card, .resource-card--driver { min-height: 0; }
  .resource-card-download { min-height: 44px; }
  .driver-upload-form { grid-template-columns: 1fr; }
  .driver-upload-button { min-height: 44px; }
  .additional-driver-row { align-items: stretch; flex-direction: column; }
  .additional-driver-actions > * { flex: 1; justify-content: center; }
}

/* Final avatar parity override: placed after legacy and responsive rules. */
.topbar > .account-trigger:not(.admin-avatar) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 42px !important;
  gap: 8px !important;
  padding: 2px 13px !important;
  border-radius: 24px !important;
  overflow: visible !important;
}
.topbar > .account-trigger:not(.admin-avatar) .account-avatar-image {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  flex: 0 0 42px !important;
  margin: -2px 2px -2px -10px !important;
  border: 0 !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  background-color: transparent !important;
}
.account-console-avatar {
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  min-height: 58px !important;
  flex-basis: 58px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}
@media (max-width: 768px) {
  .account-console-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    flex-basis: 40px !important;
  }
}

/* Final source parity overrides must remain last so the legacy theme cannot
   reintroduce opaque blue pills or oversized device controls. */
.project-native .inline-device-grid .device-column > h2 {
  color: #aaa !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: .1em !important;
  text-align: center !important;
}
.project-native .inline-device-grid .inline-device {
  min-height: 36px !important;
  padding: 8px 24px !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .03) !important;
  color: #e0e0e0 !important;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}
.project-native .inline-device-grid .inline-device:hover,
.project-native .inline-device-grid .inline-device:focus-visible {
  background: rgba(255, 255, 255, .07) !important;
  border-color: rgba(255, 255, 255, .25) !important;
}
.project-native .inline-device-grid .inline-device.selected {
  background: linear-gradient(180deg, rgba(59, 130, 246, .32), rgba(30, 72, 145, .24)) !important;
  border-color: rgba(59, 130, 246, .85) !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .2), 0 0 18px rgba(59, 130, 246, .14) !important;
}
.project-native .build-order-card > .order-tabs {
  gap: 8px !important;
  padding: 16px !important;
}
.project-native .build-order-card .order-tab {
  min-height: 45px !important;
  padding: 9.6px 12.8px !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: 4px !important;
  background: rgba(255, 255, 255, .03) !important;
  color: #e0e0e0 !important;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}
.project-native .build-order-card .order-tab.active {
  background: rgba(255, 255, 255, .11) !important;
  border-color: rgba(255, 255, 255, .28) !important;
  color: #fff !important;
  box-shadow: none !important;
}
@media (max-width: 720px) {
  .project-native .inline-device-grid {
    grid-template-columns: 1fr !important;
    padding-inline: 16px !important;
  }
  .project-native .inline-device-grid .device-column > h2 {
    text-align: center !important;
    font-size: 16px !important;
  }
  .project-native .inline-device-grid .inline-device {
    min-height: 36px !important;
    font-size: 16px !important;
  }
}

/* EOF theme parity override: keep the source's dark navy base, readable
   glass surfaces, and restrained animated grid visible on desktop and mobile. */
html,
body {
  background-color: #080c14 !important;
}

body {
  background:
    radial-gradient(ellipse at 20% 18%, rgba(37, 99, 235, .13), transparent 38%),
    radial-gradient(ellipse at 78% 70%, rgba(79, 70, 229, .10), transparent 44%),
    #080c14 !important;
}

body::before {
  background:
    linear-gradient(rgba(126, 157, 219, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 157, 219, .075) 1px, transparent 1px),
    radial-gradient(ellipse at 22% 28%, rgba(59, 130, 246, .12), transparent 42%),
    radial-gradient(ellipse at 76% 42%, rgba(99, 102, 241, .08), transparent 44%) !important;
  background-size: 20px 20px, 20px 20px, 112% 112%, 112% 112% !important;
  background-position: 0 0, 0 0, center, center !important;
  filter: none !important;
  opacity: .30 !important;
  animation: builder-mesh 24s ease-in-out infinite alternate !important;
}

body::after {
  right: -18% !important;
  bottom: -32% !important;
  width: 68vw !important;
  height: 68vw !important;
  background:
    radial-gradient(circle at 22% 24%, rgba(59, 130, 246, .09), transparent 58%),
    radial-gradient(circle at 78% 68%, rgba(99, 102, 241, .07), transparent 66%) !important;
  filter: blur(34px) !important;
  opacity: .24 !important;
  animation: builder-ambient-pulse 14s ease-in-out infinite alternate !important;
}

html[data-theme="grid"] .app-shell::before,
html[data-theme="grid"] .app-shell::after {
  content: none !important;
  animation: none !important;
}

.builder-effect-canvas {
  opacity: .92 !important;
  mix-blend-mode: screen !important;
}

.card,
.selector-strip,
.project-empty-prompt,
.table-card,
.recent-card,
.machine-card {
  background: linear-gradient(145deg, rgba(18, 31, 55, .62), rgba(9, 16, 30, .48)) !important;
  border-color: rgba(148, 163, 184, .18) !important;
  box-shadow: 0 18px 55px rgba(2, 6, 23, .20), inset 0 1px rgba(255, 255, 255, .035) !important;
  backdrop-filter: blur(18px) saturate(118%) !important;
}

.selector-block,
.license-target-field,
.lock-mode-picker,
.build-balance-list,
.machine-choice,
.picker-trigger,
.dna-input-wrap,
.bulk-fields,
.summary-box {
  background-color: rgba(15, 23, 42, .34) !important;
  border-color: rgba(148, 163, 184, .16) !important;
}

@media (min-width: 1101px) {
  body {
    background:
      radial-gradient(ellipse at 20% 18%, rgba(37, 99, 235, .10), transparent 38%),
      radial-gradient(ellipse at 78% 70%, rgba(79, 70, 229, .08), transparent 44%),
      #080c14 !important;
  }
}

/* Final source-theme parity: use the upstream near-black navy canvas and
   translucent blue glass surfaces.  The older overrides above intentionally
   remain for compatibility, but this block is the last cascade entry so the
   active theme has one predictable appearance at every viewport. */
html,
body {
  background-color: #080c14 !important;
}

body {
  background:
    radial-gradient(ellipse at 20% 18%, rgba(37, 99, 235, .13), transparent 38%),
    radial-gradient(ellipse at 78% 70%, rgba(79, 70, 229, .10), transparent 44%),
    #080c14 !important;
}

body::before {
  background:
    linear-gradient(rgba(126, 157, 219, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 157, 219, .075) 1px, transparent 1px),
    radial-gradient(ellipse at 22% 28%, rgba(59, 130, 246, .12), transparent 42%),
    radial-gradient(ellipse at 76% 42%, rgba(99, 102, 241, .08), transparent 44%) !important;
  background-size: 20px 20px, 20px 20px, 112% 112%, 112% 112% !important;
  background-position: 0 0, 0 0, center, center !important;
  filter: none !important;
  opacity: .30 !important;
  animation: builder-mesh 24s ease-in-out infinite alternate !important;
}

body::after {
  right: -18% !important;
  bottom: -32% !important;
  width: 68vw !important;
  height: 68vw !important;
  background:
    radial-gradient(circle at 22% 24%, rgba(59, 130, 246, .09), transparent 58%),
    radial-gradient(circle at 78% 68%, rgba(99, 102, 241, .07), transparent 66%) !important;
  filter: blur(34px) !important;
  opacity: .24 !important;
  animation: builder-ambient-pulse 14s ease-in-out infinite alternate !important;
}

html[data-theme="grid"] .app-shell::before,
html[data-theme="grid"] .app-shell::after {
  content: none !important;
  animation: none !important;
}

.builder-effect-canvas {
  opacity: .92 !important;
  mix-blend-mode: screen !important;
}

.card,
.selector-strip,
.project-empty-prompt,
.table-card,
.recent-card,
.machine-card {
  background: linear-gradient(145deg, rgba(18, 31, 55, .62), rgba(9, 16, 30, .48)) !important;
  border-color: rgba(148, 163, 184, .18) !important;
  box-shadow: 0 18px 55px rgba(2, 6, 23, .20), inset 0 1px rgba(255, 255, 255, .035) !important;
  backdrop-filter: blur(18px) saturate(118%) !important;
}

.selector-block,
.license-target-field,
.lock-mode-picker,
.build-balance-list,
.machine-choice,
.picker-trigger,
.dna-input-wrap,
.bulk-fields,
.summary-box {
  background-color: rgba(15, 23, 42, .34) !important;
  border-color: rgba(148, 163, 184, .16) !important;
}

@media (min-width: 1101px) {
  body {
    background:
      radial-gradient(ellipse at 20% 18%, rgba(37, 99, 235, .10), transparent 38%),
      radial-gradient(ellipse at 78% 70%, rgba(79, 70, 229, .08), transparent 44%),
      #080c14 !important;
  }
}

/* V11.1.4 - true last-load parity rules. */
@media (min-width: 821px) {
  .topbar {
    position: fixed !important;
    inset: 0 0 auto !important;
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 max(16px, calc((100% - 1600px) / 2)) !important;
    gap: 0 !important;
  }
  .topbar-title {
    display: inline-flex !important;
    align-items: center !important;
    min-width: 150px !important;
    color: #f1f5fb !important;
    font-size: 15px !important;
    font-weight: 720 !important;
    letter-spacing: .01em !important;
  }
  .desktop-nav {
    position: absolute !important;
    top: 0 !important;
    left: 50% !important;
    display: flex !important;
    align-items: center !important;
    height: 60px !important;
    gap: 2px !important;
    margin: 0 !important;
    transform: translateX(-50%) !important;
  }
  .desktop-nav .nav-tab {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-height: 42px !important;
    padding: 8px 10px !important;
    border-radius: 9px !important;
    color: rgba(226, 232, 240, .78) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
  }
  .desktop-nav .nav-tab:hover,
  .desktop-nav .nav-tab.active { background: rgba(255, 255, 255, .065) !important; color: #fff !important; }
  .desktop-nav .nav-tab.active { background: rgba(59, 130, 246, .11) !important; box-shadow: inset 0 -2px 0 #3b82f6 !important; }
  .desktop-nav .nav-tab .ui-icon { width: 16px !important; height: 16px !important; stroke-width: 1.8 !important; }
  .topbar-spacer { flex: 1 1 auto !important; min-width: 0 !important; }
  .topbar > .auto-refresh { margin-left: auto !important; }
  main.workspace,
  main.workspace:not(:has(#panel-machine.active)),
  main.workspace:has(#panel-machine.active) {
    width: min(1500px, calc(100% - 64px)) !important;
    max-width: 1500px !important;
  }
}

.topbar > .account-trigger:not(.admin-avatar) {
  min-height: 42px !important;
  padding: 2px 13px !important;
  border-radius: 24px !important;
}
.topbar > .account-trigger:not(.admin-avatar) .account-avatar-image {
  margin: -2px 2px -2px -10px !important;
}

.lock-mode-picker { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 5px !important; padding: 4px !important; }
.lock-mode-choice {
  position: relative !important;
  min-height: 40px !important;
  padding: 8px 28px 8px 9px !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #aebbd0 !important;
  font-family: var(--font-sans, Inter, "Segoe UI", sans-serif) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  text-align: center !important;
}
.lock-mode-choice:hover { background: rgba(255, 255, 255, .045) !important; color: #f8fafc !important; }
.lock-mode-choice.selected {
  border-color: rgba(59, 130, 246, .72) !important;
  background: rgba(59, 130, 246, .16) !important;
  color: #f8fbff !important;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .12), 0 0 15px rgba(59, 130, 246, .1) !important;
}
.lock-mode-choice.selected::after {
  content: "✓";
  position: absolute;
  top: 50%;
  right: 9px;
  color: #55e39b;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
}
.license-target-choice {
  min-height: 40px !important;
  padding: 8px 9px !important;
  border-color: rgba(255, 255, 255, .12) !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #b8c5d8 !important;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}
.license-target-choice:hover { background: rgba(255, 255, 255, .055) !important; color: #fff !important; }
.license-target-choice.selected {
  border-color: rgba(59, 130, 246, .82) !important;
  background: rgba(59, 130, 246, .2) !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .16) !important;
}
.project-native .inline-device-grid .inline-device.selected,
.inline-device-grid .inline-device.selected {
  border-color: rgba(59, 130, 246, .85) !important;
  background: linear-gradient(180deg, rgba(59, 130, 246, .32), rgba(30, 72, 145, .24)) !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .2), 0 0 18px rgba(59, 130, 246, .14) !important;
}

#panel-completed table, #panel-queued table, #panel-processing table { min-width: 1260px !important; table-layout: fixed !important; }
#panel-completed th:nth-child(1), #panel-completed td:nth-child(1), #panel-queued th:nth-child(1), #panel-queued td:nth-child(1), #panel-processing th:nth-child(1), #panel-processing td:nth-child(1) { width: 8% !important; }
#panel-completed th:nth-child(2), #panel-completed td:nth-child(2), #panel-queued th:nth-child(2), #panel-queued td:nth-child(2), #panel-processing th:nth-child(2), #panel-processing td:nth-child(2) { width: 13% !important; }
#panel-completed th:nth-child(3), #panel-completed td:nth-child(3), #panel-queued th:nth-child(3), #panel-queued td:nth-child(3), #panel-processing th:nth-child(3), #panel-processing td:nth-child(3) { width: 9% !important; }
#panel-completed th:nth-child(4), #panel-completed td:nth-child(4), #panel-queued th:nth-child(4), #panel-queued td:nth-child(4), #panel-processing th:nth-child(4), #panel-processing td:nth-child(4) { width: 10% !important; }
#panel-completed th:nth-child(5), #panel-completed td:nth-child(5), #panel-queued th:nth-child(5), #panel-queued td:nth-child(5), #panel-processing th:nth-child(5), #panel-processing td:nth-child(5) { width: 7% !important; }
#panel-completed th:nth-child(6), #panel-completed td:nth-child(6), #panel-queued th:nth-child(6), #panel-queued td:nth-child(6), #panel-processing th:nth-child(6), #panel-processing td:nth-child(6) { width: 15% !important; white-space: normal !important; }
#panel-completed th:nth-child(7), #panel-completed td:nth-child(7), #panel-queued th:nth-child(7), #panel-queued td:nth-child(7), #panel-processing th:nth-child(7), #panel-processing td:nth-child(7) { width: 10% !important; }
#panel-completed th:nth-child(8), #panel-completed td:nth-child(8), #panel-queued th:nth-child(8), #panel-queued td:nth-child(8), #panel-processing th:nth-child(8), #panel-processing td:nth-child(8) { width: 6% !important; }
#panel-completed th:nth-child(9), #panel-completed td:nth-child(9), #panel-queued th:nth-child(9), #panel-queued td:nth-child(9), #panel-processing th:nth-child(9), #panel-processing td:nth-child(9) { width: 7% !important; }
#panel-completed th:nth-child(10), #panel-completed td:nth-child(10), #panel-queued th:nth-child(10), #panel-queued td:nth-child(10), #panel-processing th:nth-child(10), #panel-processing td:nth-child(10) { width: 7% !important; }
#panel-completed th:nth-child(11), #panel-completed td:nth-child(11), #panel-queued th:nth-child(11), #panel-queued td:nth-child(11), #panel-processing th:nth-child(11), #panel-processing td:nth-child(11) { width: 8% !important; min-width: 96px !important; }
#panel-completed td, #panel-queued td, #panel-processing td { vertical-align: top !important; overflow-wrap: anywhere !important; }
#panel-completed .job-actions, #panel-queued .job-actions, #panel-processing .job-actions { width: max-content !important; flex-wrap: nowrap !important; gap: 5px !important; }

/* Final desktop parity pass.  The upstream builder keeps the brand at the
   left, the navigation rail centered, and the account control at the right;
   the earlier wide-canvas override hid the brand and pushed the rail left. */
@media (min-width: 821px) {
  .topbar {
    position: fixed !important;
    inset: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 max(16px, calc((100% - 1600px) / 2)) !important;
    gap: 0 !important;
  }

  .topbar-title {
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    min-width: 150px !important;
    color: #f1f5fb !important;
    font-size: 15px !important;
    font-weight: 720 !important;
    letter-spacing: .01em !important;
    line-height: 1 !important;
  }

  .desktop-nav {
    position: absolute !important;
    top: 0 !important;
    left: 50% !important;
    display: flex !important;
    align-items: center !important;
    height: 60px !important;
    gap: 2px !important;
    margin: 0 !important;
    transform: translateX(-50%) !important;
  }

  .desktop-nav .nav-tab {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-height: 42px !important;
    padding: 8px 10px !important;
    border-radius: 9px !important;
    color: rgba(226, 232, 240, .78) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
  }

  .desktop-nav .nav-tab:hover,
  .desktop-nav .nav-tab.active {
    background: rgba(255, 255, 255, .065) !important;
    color: #fff !important;
  }

  .desktop-nav .nav-tab.active {
    background: rgba(59, 130, 246, .11) !important;
    box-shadow: inset 0 -2px 0 #3b82f6 !important;
  }

  .desktop-nav .nav-tab .ui-icon {
    width: 16px !important;
    height: 16px !important;
    stroke-width: 1.8 !important;
  }

  .topbar-spacer { flex: 1 1 auto !important; min-width: 0 !important; }
  .topbar > .auto-refresh { margin-left: auto !important; }
  .topbar > .account-trigger:not(.admin-avatar) {
    min-height: 42px !important;
    padding: 2px 13px !important;
    border-radius: 24px !important;
  }

  main.workspace {
    width: min(1500px, calc(100% - 64px)) !important;
    max-width: 1500px !important;
  }

  main.workspace:has(#panel-machine.active) {
    width: min(1500px, calc(100% - 64px)) !important;
    max-width: 1500px !important;
  }
}

/* The source uses compact 2-choice lock controls and a blue selected device;
   a green check is reserved for the active DNA mode. */
.lock-mode-picker {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
  padding: 4px !important;
}

.lock-mode-choice {
  position: relative !important;
  min-height: 40px !important;
  padding: 8px 28px 8px 9px !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #aebbd0 !important;
  font-family: var(--font-sans, Inter, "Segoe UI", sans-serif) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  text-align: center !important;
}

.lock-mode-choice:hover { background: rgba(255, 255, 255, .045) !important; color: #f8fafc !important; }

.lock-mode-choice.selected {
  border-color: rgba(59, 130, 246, .72) !important;
  background: rgba(59, 130, 246, .16) !important;
  color: #f8fbff !important;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .12), 0 0 15px rgba(59, 130, 246, .1) !important;
}

.lock-mode-choice.selected::after {
  content: "✓";
  position: absolute;
  top: 50%;
  right: 9px;
  color: #55e39b;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
}

.license-target-choice {
  min-height: 40px !important;
  padding: 8px 9px !important;
  border-color: rgba(255, 255, 255, .12) !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #b8c5d8 !important;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

.license-target-choice:hover { background: rgba(255, 255, 255, .055) !important; color: #fff !important; }
.license-target-choice.selected {
  border-color: rgba(59, 130, 246, .82) !important;
  background: rgba(59, 130, 246, .2) !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .16) !important;
}

.project-native .inline-device-grid .inline-device.selected,
.inline-device-grid .inline-device.selected {
  border-color: rgba(59, 130, 246, .85) !important;
  background: linear-gradient(180deg, rgba(59, 130, 246, .32), rgba(30, 72, 145, .24)) !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .2), 0 0 18px rgba(59, 130, 246, .14) !important;
}

/* Keep all eleven Completed/Processing columns deterministic.  The scroll
   rail remains inside the card, so timestamps and actions cannot overlap. */
#panel-completed table,
#panel-queued table,
#panel-processing table {
  min-width: 1260px !important;
  table-layout: fixed !important;
}

#panel-completed th:nth-child(1), #panel-completed td:nth-child(1),
#panel-queued th:nth-child(1), #panel-queued td:nth-child(1),
#panel-processing th:nth-child(1), #panel-processing td:nth-child(1) { width: 8% !important; }
#panel-completed th:nth-child(2), #panel-completed td:nth-child(2),
#panel-queued th:nth-child(2), #panel-queued td:nth-child(2),
#panel-processing th:nth-child(2), #panel-processing td:nth-child(2) { width: 13% !important; }
#panel-completed th:nth-child(3), #panel-completed td:nth-child(3),
#panel-queued th:nth-child(3), #panel-queued td:nth-child(3),
#panel-processing th:nth-child(3), #panel-processing td:nth-child(3) { width: 9% !important; }
#panel-completed th:nth-child(4), #panel-completed td:nth-child(4),
#panel-queued th:nth-child(4), #panel-queued td:nth-child(4),
#panel-processing th:nth-child(4), #panel-processing td:nth-child(4) { width: 10% !important; }
#panel-completed th:nth-child(5), #panel-completed td:nth-child(5),
#panel-queued th:nth-child(5), #panel-queued td:nth-child(5),
#panel-processing th:nth-child(5), #panel-processing td:nth-child(5) { width: 7% !important; }
#panel-completed th:nth-child(6), #panel-completed td:nth-child(6),
#panel-queued th:nth-child(6), #panel-queued td:nth-child(6),
#panel-processing th:nth-child(6), #panel-processing td:nth-child(6) { width: 15% !important; white-space: normal !important; }
#panel-completed th:nth-child(7), #panel-completed td:nth-child(7),
#panel-queued th:nth-child(7), #panel-queued td:nth-child(7),
#panel-processing th:nth-child(7), #panel-processing td:nth-child(7) { width: 10% !important; }
#panel-completed th:nth-child(8), #panel-completed td:nth-child(8),
#panel-queued th:nth-child(8), #panel-queued td:nth-child(8),
#panel-processing th:nth-child(8), #panel-processing td:nth-child(8) { width: 6% !important; }
#panel-completed th:nth-child(9), #panel-completed td:nth-child(9),
#panel-queued th:nth-child(9), #panel-queued td:nth-child(9),
#panel-processing th:nth-child(9), #panel-processing td:nth-child(9) { width: 7% !important; }
#panel-completed th:nth-child(10), #panel-completed td:nth-child(10),
#panel-queued th:nth-child(10), #panel-queued td:nth-child(10),
#panel-processing th:nth-child(10), #panel-processing td:nth-child(10) { width: 7% !important; }
#panel-completed th:nth-child(11), #panel-completed td:nth-child(11),
#panel-queued th:nth-child(11), #panel-queued td:nth-child(11),
#panel-processing th:nth-child(11), #panel-processing td:nth-child(11) { width: 8% !important; min-width: 96px !important; }

#panel-completed td, #panel-queued td, #panel-processing td {
  vertical-align: top !important;
  overflow-wrap: anywhere !important;
}
#panel-completed td:first-child, #panel-queued td:first-child, #panel-processing td:first-child,
#panel-completed td:nth-child(3), #panel-queued td:nth-child(3), #panel-processing td:nth-child(3) {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
#panel-completed .job-actions, #panel-queued .job-actions, #panel-processing .job-actions {
  width: max-content !important;
  flex-wrap: nowrap !important;
  gap: 5px !important;
}

/* Match the brighter source glass field and let the real canvas own grid
   pulses/meteors.  The previous fixed pseudo-layers duplicated the pulse and
   made the page look both darker and less fluid. */
body { background: #15244b !important; }
html[data-theme="grid"] body::before {
  background-image:
    radial-gradient(ellipse at 14% 74%, rgba(38, 102, 224, .38), transparent 44%),
    radial-gradient(ellipse at 76% 38%, rgba(91, 77, 196, .32), transparent 42%),
    radial-gradient(ellipse at 42% 18%, rgba(32, 65, 147, .28), transparent 46%) !important;
  background-size: 145% 145%, 145% 145%, 145% 145% !important;
  filter: blur(18px) !important;
  opacity: .92 !important;
  animation: builder-mesh 18s ease-in-out infinite alternate !important;
}
html[data-theme="grid"] .app-shell::before,
html[data-theme="grid"] .app-shell::after {
  content: none !important;
  animation: none !important;
}
.builder-effect-canvas { opacity: 1 !important; mix-blend-mode: screen !important; }
.card, .selector-strip, .project-empty-prompt, .table-card {
  background: linear-gradient(145deg, rgba(20, 38, 82, .72), rgba(10, 22, 53, .6)) !important;
}

/* Final source parity for native device controls.  Keep the desktop builder
   compact and translucent like the upstream Linux layout. */
.project-native .inline-device-grid .device-column > h2 {
  color: #aaa !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: .1em !important;
  text-align: center !important;
}

.project-native .inline-device-grid .inline-device {
  min-height: 36px !important;
  padding: 8px 24px !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .03) !important;
  color: #e0e0e0 !important;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace !important;
  font-size: 16px !important;
  font-weight: 500 !important;
}

.project-native .inline-device-grid .inline-device:hover,
.project-native .inline-device-grid .inline-device:focus-visible {
  background: rgba(255, 255, 255, .07) !important;
  border-color: rgba(255, 255, 255, .25) !important;
}

.project-native .inline-device-grid .inline-device.selected {
  background: rgba(255, 255, 255, .11) !important;
  border-color: rgba(255, 255, 255, .42) !important;
  color: #fff !important;
}

.project-native .build-order-card > .order-tabs {
  gap: 8px !important;
  padding: 16px !important;
}

.project-native .build-order-card .order-tab {
  min-height: 45px !important;
  padding: 9.6px 12.8px !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: 4px !important;
  background: rgba(255, 255, 255, .03) !important;
  color: #e0e0e0 !important;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.project-native .build-order-card .order-tab.active {
  background: rgba(255, 255, 255, .11) !important;
  border-color: rgba(255, 255, 255, .28) !important;
  color: #fff !important;
  box-shadow: none !important;
}

@media (max-width: 720px) {
  .project-native .inline-device-grid {
    grid-template-columns: 1fr !important;
    padding-inline: 16px !important;
  }

  .project-native .inline-device-grid .device-column > h2 {
    text-align: center !important;
    font-size: 16px !important;
  }

  .project-native .inline-device-grid .inline-device {
    min-height: 36px !important;
    font-size: 16px !important;
  }
}

/* Source-builder parity: the desktop canvas is wide, blue-grid based, and
   uses translucent surfaces so the background remains visible through each
   control. */
@media (min-width: 1101px) {
  main.workspace:not(:has(#panel-machine.active)) {
    width: min(1920px, calc(100% - 32px)) !important;
    max-width: 1920px !important;
  }
}

/* Final desktop measurements from the source computer layout. */
@media (min-width: 1101px) {
  .app-shell { padding-top: 60px !important; }
  .topbar { min-height: 60px !important; height: 60px !important; }
  .desktop-nav { height: 60px !important; }
  .desktop-nav .nav-tab { min-height: 46px !important; padding: 10px 10px !important; }
  .account-trigger { min-height: 48px !important; }
}
.workspace,
.workspace button,
.workspace input,
.workspace select,
.workspace textarea,
.workspace table {
  font-family: Consolas, "SFMono-Regular", "Liberation Mono", monospace;
}
.selector-strip,
.build-order-card,
.recent-card,
.table-card,
.usage-instructions,
.write-gate-panel,
.machine-card,
.machine-summary-card {
  background: rgba(16, 32, 72, .52) !important;
  border-color: rgba(99, 155, 255, .22) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.035), 0 18px 45px rgba(0, 10, 35, .16) !important;
  backdrop-filter: blur(14px);
}
.project-title-row h1,
.page-heading h1,
.selector-block label,
.order-tab,
.inline-device-grid h2,
.field-label,
.note-row span,
.summary-box,
.bulk-help {
  letter-spacing: .02em !important;
}
.order-tabs { gap: 10px !important; }
.order-tab {
  min-height: 54px !important;
  border: 1px solid rgba(76, 143, 255, .75) !important;
  border-radius: 5px !important;
  background: rgba(16, 34, 76, .32) !important;
  color: #4f92ff !important;
  font-size: 16px !important;
}
.order-tab.active {
  background: #3f83f3 !important;
  border-color: #65a0ff !important;
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(47, 115, 229, .2) !important;
}
.inline-device-grid .device-column > h2 {
  color: #b9c5d7 !important;
  font-size: 18px !important;
}
.inline-device-grid .inline-device-choice {
  min-height: 44px !important;
  border-color: rgba(120, 160, 220, .16) !important;
  background: rgba(104, 135, 190, .1) !important;
  color: #e5eaf4 !important;
}
.inline-device-grid .inline-device-choice.selected {
  border-color: rgba(76, 143, 255, .75) !important;
  background: rgba(59, 130, 246, .22) !important;
}
.bulk-fields { display: grid; gap: 12px; margin-top: 14px; }

/* Bulk mode mirrors the source template editor: one compact row follows the
   usage panel, while the single-order device and gate controls stay hidden. */
.app-shell.bulk-active #write-gate-panel,
.app-shell.bulk-active #inline-device-grid,
.app-shell.bulk-active .selected-device-info,
.app-shell.bulk-active .lock-mode-picker,
.app-shell.bulk-active #dna-section-head,
.app-shell.bulk-active #dna-field-label,
.app-shell.bulk-active #dna-input-wrap,
.app-shell.bulk-active #license-target-field,
.app-shell.bulk-active #dmar-pa-field,
.app-shell.bulk-active .note-row,
.app-shell.bulk-active .summary-box {
  display: none !important;
}

.app-shell.bulk-active .native-build-options {
  display: block !important;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.app-shell.bulk-active .native-build-options .build-balance-list {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid rgba(73, 205, 139, .25);
  border-radius: 9px;
  background: rgba(16, 110, 73, .17);
  color: #65e2a1;
  font-size: 12px;
  line-height: 1.3;
}

.app-shell.bulk-active .native-build-options .build-balance-list span {
  color: #65e2a1;
}

.app-shell.bulk-active .native-build-options .build-balance-list span:nth-child(2) {
  display: none;
}

.app-shell.bulk-active .native-build-options .build-balance-list b {
  color: #c6ffe1;
}

.app-shell.bulk-active #bulk-fields { margin-top: 12px; }

@media (min-width: 1101px) {
  .app-shell.bulk-active .bulk-order-row {
    grid-template-columns: minmax(230px, 1.35fr) minmax(130px, .82fr) minmax(190px, 1.08fr) minmax(145px, .9fr) minmax(125px, .72fr) minmax(170px, 1fr) auto;
  }
}

.bulk-order-row {
  display: grid;
  grid-template-columns: 1.25fr .9fr 1.15fr 1.15fr .92fr 1.15fr auto;
  gap: 10px;
  align-items: stretch;
  padding: 18px 14px 14px;
  border: 1px solid rgba(110, 159, 240, .16);
  border-radius: 12px;
  background: rgba(14, 29, 62, .56);
}
.bulk-control {
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(120, 160, 220, .13);
  border-radius: 8px;
  outline: 0;
  background: rgba(7, 17, 38, .62);
  color: #e5eaf4;
  font-size: 13px;
}
.bulk-control:focus { border-color: rgba(83, 145, 255, .82); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.bulk-dna-wrap { min-height: 46px; border-color: rgba(120, 160, 220, .13); border-radius: 8px; background: rgba(7,17,38,.62); }
.bulk-dna-wrap input { font-size: 14px; }
.bulk-add {
  min-width: 62px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #3f83f3;
  color: #fff;
  font-weight: 700;
}
.bulk-add:hover { background: #5794ff; }
.bulk-help { margin: 0; color: #c1c8d6; font-size: 12px; line-height: 1.45; }
#bulk-orders-input {
  min-height: 118px;
  border-color: rgba(120, 160, 220, .13);
  border-radius: 8px;
  background: rgba(7, 17, 38, .5);
  color: #dfe7f5;
  font-family: Consolas, monospace;
  font-size: 13px;
}
.account-name-editor { align-items: center; gap: 8px; }
.account-name-editor { position: relative; display: grid !important; grid-template-columns: 24px minmax(0, 1fr); align-items: center; }
.account-name-editor > span { min-width: 0; }
.account-name-editor input {
  grid-column: 2;
  width: 100%;
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid rgba(120, 160, 220, .2);
  border-radius: 6px;
  background: rgba(7, 17, 38, .56);
  color: #eef4ff;
  font-size: 12px;
}
.settings-save-name {
  position: absolute;
  right: 8px;
  bottom: 10px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(99,155,255,.32);
  border-radius: 6px;
  background: transparent;
  color: #9cc2ff;
}
.account-name-editor input { padding-right: 36px; }
.settings-save-name:hover { background: rgba(59,130,246,.18); color: #fff; }
@media (max-width: 980px) {
  .bulk-order-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bulk-note, .bulk-add { min-height: 44px; }
}
@media (max-width: 560px) {
  .bulk-order-row { grid-template-columns: 1fr; }
  .account-name-editor { align-items: stretch; }
}

/* Source Recent/Completed column proportions. Keep the status/progress detail
   in the Time cell while preserving the dedicated DNA, license and binary
   columns used by the upstream builder. */
.table-card table { min-width: 1280px; }
.table-card th, .table-card td { padding: 13px 14px; }
.table-card th:nth-child(1), .table-card td:nth-child(1) { width: 10%; }
.table-card th:nth-child(2), .table-card td:nth-child(2) { width: 14%; }
.table-card th:nth-child(3), .table-card td:nth-child(3) { width: 12%; }
.table-card th:nth-child(4), .table-card td:nth-child(4) { width: 12%; }
.table-card th:nth-child(5), .table-card td:nth-child(5) { width: 8%; }
.table-card th:nth-child(6), .table-card td:nth-child(6) { width: 18%; white-space: normal; }
.table-card th:nth-child(7), .table-card td:nth-child(7) { width: 14%; }
.table-card th:nth-child(8), .table-card td:nth-child(8) { width: 7%; }
.table-card th:nth-child(9), .table-card td:nth-child(9) { width: 14%; white-space: normal; }
.table-card th:nth-child(10), .table-card td:nth-child(10), .table-card th:nth-child(11), .table-card td:nth-child(11) { width: 5%; }
.table-card .time-stack { display: grid; gap: 3px; }
.table-card .progress-line { margin-top: 7px; }
.job-action-icon.disabled { color: #71809a; opacity: .55; }

/* Admin account panel: an account without an uploaded avatar should not show
   a synthetic dark circle.  The profile image slot appears only when the
   shared avatar controller has attached a real image. */
.account-console-avatar:not([data-has-image="true"]) {
  display: none !important;
}

.account-console-avatar[data-has-image="true"] {
  display: block !important;
  border-color: rgba(148, 163, 184, .24) !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Final computer-layout parity: the upstream canvas uses a near-black navy
   base with a restrained blue glow.  Keep the grid and occasional pulse
   visible without washing the glass surfaces in blue. */
@media (min-width: 1101px) {
  body {
    background: #080d1b !important;
  }

  html[data-theme="grid"] body::before {
    opacity: .22 !important;
    background-image:
      linear-gradient(rgba(126, 157, 219, .14) 1px, transparent 1px),
      linear-gradient(90deg, rgba(126, 157, 219, .14) 1px, transparent 1px),
      radial-gradient(ellipse at 24% 22%, rgba(37, 99, 235, .15), transparent 36%),
      radial-gradient(ellipse at 78% 68%, rgba(59, 130, 246, .19), transparent 48%);
    background-size: 20px 20px, 20px 20px, 112% 112%, 112% 112%;
  }

  html[data-theme="grid"] .app-shell::after {
    opacity: .22;
  }
}

/* The source uses Inter/system sans for layout copy.  Reserve the monospace
   face for values and code-like fields only. */
.workspace,
.workspace button,
.workspace input,
.workspace select,
.workspace textarea,
.workspace table {
  font-family: var(--font-sans, Inter, "Segoe UI", system-ui, sans-serif) !important;
}

.workspace .dna-input-wrap,
.workspace .dna-input-wrap input,
.workspace .bulk-orders-input,
.workspace #bulk-orders-input,
.workspace code,
.workspace .inline-device,
.workspace .lock-mode-choice {
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace !important;
}

.project-empty-prompt {
  min-height: 208px !important;
  padding: 38px 24px 44px !important;
  border-color: rgba(148, 163, 184, .16) !important;
  border-radius: 17px !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, .56), rgba(15, 23, 42, .28)) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.05), 0 16px 42px rgba(2, 6, 23, .18) !important;
}

.project-empty-prompt h1 {
  font-size: 21px !important;
  font-weight: 700 !important;
  letter-spacing: -.015em !important;
}

.project-empty-prompt p {
  max-width: none !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

.selector-strip {
  background: linear-gradient(145deg, rgba(14, 24, 48, .66), rgba(9, 16, 32, .48)) !important;
  border-color: rgba(148, 163, 184, .16) !important;
}

.selector-block .machine-choice,
.selector-block .picker-trigger {
  background: rgba(9, 16, 32, .42) !important;
  border-color: rgba(148, 163, 184, .13) !important;
}

.desktop-nav .nav-tab {
  font-family: var(--font-sans, Inter, "Segoe UI", system-ui, sans-serif) !important;
  font-size: 13px !important;
  font-weight: 550 !important;
  letter-spacing: 0 !important;
}

.desktop-nav .nav-tab .ui-icon {
  width: 15px !important;
  height: 15px !important;
  stroke-width: 1.8 !important;
}

/* Desktop canvas and fixed-footer clearance.  The source desktop builder
   uses a wider work surface; reserve enough scroll tail for the fixed footer
   so the last row's actions remain reachable. */
@media (min-width: 1101px) {
  main.workspace {
    width: min(1680px, calc(100% - 48px));
    padding-bottom: 148px;
  }

  main.workspace:has(#panel-machine.active) {
    width: min(2360px, calc(100% - 96px));
  }

  #panel-completed th:last-child,
  #panel-completed td:last-child,
  #panel-queued th:last-child,
  #panel-queued td:last-child,
  #panel-processing th:last-child,
  #panel-processing td:last-child {
    min-width: 230px;
  }
}

@media (max-width: 1100px) {
  main.workspace {
    padding-bottom: 128px;
  }
}

/* Last-load desktop canvas override: keep this after legacy machine rules so
   every dashboard tab receives the same wide surface. */
@media (min-width: 1101px) {
  main.workspace:not(:has(#panel-machine.active)) {
    width: min(1680px, calc(100% - 48px));
  }

  main.workspace:has(#panel-machine.active) {
    width: min(2360px, calc(100% - 96px));
  }

  #panel-completed .table-scroll,
  #panel-queued .table-scroll,
  #panel-processing .table-scroll {
    padding-bottom: 18px;
  }
}

.admin-user-avatar {
  display: grid !important;
  place-items: center !important;
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
}
.admin-user-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* V10.6.26: the fixed header is taller on desktop than the legacy shell
   spacer. Keep the rollout notice in normal flow so it cannot slide under
   the glass navigation bar at any viewport width. */
.app-shell {
  padding-top: 60px;
}

.notice {
  position: relative;
  z-index: 1;
  clear: both;
  min-height: 44px;
  box-sizing: border-box;
}

@media (min-width: 1101px) {
  .app-shell {
    padding-top: 74px;
  }
}

/* Match the source Linux builder's typography and glass controls.  The
   license choices are intentionally outline-only; opaque pills made T1/T2/T3
   look like a different control on the local page. */
body,
button,
input,
select,
textarea {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", Arial, sans-serif;
  letter-spacing: normal;
}

.license-target-choice {
  background: transparent;
  color: #aebbd0;
  font-weight: 600;
  letter-spacing: normal;
}

.license-target-choice:hover {
  background: rgba(255, 255, 255, .035);
}

.license-target-choice.selected {
  background: rgba(59, 130, 246, .12);
  color: #f8fafc;
}

/* The source uses translucent fieldsets and outline controls. */
.selector-block,
.license-target-field,
.lock-mode-picker,
.build-balance-list,
.target-grid > div,
.summary-box {
  border-color: rgba(255, 255, 255, .085);
  background: rgba(15, 23, 42, .28);
  box-shadow: inset 0 1px rgba(255, 255, 255, .028);
}

.machine-choice,
.picker-trigger,
.license-target-choice,
.lock-mode-choice {
  font-family: inherit;
  letter-spacing: normal;
}

/* Native project controls follow the source builder's monospace face. */
.project-native .project-title-row h1,
.project-native .device-column h2,
.project-native .inline-device,
.project-native .lock-mode-choice,
.project-native .license-target-field,
.project-native .license-target-choice,
.project-native .build-balance-list,
.project-native .dna-input-wrap,
.project-native .dna-input-wrap input,
.project-native .field-label {
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}

.machine-choice,
.picker-trigger {
  background: rgba(15, 23, 42, .34);
}

.lock-mode-picker {
  background: transparent;
}

.lock-mode-choice {
  background: transparent;
  font-family: inherit;
  font-weight: 600;
}

.lock-mode-choice.selected {
  background: rgba(59, 130, 246, .12);
}

.inline-device {
  font-family: inherit;
  font-weight: 600;
  letter-spacing: normal;
}

.account-avatar-image,
.brand-emblem img {
  object-fit: contain;
}

/* A custom avatar belongs to the circular image slot, never to the whole
   account button.  The legacy palette rule applied the image to the parent
   pill as well, which made uploaded avatars look stretched or non-circular. */
.account-trigger.has-custom-avatar,
.topbar > .avatar.has-custom-avatar {
  background-image: none !important;
  background-size: auto !important;
  background-position: initial !important;
  color: inherit !important;
  text-shadow: none !important;
}

.account-avatar-image {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  margin: 0;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  clip-path: circle(50% at 50% 50%) !important;
  background: rgba(8, 14, 27, .62);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  isolation: isolate;
}

/* The account control is a pill, but its avatar slot must remain a true
   square circle at every viewport size. */
.account-trigger .account-avatar-image {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  margin: 0;
}

/* Keep every account avatar circular, including the admin header.  The
   account button itself may be a pill; the image/fallback remains a circle. */
.admin-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  overflow: hidden;
  border-radius: 50% !important;
}

/* Admin uses the same interactive account control, but must stay a circle
   instead of inheriting the desktop account pill dimensions. */
.admin-avatar.account-trigger {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  border-radius: 50% !important;
}

/* Source-builder account geometry: the navigation is a compact button with a
   42px circular avatar, while the account panel uses a larger 58px profile
   image.  The old .avatar base rule fixed the whole button at 32px, which
   clipped uploaded images and made them appear as a rectangle. */
.topbar > .account-trigger:not(.admin-avatar) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 42px !important;
  gap: 8px !important;
  padding: 0 10px 0 0 !important;
  border-radius: 10px !important;
  overflow: visible !important;
}

.topbar > .account-trigger:not(.admin-avatar) .account-avatar-image {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  flex: 0 0 42px !important;
  margin: -2px 2px -2px -10px !important;
  border: 0 !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  background-color: transparent !important;
}

.account-console-profile {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  margin: -2px 0 14px;
}

.account-console-profile-details {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.account-console-profile-details strong,
.account-console-profile-details small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-console-avatar {
  display: block !important;
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  min-height: 58px !important;
  flex: 0 0 58px !important;
  border: 2px solid rgba(126, 168, 255, .7) !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  background-color: rgba(8, 14, 27, .72) !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  box-shadow: 0 0 0 4px rgba(62, 131, 255, .13), 0 10px 24px rgba(0, 0, 0, .24) !important;
}

.account-console-avatar[data-has-image="true"] {
  background-color: transparent !important;
}

@media (max-width: 768px) {
  .account-console-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    flex-basis: 40px !important;
    box-shadow: 0 0 0 3px rgba(62, 131, 255, .13) !important;
  }
}

@media (max-width: 480px) {
  .topbar > .account-trigger:not(.admin-avatar) {
    max-width: 128px !important;
    padding-inline: 10px 8px !important;
  }
}

.admin-avatar .account-avatar-image {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 50% !important;
  clip-path: circle(50% at 50% 50%) !important;
}

.admin-list-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-list-links a { text-decoration: none; }

@media (max-width: 640px) {
  .admin-list-links { width: 100%; flex-wrap: wrap; }
  .admin-list-links .ghost { flex: 1; text-align: center; }
}

.account-trigger.has-custom-avatar .account-avatar-image {
  background-color: transparent;
}

.account-admin-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin: 7px 0 10px;
  padding: 7px 9px;
  border: 1px solid rgba(91, 141, 231, .28);
  border-radius: 8px;
  background: rgba(61, 131, 255, .08);
  color: #b7cdf2;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.account-admin-link:hover {
  border-color: rgba(91, 141, 231, .55);
  background: rgba(61, 131, 255, .18);
  color: #fff;
}

.account-admin-link .ui-icon { width: 15px; height: 15px; }

/* Desktop parity pass against the source Linux builder.  The source uses a
   centered navigation rail, larger Inter labels, and wide glass panels rather
   than compact opaque cards. */
@media (min-width: 1101px) {
  .topbar {
    min-height: 74px;
    height: 74px;
    padding: 0 8px;
  }

  .topbar-title {
    display: none;
  }

  .desktop-nav {
    position: absolute;
    top: 0;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 3px;
    height: 74px;
    margin: 0;
    transform: none;
  }

  .desktop-nav .nav-tab {
    min-height: 52px;
    padding: 12px 10px;
    border-radius: 10px;
    color: rgba(226, 232, 240, .78);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.15;
  }

  .desktop-nav .source-nav-static { cursor: default; }

  .desktop-nav .nav-tab .ui-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
  }

  .desktop-nav a[href="/admin"] { display: inline-flex; }
  .desktop-nav .source-nav-static { cursor: default; }

  .account-trigger {
    min-height: 54px;
    padding-right: 15px;
    border-radius: 28px;
    font-size: 15px;
  }

  .account-avatar-image {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    border-radius: 50% !important;
    clip-path: circle(50% at 50% 50%);
  }

  /* The source builder keeps the profile image circular even when the
     account control is rendered as a desktop pill.  Keep the image slot
     square so a custom background can never appear as a stretched rectangle. */
  .account-trigger .account-avatar-image {
    width: 42px !important;
    height: 42px !important;
    flex-basis: 42px !important;
    aspect-ratio: 1 / 1;
    border-radius: 50% !important;
    overflow: hidden !important;
    clip-path: circle(50% at 50% 50%) !important;
    object-fit: cover;
  }

  main.workspace:has(#panel-machine.active) {
    width: min(2360px, calc(100% - 184px));
  }
}

/* Final avatar guard: this rule intentionally comes after all legacy theme
   sheets so an uploaded image can only paint the circular avatar slot.  With
   no upload the slot is transparent and inherits the builder surface instead
   of showing a black rectangle. */
.account-trigger .account-avatar-image,
.admin-avatar.account-trigger .account-avatar-image {
  display: block !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  flex: 0 0 42px !important;
  margin: 0 !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  border-radius: 50% !important;
  clip-path: circle(50% at 50% 50%) !important;
  background-color: rgba(255, 255, 255, .043) !important;
  border: 1px solid rgba(255, 255, 255, .09) !important;
  box-sizing: border-box !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-clip: padding-box !important;
  isolation: isolate;
}

.account-trigger.has-custom-avatar {
  background-image: none !important;
}

.account-trigger .account-avatar-image[data-has-image="true"] {
  background-color: transparent !important;
}

.admin-avatar.account-trigger {
  display: grid !important;
  place-items: center !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 50% !important;
}

/* Admin topbar: keep the utility controls as one quiet, icon-only group.
   The account image remains a circular upload slot; only its surrounding
   button loses the legacy filled/pill treatment. */
.admin-topbar {
  gap: 8px !important;
}

.admin-topbar .menu-button,
.admin-topbar .topbar-security-alert,
.admin-topbar .admin-avatar.account-trigger {
  display: grid !important;
  place-items: center !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: rgba(203, 213, 225, .78) !important;
  box-shadow: none !important;
}

.admin-topbar .menu-button:hover,
.admin-topbar .menu-button:focus-visible,
.admin-topbar .topbar-security-alert:hover,
.admin-topbar .topbar-security-alert:focus-visible,
.admin-topbar .admin-avatar.account-trigger:hover,
.admin-topbar .admin-avatar.account-trigger:focus-visible {
  border-color: rgba(148, 163, 184, .22) !important;
  background: rgba(255, 255, 255, .07) !important;
  color: #f8fafc !important;
  outline: none;
}

.admin-topbar .menu-button .ui-icon,
.admin-topbar .topbar-security-alert .ui-icon {
  width: 17px !important;
  height: 17px !important;
  stroke-width: 1.8;
}

.admin-topbar .topbar-security-alert.has-alerts {
  border-color: transparent !important;
  background: transparent !important;
  color: #fda4af !important;
}

.admin-topbar .topbar-security-alert.has-alerts:hover,
.admin-topbar .topbar-security-alert.has-alerts:focus-visible {
  border-color: rgba(251, 113, 133, .25) !important;
  background: rgba(225, 29, 72, .1) !important;
}

.admin-topbar .admin-avatar.account-trigger .account-avatar-image {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  flex: 0 0 30px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background-color: transparent !important;
}

/* The address is still available inside the account popover and through the
   existing account-menu label, so it need not become a fourth topbar block. */
.admin-topbar .admin-identity {
  display: none !important;
}

@media (min-width: 1101px) and (max-width: 1500px) {
  .topbar { padding-inline: 28px; }
  .desktop-nav .nav-tab { padding-inline: 5px; font-size: 12px; }
  .desktop-nav .nav-tab .ui-icon { width: 15px; height: 15px; }
}

/* Source-style machine page. */
#panel-machine .machine-page-heading {
  align-items: center;
  margin: 30px 0 24px;
}

#panel-machine .machine-page-heading h1 {
  margin: 0;
  color: #f1f5fb;
  font-size: 32px;
  font-weight: 760;
  letter-spacing: -.025em;
}

.machine-page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.machine-page-actions .ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 10px 14px;
  border-color: rgba(255, 255, 255, .1);
  border-radius: 10px;
  background: rgba(15, 23, 42, .42);
  color: #d3dce9;
  font-size: 16px;
  font-weight: 650;
}

.machine-page-actions .ghost .ui-icon { width: 16px; height: 16px; }
.machine-page-actions .machine-auto-button { border-color: rgba(65, 141, 255, .72); background: rgba(33, 78, 167, .32); box-shadow: 0 0 0 1px rgba(58, 130, 246, .15), 0 0 18px rgba(58, 130, 246, .14); }

.machine-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  margin-bottom: 27px;
  padding: 14px 24px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 17px;
  background: rgba(15, 23, 42, .32);
  box-shadow: inset 0 1px rgba(255, 255, 255, .035);
}

.machine-summary-count,
.machine-updated,
.machine-status-pill { display: flex; align-items: center; }
.machine-summary-count { gap: 12px; color: #ebf2fc; }
.machine-summary-count > .ui-icon { width: 22px; height: 22px; color: #62a7ff; }
.machine-summary-count > strong { font-size: 19px; font-weight: 700; }
.machine-status-pill { gap: 7px; min-height: 32px; padding: 5px 12px; border: 1px solid rgba(40, 209, 124, .25); border-radius: 999px; background: rgba(40, 209, 124, .07); color: #7bdba8; font-size: 14px; }
.machine-status-pill .status-dot { width: 8px; height: 8px; }
.machine-status-pill.offline { border-color: rgba(255, 98, 118, .28); background: rgba(255, 98, 118, .07); color: #ff9aa8; }
.machine-status-pill.offline .status-dot { background: var(--red); box-shadow: 0 0 10px rgba(255, 98, 118, .55); }
.machine-updated { gap: 7px; color: #9aa9bd; font-size: 14px; }
.machine-updated .ui-icon { width: 16px; height: 16px; }

.source-machine-card {
  width: 100%;
  max-width: none;
  padding: 0;
  overflow: hidden;
  border-left: 3px solid rgba(45, 211, 112, .82);
  border-radius: 18px;
  background: rgba(15, 23, 42, .34);
}

.source-machine-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 101px;
  padding: 20px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(105deg, rgba(30, 159, 162, .19), rgba(28, 71, 168, .15) 54%, rgba(15, 23, 42, .12));
}

.source-machine-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.machine-source-logo { display: grid; place-items: center; width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; background: rgba(247, 250, 255, .92); color: #24395f; }
.machine-source-logo .ui-icon { width: 30px; height: 30px; stroke-width: 1.8; }
.source-machine-identity h2 { margin: 0; color: #f6f8fc; font-size: 20px; font-weight: 720; letter-spacing: -.01em; }
.source-machine-identity p { display: flex; align-items: center; gap: 8px; margin: 7px 0 0; color: #95a8c1; font-size: 15px; }
.source-machine-identity p .status-dot { width: 8px; height: 8px; }
.source-machine-identity p b { color: #43dc8a; font-weight: 650; }
.source-machine-stats { display: grid; grid-template-columns: repeat(4, minmax(80px, auto)); gap: 32px; text-align: right; }
.source-machine-stats div { display: grid; gap: 7px; }
.source-machine-stats span { color: #8d9bb0; font-size: 12px; font-weight: 700; letter-spacing: .05em; }
.source-machine-stats strong { color: #dce6f3; font-size: 18px; font-weight: 720; }

.machine-services { padding: 22px 26px 0; }
.machine-services h3,
.machine-resources h3 { margin: 0 0 16px; color: #becbdd; font-size: 14px; font-weight: 800; letter-spacing: .08em; }
.machine-service-row { display: grid; grid-template-columns: 210px minmax(160px, 1fr) auto; align-items: center; gap: 8px; min-height: 54px; padding: 0 0 0 8px; border-bottom: 1px solid rgba(255, 255, 255, .075); color: #d9e2ef; }
.machine-service-name { display: inline-flex; align-items: center; gap: 10px; }
.machine-service-name .status-dot { width: 9px; height: 9px; }
.machine-service-name strong { font-size: 16px; font-weight: 680; }
.machine-service-state { color: #ced8e6; font-size: 15px; font-weight: 600; }
.machine-service-row > small { color: #667791; font-size: 13px; text-align: right; }
.machine-service-row > small .service-lock { width: 13px; height: 13px; margin-right: 5px; vertical-align: -2px; }

.machine-resources { padding: 22px 26px 28px; }
.machine-section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.machine-cores-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 0; background: transparent; color: #99a8bd; font-size: 14px; }
.machine-cores-toggle .ui-icon { width: 15px; height: 15px; transform: rotate(90deg); }
.machine-resource-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.machine-resource-label { margin-bottom: 10px; color: #aebbd0; font-size: 15px; }
.machine-resource-label b { color: #d3deec; font-weight: 650; }
.machine-resource-grid .meter { height: 8px; background: rgba(77, 106, 155, .32); }

@media (max-width: 720px) {
  #panel-machine .machine-page-heading { align-items: flex-start; }
  .machine-summary-card, .source-machine-header { align-items: flex-start; flex-direction: column; }
  .machine-updated { align-self: flex-end; }
  .source-machine-stats { width: 100%; grid-template-columns: repeat(2, 1fr); gap: 15px; text-align: left; }
  .machine-service-row { grid-template-columns: 1fr auto; min-height: 50px; padding: 8px 0; }
  .machine-service-row > small { grid-column: 2; grid-row: 1; }
  .machine-resource-grid { grid-template-columns: 1fr; gap: 18px; }
}

#panel-completed .job-actions,
#panel-queued .job-actions,
#panel-processing .job-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 6px;
  width: max-content;
  max-width: none;
  min-width: 0;
  overflow: visible;
}

#panel-completed .job-actions > a,
#panel-completed .job-actions > button,
#panel-queued .job-actions > a,
#panel-queued .job-actions > button,
#panel-processing .job-actions > a,
#panel-processing .job-actions > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.1;
}

/* Disk quota is presented as text; CPU and RAM retain their meters below. */
.metric-grid .disk-metric {
  min-width: 0;
}
.metric-grid .disk-metric strong,
.metric-grid .disk-metric small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  /* Keep the completed list usable on a phone: retain the identifying
     columns and actions, while moving secondary metadata out of the way. */
  #panel-completed table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }
  #panel-completed th,
  #panel-completed td {
    padding: 10px 8px;
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: top;
  }
  #panel-completed td:first-child,
  #panel-completed td:first-child small { white-space: normal; }
  #panel-completed th:nth-child(1),
  #panel-completed td:nth-child(1) { width: 22%; }
  #panel-completed th:nth-child(2),
  #panel-completed td:nth-child(2) { width: 26%; }
  #panel-completed th:nth-child(3),
  #panel-completed td:nth-child(3) { width: 20%; }
  #panel-completed th:nth-child(4),
  #panel-completed td:nth-child(4),
  #panel-completed th:nth-child(6),
  #panel-completed td:nth-child(6),
  #panel-completed th:nth-child(7),
  #panel-completed td:nth-child(7) { display: none; }
  #panel-completed th:nth-child(5),
  #panel-completed td:nth-child(5) { width: 12%; }
  #panel-completed th:nth-child(8),
  #panel-completed td:nth-child(8) {
    width: 20%;
    min-width: 0;
  }
  #panel-completed .job-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 3px;
  }
  #panel-completed .job-actions > a,
  #panel-completed .job-actions > button {
    min-width: 0;
    width: 100%;
    padding: 4px 2px;
    font-size: 9px;
    line-height: 1.1;
  }
  #panel-completed .job-actions .ui-icon { display: block; }
  #panel-completed th:last-child,
  #panel-completed td:last-child,
  #panel-queued th:last-child,
  #panel-queued td:last-child,
  #panel-processing th:last-child,
  #panel-processing td:last-child {
    min-width: 190px;
  }
}

/* Source builder parity: compact icon-only task actions with accessible names. */
.job-action-icon {
  display: inline-grid !important;
  place-items: center;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  padding: 0 !important;
  border: 1px solid rgba(126, 158, 207, .28) !important;
  border-radius: 8px !important;
  background: rgba(23, 39, 66, .38) !important;
  color: #9db8df !important;
  text-decoration: none !important;
  cursor: pointer;
  overflow: visible !important;
  text-overflow: clip !important;
}
.job-action-icon .ui-icon { width: 15px !important; height: 15px !important; }
.job-action-icon:hover { border-color: rgba(103, 161, 255, .62) !important; background: rgba(52, 104, 182, .34) !important; color: #f1f6ff !important; }
.job-action-icon.delete-job { border-color: rgba(148, 163, 184, .2) !important; background: transparent !important; color: #e5edf8 !important; }
.job-action-icon.delete-job:hover { border-color: rgba(148, 163, 255, .62) !important; background: rgba(52, 104, 182, .16) !important; color: #fff !important; }
.job-action-icon.error { cursor: help; color: #f5cc73 !important; }
.table-card .job-actions { gap: 6px !important; }

/* Admin parity: use the same translucent glass surfaces and compact type scale
   for cards, fields, and actions instead of mixing opaque legacy panels. */
.admin-shell .admin-metrics > div,
.admin-shell .admin-create-card,
.admin-shell .admin-user-card,
.admin-shell .admin-login-card {
  border-color: rgba(126, 158, 207, .2) !important;
  background: linear-gradient(145deg, rgba(15, 27, 47, .58), rgba(8, 16, 30, .46)) !important;
  backdrop-filter: blur(16px);
}
.admin-shell .admin-user-stats span,
.admin-shell .admin-create-form input,
.admin-shell .admin-user-form input,
.admin-shell .password-form input {
  border-color: rgba(126, 158, 207, .22) !important;
  background: rgba(7, 14, 26, .38) !important;
  font-size: 11px !important;
}
.admin-shell .admin-create-form input,
.admin-shell .admin-user-form input,
.admin-shell .password-form input,
.admin-shell .admin-heading .ghost,
.admin-shell .admin-user-actions button {
  min-height: 42px;
}
.admin-shell .admin-heading .ghost,
.admin-shell .admin-user-actions button,
.admin-shell .admin-create-button {
  font-size: 11px !important;
}

@keyframes admin-refresh-spin {
  to { transform: rotate(360deg); }
}
.admin-shell #admin-refresh.is-refreshing .ui-icon,
.admin-shell #security-refresh.is-refreshing .ui-icon {
  animation: admin-refresh-spin .72s linear infinite;
}
.admin-shell #admin-refresh.is-refreshing,
.admin-shell #security-refresh.is-refreshing {
  cursor: wait;
}

/* Every explicit Refresh control uses the same visible busy state. */
button.is-refreshing .ui-icon {
  animation: admin-refresh-spin .72s linear infinite;
}
button.is-refreshing {
  cursor: wait !important;
}

/* Keep the account delete control aligned with the adjacent 42px text buttons. */
.admin-user-actions .delete-user {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  border-radius: 9px !important;
  border-color: rgba(148, 163, 184, .2) !important;
  background: transparent !important;
  color: #e5edf8 !important;
}
.admin-user-actions .delete-user .ui-icon { width: 16px !important; height: 16px !important; }
.admin-user-actions .delete-user:hover {
  border-color: rgba(148, 163, 184, .52) !important;
  background: rgba(148, 163, 184, .1) !important;
  color: #fff !important;
}

/* Match the upstream desktop glass surfaces. */
.topbar { background: rgba(7, 11, 21, .72) !important; }
.card, .recent-card, .table-card, .machine-card, .admin-user-card, .admin-create-card {
  background: linear-gradient(145deg, rgba(15, 24, 42, .62), rgba(9, 15, 28, .54)) !important;
  backdrop-filter: blur(18px);
}
footer { background: rgba(6, 10, 18, .72) !important; }

/* Admin controls use one transparent visual language.  Text actions keep
   their labels, while the three monitoring utilities are icon-only. */
.admin-shell button,
.admin-shell a.ghost,
.admin-shell .primary,
.admin-shell .security-action,
.admin-shell .security-unban {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

.admin-shell .primary::after {
  display: none !important;
}

.admin-shell button:not(.account-trigger):not(.topbar-security-alert):not(.admin-login-ip):not(.security-ip),
.admin-shell a.ghost {
  border-color: rgba(148, 163, 184, .2) !important;
  color: #dbe5f2 !important;
}

.admin-shell button:not(:disabled):not(.account-trigger):not(.topbar-security-alert):hover,
.admin-shell button:not(:disabled):not(.account-trigger):not(.topbar-security-alert):focus-visible,
.admin-shell a.ghost:hover,
.admin-shell a.ghost:focus-visible {
  border-color: rgba(148, 163, 184, .48) !important;
  background: rgba(255, 255, 255, .07) !important;
  color: #fff !important;
  outline: none;
}

.admin-shell button:disabled {
  background: transparent !important;
  opacity: .38;
}

.admin-shell .security-clear-alerts,
.admin-shell .security-unban {
  color: #fda4af !important;
}

.admin-shell .security-notification-toggle.is-enabled {
  color: #6ee7b7 !important;
}

.admin-shell .account-popover {
  border-color: rgba(148, 163, 184, .18) !important;
  background: linear-gradient(145deg, rgba(18, 31, 52, .72), rgba(7, 14, 27, .62)) !important;
  box-shadow: 0 24px 70px rgba(2, 6, 23, .38), inset 0 1px 0 rgba(255, 255, 255, .07) !important;
  backdrop-filter: blur(24px) saturate(140%) !important;
}

.admin-shell .account-popover .account-customization {
  border-color: rgba(148, 163, 184, .14) !important;
}

.admin-shell .account-popover .account-setting-row {
  background: transparent !important;
  border-color: transparent !important;
}

.admin-shell .account-popover .account-setting-row:hover,
.admin-shell .account-popover .account-setting-row:focus-visible {
  border-color: rgba(148, 163, 184, .2) !important;
  background: rgba(255, 255, 255, .055) !important;
}

.admin-shell .security-alert-actions .admin-icon-action {
  display: inline-grid !important;
  place-items: center !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  max-width: 34px !important;
  padding: 0 !important;
  gap: 0 !important;
  border-radius: 50% !important;
}

.admin-shell .security-alert-actions .admin-icon-action .ui-icon {
  width: 16px !important;
  height: 16px !important;
}

.admin-shell .security-alert-actions .admin-icon-action > span {
  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;
}

/* Keep the manual network-block action attached to the recorded IP in the
   red alert's metadata line.  It is deliberately compact so the alert never
   grows a second action column or pushes the account/time details away. */
.admin-shell #security-alert-meta {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  min-width: 0 !important;
  overflow: visible !important;
  white-space: normal !important;
}

.admin-shell #security-alert-meta .ui-alert-meta-text {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.admin-shell #security-alert-meta .ui-region-ban-event-compact {
  flex: 0 0 auto !important;
  min-height: 21px !important;
  height: 21px !important;
  margin-left: 1px !important;
  padding: 0 6px !important;
  border-radius: 5px !important;
  color: #fecdd3 !important;
  border-color: rgba(251, 113, 133, .38) !important;
  background: rgba(225, 29, 72, .13) !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  line-height: 19px !important;
  white-space: nowrap !important;
}

.admin-shell #security-alert-meta .ui-region-ban-event-compact:hover,
.admin-shell #security-alert-meta .ui-region-ban-event-compact:focus-visible {
  color: #fff1f2 !important;
  border-color: rgba(251, 113, 133, .72) !important;
  background: rgba(225, 29, 72, .25) !important;
}

.admin-shell #security-alert-meta .ui-region-ban-event-compact:disabled {
  opacity: .45 !important;
}

@media (max-width: 520px) {
  .admin-shell .security-alert-actions .admin-icon-action {
    flex: 0 0 34px !important;
  }
}

@media (max-width: 720px) {
  #panel-completed .job-actions .job-action-icon,
  #panel-queued .job-actions .job-action-icon,
  #panel-processing .job-actions .job-action-icon {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
  }
}

/* Final avatar parity override: keep the image slot circular after all
   legacy theme and responsive rules have loaded. */
.topbar > .account-trigger:not(.admin-avatar) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 42px !important;
  gap: 8px !important;
  padding: 2px 13px !important;
  border-radius: 24px !important;
  overflow: visible !important;
}
.topbar > .account-trigger:not(.admin-avatar) .account-avatar-image {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  flex: 0 0 42px !important;
  margin: -2px 2px -2px -10px !important;
  border: 0 !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  background-color: transparent !important;
}
.account-console-avatar {
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  min-height: 58px !important;
  flex-basis: 58px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}
@media (max-width: 768px) {
  .account-console-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    flex-basis: 40px !important;
  }
}

/* Final source parity overrides (keep last in the cascade). */
.project-native .inline-device-grid .device-column > h2 {
  color: #aaa !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: .1em !important;
  text-align: center !important;
}
.project-native .inline-device-grid .inline-device {
  min-height: 36px !important;
  padding: 8px 24px !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .03) !important;
  color: #e0e0e0 !important;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}
.project-native .inline-device-grid .inline-device:hover,
.project-native .inline-device-grid .inline-device:focus-visible {
  background: rgba(255, 255, 255, .07) !important;
  border-color: rgba(255, 255, 255, .25) !important;
}
.project-native .inline-device-grid .inline-device.selected {
  background: linear-gradient(180deg, rgba(59, 130, 246, .32), rgba(30, 72, 145, .24)) !important;
  border-color: rgba(59, 130, 246, .85) !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .2), 0 0 18px rgba(59, 130, 246, .14) !important;
}
.project-native .build-order-card > .order-tabs {
  gap: 8px !important;
  padding: 16px !important;
}
.project-native .build-order-card .order-tab {
  min-height: 45px !important;
  padding: 9.6px 12.8px !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: 4px !important;
  background: rgba(255, 255, 255, .03) !important;
  color: #e0e0e0 !important;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}
.project-native .build-order-card .order-tab.active {
  background: rgba(255, 255, 255, .11) !important;
  border-color: rgba(255, 255, 255, .28) !important;
  color: #fff !important;
  box-shadow: none !important;
}
@media (max-width: 720px) {
  .project-native .inline-device-grid {
    grid-template-columns: 1fr !important;
    padding-inline: 16px !important;
  }
  .project-native .inline-device-grid .device-column > h2 {
    text-align: center !important;
    font-size: 16px !important;
  }
  .project-native .inline-device-grid .inline-device {
    min-height: 36px !important;
    font-size: 16px !important;
  }
}
