/* Avoid expensive backdrop filtering on every historical row.  The table
   itself already supplies the glass surface; row backgrounds do not need a
   second blur layer. */
#panel-queued .orders-table tbody tr.order-row,
#panel-processing .orders-table tbody tr.order-row,
#panel-completed .orders-table tbody tr.order-row {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Keep the scroll rail isolated without applying layout containment to the
   table.  Layout containment changes intrinsic column sizing and makes the
   source-compatible dense table jump when rows or notes change. */
#panel-queued .table-wrapper,
#panel-processing .table-wrapper,
#panel-completed .table-wrapper {
  overscroll-behavior: contain;
}

/* Source order tables center every header and cell.  Keep the alignment at
   the table-cell level so switching between Pending, Processing and Completed
   cannot inherit the legacy left-aligned card rules. */
#panel-queued .orders-table th,
#panel-queued .orders-table td,
#panel-processing .orders-table th,
#panel-processing .orders-table td,
#panel-completed .orders-table th,
#panel-completed .orders-table td {
  text-align: center !important;
}
#panel-queued .orders-table .note-cell,
#panel-processing .orders-table .note-cell,
#panel-completed .orders-table .note-cell,
#panel-queued .orders-table .note-display,
#panel-processing .orders-table .note-display,
#panel-completed .orders-table .note-display {
  text-align: center !important;
}

/* Keep the order cells shrinkable so long project, target, DNA and note
   values produce real ellipses.  The source tooltip is only shown when the
   browser reports actual overflow, so an inline element without a width is
   not sufficient here. */
#panel-queued .orders-table td,
#panel-processing .orders-table td,
#panel-completed .orders-table td,
#panel-queued .orders-table .order-cell-truncated,
#panel-processing .orders-table .order-cell-truncated,
#panel-completed .orders-table .order-cell-truncated,
#panel-queued .orders-table .note-editor-cell,
#panel-processing .orders-table .note-editor-cell,
#panel-completed .orders-table .note-editor-cell,
#panel-queued .orders-table .note-display,
#panel-processing .orders-table .note-display,
#panel-completed .orders-table .note-display {
  min-width: 0 !important;
}
#panel-queued .orders-table .order-cell-truncated,
#panel-processing .orders-table .order-cell-truncated,
#panel-completed .orders-table .order-cell-truncated {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
#panel-queued .orders-table .dna-cell .order-cell-truncated,
#panel-processing .orders-table .dna-cell .order-cell-truncated,
#panel-completed .orders-table .dna-cell .order-cell-truncated {
  flex: 1 1 auto !important;
  width: auto !important;
}
#panel-queued .orders-table .note-editor-cell,
#panel-processing .orders-table .note-editor-cell,
#panel-completed .orders-table .note-editor-cell {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  gap: 4px !important;
}
#panel-queued .orders-table .note-display,
#panel-processing .orders-table .note-display,
#panel-completed .orders-table .note-display {
  display: block !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 22px !important;
  padding: 2px 4px !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: inherit !important;
  text-align: center !important;
  cursor: text !important;
}
#panel-queued .orders-table .note-display:hover,
#panel-processing .orders-table .note-display:hover,
#panel-completed .orders-table .note-display:hover,
#panel-queued .orders-table .note-display:focus-visible,
#panel-processing .orders-table .note-display:focus-visible,
#panel-completed .orders-table .note-display:focus-visible {
  border-color: var(--border-color, rgba(148, 163, 184, .3)) !important;
  outline: none !important;
}
#panel-queued .orders-table .note-edit-form,
#panel-processing .orders-table .note-edit-form,
#panel-completed .orders-table .note-edit-form {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  gap: 4px !important;
}
#panel-queued .orders-table .note-input,
#panel-processing .orders-table .note-input,
#panel-completed .orders-table .note-input {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: 2px 4px !important;
  border: 1px solid var(--border-color, rgba(148, 163, 184, .3)) !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: inherit !important;
}
#panel-queued .orders-table .note-save-btn,
#panel-processing .orders-table .note-save-btn,
#panel-completed .orders-table .note-save-btn {
  flex: 0 0 auto !important;
  min-width: 32px !important;
  min-height: 28px !important;
  padding: 2px 6px !important;
  border: 1px solid var(--primary-color, #3e83ff) !important;
  border-radius: 3px !important;
  background: var(--primary-color, #3e83ff) !important;
  color: #fff !important;
}

/* Source desktop order-table geometry must win over legacy compatibility
   rules.  The source switches to a fixed dense table at desktop widths so
   every column stays inside the viewport with the same compact type scale. */
@media (min-width: 1101px) {
  #panel-queued .orders-table.orders-table-dense,
  #panel-processing .orders-table.orders-table-dense,
  #panel-completed .orders-table.orders-table-dense {
    table-layout: fixed !important;
    min-width: 0 !important;
  }
  #panel-queued .orders-table.orders-table-dense thead th,
  #panel-queued .orders-table.orders-table-dense tbody td,
  #panel-processing .orders-table.orders-table-dense thead th,
  #panel-processing .orders-table.orders-table-dense tbody td,
  #panel-completed .orders-table.orders-table-dense thead th,
  #panel-completed .orders-table.orders-table-dense tbody td {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    padding-inline: clamp(.18rem, .34vw, .42rem) !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: clamp(.75rem, .52rem + .28vw, .9rem) !important;
  }
  #panel-queued .orders-table.orders-table-dense .order-cell-time,
  #panel-processing .orders-table.orders-table-dense .order-cell-time,
  #panel-completed .orders-table.orders-table-dense .order-cell-time,
  #panel-queued .orders-table.orders-table-dense .note-editor-cell,
  #panel-processing .orders-table.orders-table-dense .note-editor-cell,
  #panel-completed .orders-table.orders-table-dense .note-editor-cell,
  #panel-queued .orders-table.orders-table-dense .order-row-actions,
  #panel-processing .orders-table.orders-table-dense .order-row-actions,
  #panel-completed .orders-table.orders-table-dense .order-row-actions {
    min-width: 0 !important;
    max-width: 100% !important;
  }
}
@media (max-width: 1100px) {
  #panel-queued .orders-table.orders-table-dense,
  #panel-processing .orders-table.orders-table-dense,
  #panel-completed .orders-table.orders-table-dense {
    min-width: 1500px !important;
  }
}

/* The Admin risk table is a single glass surface. Remove the legacy black
   cell tiles and the dark sticky Action rail. */
.admin-shell .security-table-wrap,
.admin-shell .security-table,
.admin-shell .security-table thead,
.admin-shell .security-table tbody,
.admin-shell .security-table tr,
.admin-shell .security-table th,
.admin-shell .security-table td,
.admin-shell .security-table th::before,
.admin-shell .security-table td::before,
.admin-shell .security-table .security-risk,
.admin-shell .security-table .security-state,
.admin-shell .security-table .security-ip,
.admin-shell .security-table .security-action,
.admin-shell .security-table .security-actions {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
}
.admin-shell .security-table th:last-child,
.admin-shell .security-table td:last-child,
.admin-shell .security-table tr:hover td,
.admin-shell .security-table tr:hover td:last-child {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-left-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* The security grid is one glass surface.  Risk/Event/IP/Account/Time/Status
   cells and their inline controls must not become separate black tiles. */
.admin-shell .security-table,
.admin-shell .security-table thead,
.admin-shell .security-table tbody,
.admin-shell .security-table tr,
.admin-shell .security-table th,
.admin-shell .security-table td,
.admin-shell .security-table th::before,
.admin-shell .security-table td::before,
.admin-shell .security-table .security-risk,
.admin-shell .security-table .security-state,
.admin-shell .security-table .security-ip,
.admin-shell .security-table .security-account,
.admin-shell .security-table .security-time,
.admin-shell .security-table .security-status,
.admin-shell .security-table .security-action,
.admin-shell .security-table .security-actions {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
}

.admin-shell .security-table tr:hover td,
.admin-shell .security-table tr:hover td:last-child {
  background: rgba(var(--primary-rgb, 62, 131, 255), .055) !important;
  background-image: none !important;
}

/* Final admin override: the risk grid is a single glass surface.  Older
   compatibility sheets style every cell and the sticky Action rail as dark
   tiles, so keep these rules last and explicit. */
.admin-shell .security-center .security-table-wrap,
.admin-shell .security-center table.security-table,
.admin-shell .security-center table.security-table thead,
.admin-shell .security-center table.security-table tbody,
.admin-shell .security-center table.security-table tr,
.admin-shell .security-center table.security-table th,
.admin-shell .security-center table.security-table td,
.admin-shell .security-center table.security-table td::before,
.admin-shell .security-center table.security-table th::before,
.admin-shell .security-center table.security-table .security-risk,
.admin-shell .security-center table.security-table .security-state,
.admin-shell .security-center table.security-table .security-ip,
.admin-shell .security-center table.security-table .security-account,
.admin-shell .security-center table.security-table .security-time,
.admin-shell .security-center table.security-table .security-status,
.admin-shell .security-center table.security-table .security-action,
.admin-shell .security-center table.security-table .security-actions {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.admin-shell .security-center table.security-table th:last-child,
.admin-shell .security-center table.security-table td:last-child {
  position: static !important;
  border-left: 0 !important;
}
.admin-shell .security-center table.security-table tr:hover td,
.admin-shell .security-center table.security-table tr:hover td:last-child {
  background: rgba(var(--primary-rgb, 62, 131, 255), .055) !important;
  background-image: none !important;
}

/* Final source-parity pass: the security grid is a transparent table over the
   existing glass surface.  Legacy rules also paint the toolbar metrics and
   ban rows as dark cards, which reads as black bars in the desktop console. */
.admin-shell .security-center .security-toolbar,
.admin-shell .security-center .security-toolbar label,
.admin-shell .security-center .security-toolbar label > span,
.admin-shell .security-center .security-metrics > div,
.admin-shell .security-center .security-ban-row,
.admin-shell .security-center .security-table-wrap,
.admin-shell .security-center .security-table,
.admin-shell .security-center .security-table thead,
.admin-shell .security-center .security-table tbody,
.admin-shell .security-center .security-table tr,
.admin-shell .security-center .security-table th,
.admin-shell .security-center .security-table td,
.admin-shell .security-center .security-table td::before,
.admin-shell .security-center .security-table th::before,
.admin-shell .security-center .security-table .security-risk,
.admin-shell .security-center .security-table .security-state,
.admin-shell .security-center .security-table .security-ip,
.admin-shell .security-center .security-table .security-account,
.admin-shell .security-center .security-table .security-time,
.admin-shell .security-center .security-table .security-status,
.admin-shell .security-center .security-table .security-action,
.admin-shell .security-center .security-table .security-actions {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.admin-shell .security-center .security-toolbar,
.admin-shell .security-center .security-metrics > div,
.admin-shell .security-center .security-ban-row {
  border-color: rgba(148, 163, 184, .12) !important;
}
.admin-shell .security-center .security-table tr:hover td,
.admin-shell .security-center .security-table tr:hover td:last-child,
.admin-shell .security-center .security-table .security-action:hover,
.admin-shell .security-center .security-table .security-action:focus-visible {
  background: rgba(var(--primary-rgb, 62, 131, 255), .055) !important;
  background-image: none !important;
}

/* Pending/Processing/Completed use the same compact icon rail as the source.
   Keep every command transparent until hover; this also prevents the old red
   destructive tile from reappearing through actions.css/jobs.css. */
#panel-queued .job-action-icon.cancel-job,
#panel-processing .job-action-icon.cancel-job,
#panel-processing .job-action-icon.retry-job,
#panel-completed .job-action-icon.rebuild-job,
.job-action-icon.cancel-job,
.job-action-icon.retry-job,
.job-action-icon.rebuild-job {
  background: transparent !important;
  background-image: none !important;
  color: #c9d5e6 !important;
  border-color: rgba(148, 163, 184, .22) !important;
}
.job-action-icon.cancel-job:hover,
.job-action-icon.retry-job:hover,
.job-action-icon.rebuild-job:hover,
.job-action-icon.cancel-job:focus-visible,
.job-action-icon.retry-job:focus-visible,
.job-action-icon.rebuild-job:focus-visible {
  background: rgba(76, 133, 220, .18) !important;
  border-color: rgba(125, 177, 255, .64) !important;
  color: #fff !important;
}
.job-action-icon.is-working .ui-icon { animation: admin-refresh-spin .72s linear infinite; }

/* Keep the risk grid as one glass surface.  The older admin sheet assigns
   opaque backgrounds to badges and the sticky Action cell; the source site
   leaves these cells transparent and only uses a subtle row hover. */
.admin-shell .security-center table.security-table .security-risk,
.admin-shell .security-center table.security-table .security-state,
.admin-shell .security-center table.security-table .security-action,
.admin-shell .security-center table.security-table .security-actions,
.admin-shell .security-center table.security-table td:last-child,
.admin-shell .security-center table.security-table th:last-child {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.admin-shell .security-center table.security-table .security-action {
  border-color: rgba(148, 163, 184, .18) !important;
}

/* Keep the event grid as one transparent surface and keep pagination outside
   the scroll container.  This matches the source desktop console and avoids
   the old black cell/Action rail effect. */
.admin-shell .security-center .security-table-wrap,
.admin-shell .security-center table.security-table,
.admin-shell .security-center table.security-table thead,
.admin-shell .security-center table.security-table tbody,
.admin-shell .security-center table.security-table tr,
.admin-shell .security-center table.security-table th,
.admin-shell .security-center table.security-table td {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}
.admin-shell .security-center table.security-table th {
  border-bottom: 1px solid rgba(148, 163, 184, .12) !important;
}
.admin-shell .security-center table.security-table tr:hover td {
  background: rgba(62, 131, 255, .055) !important;
}
.security-events-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  margin: -8px 22px 18px;
  padding: 0 2px;
  color: #71839f;
  font-size: 11px;
}
.security-events-footer .ghost {
  min-height: 32px;
  padding: 0 12px;
  color: #c9d8ed;
  border-color: rgba(148, 163, 184, .2);
  background: transparent;
}
.security-events-footer .ghost:hover:not(:disabled),
.security-events-footer .ghost:focus-visible {
  color: #fff;
  border-color: rgba(125, 177, 255, .62);
  background: rgba(62, 131, 255, .12);
}
.security-events-footer .ghost.is-refreshing .ui-icon {
  animation: admin-refresh-spin .72s linear infinite;
}
@media (max-width: 520px) {
  .security-events-footer { margin-right: 15px; margin-left: 15px; }
}

/* Pending/Processing/Completed use the source's compact neutral icon
   actions.  Retry, cancel and rebuild share the same geometry as Download. */
#panel-queued .job-action-icon,
#panel-processing .job-action-icon,
#panel-completed .job-action-icon {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 1px solid rgba(148, 163, 184, .22) !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #dbe5f2 !important;
  box-shadow: none !important;
}
#panel-queued .job-action-icon:hover,
#panel-processing .job-action-icon:hover,
#panel-completed .job-action-icon:hover,
#panel-queued .job-action-icon:focus-visible,
#panel-processing .job-action-icon:focus-visible,
#panel-completed .job-action-icon:focus-visible {
  background: rgba(62, 131, 255, .16) !important;
  border-color: rgba(125, 177, 255, .7) !important;
  color: #fff !important;
}
#panel-queued .job-action-icon .ui-icon,
#panel-processing .job-action-icon .ui-icon,
#panel-completed .job-action-icon .ui-icon {
  width: 15px !important;
  height: 15px !important;
}

/* Desktop command-bar parity with the source builder.  The older parity
   sheet intentionally collapses Refresh to a 44px icon for narrow layouts;
   on the desktop source it is a text button and the field selector is 180px.
   Keep this override last so all three order panels share one stable grid. */
@media (min-width: 821px) {
  #panel-queued .orders-command-primary,
  #panel-processing .orders-command-primary,
  #panel-completed .orders-command-primary {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  #panel-queued .orders-command-bar .search-input-wrapper,
  #panel-processing .orders-command-bar .search-input-wrapper,
  #panel-completed .orders-command-bar .search-input-wrapper {
    grid-template-columns: minmax(0, 1fr) 180px !important;
    gap: 16px !important;
  }

  #panel-queued .orders-command-bar .field-filter-trigger,
  #panel-processing .orders-command-bar .field-filter-trigger,
  #panel-completed .orders-command-bar .field-filter-trigger {
    min-width: 180px !important;
  }

  #panel-queued .orders-command-bar .refresh-btn,
  #panel-processing .orders-command-bar .refresh-btn,
  #panel-completed .orders-command-bar .refresh-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 102px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 6px 12px !important;
  }

  #panel-queued .orders-command-bar .refresh-label,
  #panel-processing .orders-command-bar .refresh-label,
  #panel-completed .orders-command-bar .refresh-label {
    display: inline !important;
  }

  #panel-queued .orders-command-bar .auto-refresh-btn,
  #panel-processing .orders-command-bar .auto-refresh-btn,
  #panel-completed .orders-command-bar .auto-refresh-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 114px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 6px 12px !important;
    font-weight: 600 !important;
  }

  #panel-queued .orders-command-bar .auto-refresh-icon,
  #panel-processing .orders-command-bar .auto-refresh-icon,
  #panel-completed .orders-command-bar .auto-refresh-icon {
    flex: 0 0 16px !important;
    width: 16px !important;
    height: 16px !important;
  }

  #panel-queued .orders-command-bar .auto-refresh-btn.active .auto-refresh-icon,
  #panel-processing .orders-command-bar .auto-refresh-btn.active .auto-refresh-icon,
  #panel-completed .orders-command-bar .auto-refresh-btn.active .auto-refresh-icon {
    animation: admin-refresh-spin 1.2s linear infinite !important;
  }

  #panel-queued .orders-command-bar .refresh-btn .ui-icon,
  #panel-processing .orders-command-bar .refresh-btn .ui-icon,
  #panel-completed .orders-command-bar .refresh-btn .ui-icon {
    flex: 0 0 12px !important;
    width: 12px !important;
    height: 12px !important;
  }

  #panel-queued .orders-command-bar .refresh-btn,
  #panel-processing .orders-command-bar .refresh-btn,
  #panel-completed .orders-command-bar .refresh-btn {
    gap: 6px !important;
    font-weight: 500 !important;
  }
}
