/* 171: measured source controls. ADLINK keeps its existing presentation. */
.app-shell {
  --font-sans: Inter, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei",
    "Noto Sans CJK SC", "Source Han Sans SC", system-ui, -apple-system,
    BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "Cascadia Mono", SFMono-Regular,
    "SF Mono", "Roboto Mono", "Fira Code", "IBM Plex Mono", Menlo, Monaco,
    Consolas, "Liberation Mono", monospace;
  font-family:var(--font-sans) !important;
  line-height:24px;
}
.app-shell :is(input,textarea,select,code,pre,.dna-copy-source,.order-cell-truncated,.job-meta > code) {
  font-family:var(--font-mono) !important;
}
.app-shell :is(input,textarea,select) { line-height:24px; }
.app-shell :is(button,.nav-tab,a,.account-name,.order-usage-description,.order-usage-title) {
  font-family:var(--font-sans) !important;
}
.parity171-icon { display:none; }
.app-shell:not(.project-adlink) .parity171-icon {
  display:block; width:1em; height:1em; flex:none; fill:currentColor; stroke:none;
}
.app-shell:not(.project-adlink) :is(.usage-icon,.usage-chevron,.write-gate-icon,#dna-paste) > .parity171-legacy {
  display:none !important;
}
html body .app-shell:not(.project-adlink) .usage-icon {
  display:flex !important; align-items:center; justify-content:center;
  flex:0 0 16px !important; width:16px !important; height:20px !important;
  padding:0 !important; border:0 !important; border-radius:0 !important;
  background:transparent !important; color:#c7d2fe !important; font-size:16px !important;
}
.app-shell:not(.project-adlink) .usage-chevron {
  display:flex; align-items:center; margin-left:auto; color:#e2e8f0; font-size:13.6px;
}
.app-shell:not(.project-adlink) details[open] .usage-chevron { transform:rotate(180deg); }
html body .app-shell:not(.project-adlink) .write-gate-icon {
  display:flex !important; align-items:center; justify-content:center;
  width:26.4px !important; height:26.4px !important; flex:0 0 26.4px !important;
  padding:6px !important; box-sizing:border-box; border:0 !important; border-radius:6px !important;
  background:rgba(99,102,241,.15) !important; color:#818cf8 !important; font-size:14.4px !important;
}
html body .app-shell:not(.project-adlink) #dna-input-wrap {
  position:relative !important; display:block !important; width:100% !important; min-width:0 !important;
  padding:0 !important; border:0 !important; background:transparent !important; box-shadow:none !important;
}
html body .app-shell:not(.project-adlink) #dna-input-wrap > span { display:none !important; }
html body .app-shell:not(.project-adlink) #dna-input-wrap > #dna {
  display:block !important; width:100% !important; min-height:57.8px !important; box-sizing:border-box !important;
  padding:16px 16px 16px 44.8px !important;
  border:1px solid rgba(255,255,255,.1) !important; border-radius:6px !important;
  background:rgba(0,0,0,.2) !important; color:#fff !important;
  font-family:var(--font-mono) !important; font-size:16px !important;
  line-height:24px !important; letter-spacing:0 !important;
}
html body .app-shell:not(.project-adlink) #dna-input-wrap > #dna:focus {
  outline:2px solid rgba(59,130,246,.45); outline-offset:1px;
}
html body .app-shell:not(.project-adlink) #dna-input-wrap > #dna-paste {
  display:flex !important; align-items:center; justify-content:center; position:absolute !important;
  left:8.8px !important; right:auto !important; top:50% !important; transform:translateY(-50%) !important;
  width:28.8px !important; min-width:28.8px !important; height:28.8px !important; min-height:0 !important;
  margin:0 !important; padding:0 !important; border:0 !important; border-radius:5px !important;
  background:rgba(59,130,246,.15) !important; color:rgba(96,165,250,.7) !important;
  font-size:13.6px !important; cursor:pointer;
}
html body .app-shell:not(.project-adlink) #dna-paste:hover { background:rgba(59,130,246,.25) !important; color:#93c5fd !important; }
html body .app-shell:not(.project-adlink) #dna-paste:focus-visible { outline:2px solid #60a5fa; outline-offset:2px; }

/* Drivers now uses the same flow panel; one document and one account menu. */
@media (min-width:981px) {
  html body .app-shell > main.workspace:has(> #panel-drivers.active) {
    width:min(1600px,100%) !important; max-width:1600px !important;
    margin-inline:auto !important; padding-inline:16px !important; box-sizing:border-box !important;
  }
}
#panel-drivers { min-width:0; }
#panel-drivers .resource-card-grid { width:100%; }
#panel-finder .finder-results-table { min-width:0 !important; }
#panel-finder :is(th,td) { min-width:0 !important; white-space:normal; }
#panel-finder .dna-cell { min-width:0; max-width:100%; overflow:hidden; }
#panel-finder .dna-copy-source { max-width:100%; overflow-wrap:anywhere; word-break:break-word; }

/* Admin's old full-width 60px padding escaped the shared 1600px frame. */
html body .app-shell.admin-shell > .admin-topbar {
  padding-inline:max(16px, calc((100% - 1600px) / 2 + 16px)) !important;
  gap:8px !important; box-sizing:border-box !important; align-items:center !important;
}
html body .app-shell.admin-shell > .admin-topbar > .topbar-title {
  position:static !important; margin:0 !important; align-self:center !important;
}
html body .app-shell.admin-shell > .admin-topbar > .topbar-spacer { flex:1 1 auto !important; }
html body .app-shell.admin-shell > .admin-topbar > .menu-button {
  width:36px !important; min-width:36px !important; padding:0 !important; flex:0 0 36px !important;
}

.machine-service-details {
  margin-top:14px; padding:14px; border:1px solid rgba(148,163,184,.2); border-radius:8px;
  background:rgba(15,23,42,.3); color:#e2e8f0; min-width:0;
}
.machine-service-details[hidden] { display:none !important; }
.machine-service-details h4 { margin:0 0 8px; font:600 14px var(--font-sans); }
.machine-service-details p { margin:6px 0; font:400 13px/1.6 var(--font-sans); color:#94a3b8; }
.machine-service-details pre { font:12px/1.5 var(--font-mono); white-space:pre-wrap; overflow-wrap:anywhere; color:#cbd5e1; }
.machine-service-row > .service-details-button {
  cursor:pointer; font:inherit; color:inherit; padding:2px 5px; border:1px solid transparent;
  border-radius:4px; background:transparent; text-align:left;
}
.machine-service-row > .service-details-button:hover { border-color:#475569; background:rgba(59,130,246,.1); }
.machine-service-row > .service-details-button:focus-visible { outline:2px solid #60a5fa; }

/* The decorative security glow must not extend the mobile document width. */
@media (max-width:768px) {
  .admin-shell .security-center::before { left:auto; right:0; max-width:100%; box-sizing:border-box; }
}

/* 173: match the source's radio-button badge, without touching ADLINK. */
.source-option-check { display:none; }
html body .app-shell:not(.project-adlink) #lock-mode-picker {
  display:flex !important; flex-wrap:wrap !important; gap:8px !important;
  padding:0 !important; border:0 !important; background:transparent !important; box-shadow:none !important;
}
html body .app-shell:not(.project-adlink) :is(.lock-mode-choice,.license-target-choice,.inline-device) {
  --radio-badge-size:.5rem; --radio-badge-pad:3px; --radio-badge-inset:6px;
  --radio-badge-band:calc(var(--radio-badge-inset) + var(--radio-badge-size) + 2 * var(--radio-badge-pad) + 4px);
  position:relative !important; display:inline-flex !important; align-items:center !important; justify-content:center !important;
  gap:6px !important; min-width:0 !important; min-height:36px !important;
  padding:8px var(--radio-badge-band) !important; margin:4px 2px !important;
  border:1px solid #ffffff1a !important; border-radius:8px !important;
  background:#ffffff08 !important; box-shadow:none !important; color:#e0e0e0 !important;
  font-family:var(--font-mono) !important; font-size:16px !important; font-weight:500 !important;
  line-height:24px !important; letter-spacing:normal !important;
  transition:all .2s; backdrop-filter:blur(4px);
}
html body .app-shell:not(.project-adlink) :is(.lock-mode-choice,.license-target-choice,.inline-device)::before,
html body .app-shell:not(.project-adlink) :is(.lock-mode-choice,.license-target-choice,.inline-device)::after {
  content:none !important; display:none !important;
}
html body .app-shell:not(.project-adlink) :is(.lock-mode-choice,.license-target-choice,.inline-device):hover:not(:disabled) {
  border-color:rgba(96,165,250,.7) !important; color:#fff !important; background:rgba(255,255,255,.06) !important;
}
html body .app-shell:not(.project-adlink) :is(.lock-mode-choice,.license-target-choice,.inline-device).selected {
  background:linear-gradient(to right,rgba(59,130,246,.2),rgba(99,102,241,.2)) !important;
  border-color:#3b82f6 !important; color:#fff !important; font-weight:600 !important;
  box-shadow:0 0 0 1px #3b82f6,0 4px 12px rgba(59,130,246,.3) !important;
}
html body .app-shell:not(.project-adlink) :is(.lock-mode-choice,.license-target-choice,.inline-device).selected:hover {
  border-color:rgba(96,165,250,.7) !important;
  background:linear-gradient(to right,rgba(59,130,246,.3),rgba(99,102,241,.3)) !important;
  box-shadow:0 0 0 1px #3b82f6,0 8px 20px -6px rgba(59,130,246,.45) !important;
}
html body .app-shell:not(.project-adlink) #panel-build .source-option-content {
  display:flex; flex-direction:column; min-width:0;
  font:inherit !important; line-height:1.2 !important; color:inherit !important;
}
html body .app-shell:not(.project-adlink) .selected > .source-option-check {
  display:block; position:absolute; top:var(--radio-badge-inset); right:var(--radio-badge-inset);
  box-sizing:content-box; width:var(--radio-badge-size); height:var(--radio-badge-size);
  padding:var(--radio-badge-pad); border-radius:50%; background:#3b82f6;
  color:#fff; fill:currentColor; stroke:none; pointer-events:none;
  box-shadow:0 2px 5px #0006,inset 0 1px #ffffff40;
}
html body .app-shell:not(.project-adlink) .inline-device.unavailable {
  opacity:.5; cursor:not-allowed; color:#666 !important;
  background:#1f1f1f !important; border-color:#333 !important;
}
html body .app-shell:not(.project-adlink) :is(.lock-mode-choice,.license-target-choice,.inline-device):focus-visible {
  outline:2px solid #60a5fa; outline-offset:3px;
}

/* Source native checkboxes are light, even while the surrounding UI is dark.
   Keep their native checked/indeterminate behavior and blue accent. */
html body .app-shell .orders-panel .orders-table input[type="checkbox"] {
  color-scheme:light !important; appearance:auto !important; accent-color:#3b82f6 !important;
  width:13px !important; height:13px !important; min-width:13px !important;
  min-height:13px !important; padding:0 !important;
}
/* Mono table text and the source's deliberate bright/muted hierarchy. */
html body .app-shell .orders-panel:is(#panel-queued,#panel-processing,#panel-completed,#panel-archived) .orders-table[data-order-layout="source"] :is(th,td)[data-column],
html body .app-shell .orders-panel:is(#panel-queued,#panel-processing,#panel-completed,#panel-archived) .orders-table[data-order-layout="source"] :is(code,.order-cell-truncated) {
  font-family:var(--font-mono) !important; font-size:14.4px !important; line-height:21.6px !important;
}
html body .app-shell .orders-panel:is(#panel-queued,#panel-processing,#panel-completed,#panel-archived) .orders-table th[data-column] { color:#e8eef7 !important; font-weight:600 !important; }
html body .app-shell .orders-panel:is(#panel-queued,#panel-processing,#panel-completed,#panel-archived) .orders-table[data-order-layout="source"] th[data-column] > span {
  font-family:var(--font-mono) !important;
}
html body .app-shell .orders-panel:is(#panel-queued,#panel-processing,#panel-completed,#panel-archived) .orders-table td[data-column] { color:#e0e0e0 !important; font-weight:400 !important; }
html body .app-shell .orders-panel:is(#panel-queued,#panel-processing,#panel-completed,#panel-archived) .orders-table td:is([data-column="id"],[data-column="project"]),
html body .app-shell .orders-panel:is(#panel-queued,#panel-processing,#panel-completed,#panel-archived) .orders-table td[data-column="id"] > code {
  color:#f1f5f9 !important; font-weight:600 !important;
}
html body .app-shell .orders-panel:is(#panel-queued,#panel-processing,#panel-completed,#panel-archived) .orders-table td[data-column="id"] { letter-spacing:.02em; }
html body .app-shell .orders-panel:is(#panel-queued,#panel-processing,#panel-completed,#panel-archived) .orders-table td:is([data-column="target"],[data-column="dna"],[data-column="machine"]),
html body .app-shell .orders-panel:is(#panel-queued,#panel-processing,#panel-completed,#panel-archived) .orders-table td[data-column="dna"] code {
  color:#b6c2d1 !important; font-weight:400 !important;
}
html body .app-shell .orders-panel:is(#panel-queued,#panel-processing,#panel-completed,#panel-archived) .orders-table td[data-column="time"] { color:#dbe4ef !important; }
/* Search fields are sans, unlike the monospace order records. */
html body .app-shell .orders-panel .search-input { font-family:var(--font-sans) !important; }
html body .app-shell .desktop-nav .nav-tab:not(.active) { color:rgba(226,232,240,.76) !important; }
@media (min-width:981px) {
  html body .app-shell > .topbar > .desktop-nav .nav-tab {
    font-size:14.72px !important; font-weight:500 !important; line-height:22.08px !important;
  }
  html body .app-shell > .topbar > .desktop-nav .nav-tab .ui-icon {
    width:1em !important; height:1em !important; flex-basis:1em !important;
  }
}
