﻿/* Rebuild source trace:
 */

.system-page {
  display: grid;
  gap: 16px;
}

.system-header,
.system-panel-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.system-panel-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.system-panel-header-actions button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.system-header h1,
.system-panel-header h2 {
  margin: 0 0 4px;
}

.system-header p,
.system-panel-header p {
  color: var(--muted);
  margin: 0;
}

.system-panel-header span,
.system-pill {
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent) 13%, var(--panel));
  border-radius: 999px;
  color: color-mix(in srgb, var(--accent) 36%, var(--text));
  font-size: 12px;
  padding: 5px 9px;
  white-space: nowrap;
}

.system-tabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.system-tabs a {
  color: var(--muted);
  padding: 10px 12px;
  text-decoration: none;
}

.system-tabs a.active {
  border-bottom: 2px solid var(--accent);
  color: var(--text);
  font-weight: 700;
}

.system-panel {
  display: grid;
  gap: 14px;
}

.system-journal-panel {
  gap: 0;
  min-width: 0;
  overflow: hidden;
}

.system-alert-summary {
  margin: 0 10px 8px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--soft-panel) 44%, var(--panel));
}

.system-alert-summary > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 11px;
  cursor: pointer;
  list-style: none;
}

.system-alert-summary > summary::-webkit-details-marker {
  display: none;
}

.system-alert-summary > summary::after {
  content: "⌄";
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  transition: transform 160ms ease;
}

.system-alert-summary[open] > summary::after {
  transform: rotate(180deg);
}

.system-alert-summary[open] > summary {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
}

.system-alert-summary-title {
  display: grid;
  flex: 1 1 auto;
  gap: 1px;
  min-width: 0;
}

.system-alert-summary-title strong,
.system-alert-summary-title small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-alert-summary-title strong {
  font-size: 13px;
}

.system-alert-summary-title small,
.system-alert-row-copy small {
  color: var(--muted);
  font-size: 11px;
}

.system-alert-summary-count {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  color: color-mix(in srgb, var(--accent) 40%, var(--text));
  font-size: 11px;
  font-weight: 850;
}

.system-alert-summary-body {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.system-alert-summary-toolbar {
  display: flex;
  justify-content: flex-end;
}

.system-alert-summary-toolbar button,
.system-alert-row .system-alert-actions button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 11px;
}

.system-alert-list {
  display: grid;
  gap: 5px;
}

.system-alert-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 7px;
  background: var(--panel);
}

.system-alert-row.is-archived {
  border-style: dashed;
  opacity: 0.72;
}

.system-alert-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent);
}

.system-alert-row.is-warning .system-alert-indicator {
  background: var(--yellow);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--yellow) 13%, transparent);
}

.system-alert-row.is-danger .system-alert-indicator {
  background: var(--red);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 13%, transparent);
}

.system-alert-row-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.system-alert-row-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-alert-row .system-alert-actions {
  margin: 0;
  flex-wrap: nowrap;
}

.system-alert-empty {
  color: var(--muted);
  padding: 8px;
  text-align: center;
}

.layout.app-shell #mainContent .page-layout .system-journal-toolbar.system-toolbar.table-workspace__filters {
  grid-template-columns: minmax(240px, 1.35fr) auto minmax(130px, 0.6fr) repeat(2, minmax(132px, 0.55fr));
}

.system-journal-search {
  min-width: 0;
}

.system-journal-categories {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 34px;
  padding: 3px;
  border: 1px solid var(--control-border);
  border-radius: 7px;
  background: var(--control-bg);
}

.system-journal-categories button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  height: 26px;
  padding: 0 7px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.system-journal-categories button strong {
  font-size: 10px;
}

.system-journal-categories button[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  background: color-mix(in srgb, var(--accent) 13%, var(--panel));
  color: var(--text);
}

.system-journal-kind {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--soft-panel) 55%, var(--panel));
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.system-journal-kind.is-security {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  background: color-mix(in srgb, var(--accent) 11%, var(--panel));
  color: color-mix(in srgb, var(--accent) 34%, var(--text));
}

.system-journal-action,
.system-journal-details {
  display: block;
  max-width: 34ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-journal-purpose {
  display: grid;
  gap: 2px;
  max-width: 34ch;
  min-width: 0;
}

.system-journal-purpose > strong {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.system-journal-purpose > span {
  color: var(--text);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.system-journal-purpose + .system-journal-details {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.system-journal-details + .system-pill {
  display: inline-flex;
  margin-top: 4px;
  padding: 2px 6px;
  font-size: 10px;
}

@media (max-width: 1100px) {
  .layout.app-shell #mainContent .page-layout .system-journal-toolbar.system-toolbar.table-workspace__filters {
    grid-template-columns: minmax(220px, 1fr) minmax(0, auto) repeat(3, minmax(130px, 0.6fr));
  }
}

@media (max-width: 760px) {
  .layout.app-shell #mainContent .page-layout .system-journal-toolbar.system-toolbar.table-workspace__filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .system-journal-categories {
    width: 100%;
  }

  .system-journal-categories button {
    flex: 1 1 0;
    justify-content: center;
  }

  .system-alert-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .system-alert-row .system-alert-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

.system-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.system-toolbar input,
.system-toolbar select {
  border: 1px solid var(--control-border);
  border-radius: 6px;
  min-height: 36px;
  padding: 0 10px;
  background: var(--control-bg);
  color: var(--text);
}

.system-toolbar input[type="search"] {
  min-width: min(360px, 100%);
}

.system-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

.system-table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

.system-table th,
.system-table td {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.system-table th {
  background: color-mix(in srgb, var(--bg) 44%, var(--panel));
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.system-alert-grid,
.system-card-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.system-alert,
.system-card,
.system-empty-state,
.system-error {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
}

.system-alert {
  display: grid;
  gap: 6px;
}

.system-deadline-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.system-deadline-dialog {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.system-deadline-head,
.system-deadline-head-actions,
.system-deadline-toolbar,
.system-deadline-footer,
.system-deadline-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.system-deadline-head {
  justify-content: space-between;
  min-width: 0;
}

.system-deadline-head > div:first-child {
  min-width: 0;
}

.system-deadline-head p,
.system-deadline-section p,
.system-deadline-confirmation p {
  margin: 0;
  color: var(--muted);
}

.system-deadline-head h2,
.system-deadline-section h3 {
  margin: 0;
  overflow-wrap: anywhere;
}

.system-deadline-head h2 {
  font-size: 1.2rem;
}

.system-deadline-head-actions {
  justify-content: flex-end;
  flex: 0 0 auto;
}

.system-deadline-icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}

.system-deadline-toolbar {
  flex-wrap: wrap;
}

.system-deadline-toolbar input {
  flex: 1 1 280px;
  min-width: 0;
}

.system-deadline-toolbar > span,
.system-deadline-status,
.system-deadline-section > header > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft-panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.system-deadline-status.is-default {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  color: color-mix(in srgb, var(--accent) 48%, var(--text));
}

.system-deadline-status.is-archived {
  border-style: dashed;
  opacity: 0.78;
}

.system-deadline-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.system-deadline-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.system-deadline-table :where(th, td) {
  padding: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  text-align: left;
  vertical-align: top;
}

.system-deadline-table th {
  background: color-mix(in srgb, var(--bg) 44%, var(--panel));
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.system-deadline-table tr[data-system-deadline-row] {
  cursor: pointer;
}

.system-deadline-table tr[data-system-deadline-row]:hover {
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
}

.system-deadline-table td:first-child strong,
.system-deadline-table td:first-child small {
  display: block;
}

.system-deadline-table td:first-child small {
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.system-deadline-row-actions {
  flex-wrap: wrap;
}

.system-deadline-row-actions button {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 12px;
}

.system-deadline-state,
.system-deadline-error,
.system-deadline-confirmation {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel);
}

.system-deadline-error {
  border-color: color-mix(in srgb, var(--red) 55%, var(--line));
  background: color-mix(in srgb, var(--red) 10%, var(--panel));
  color: color-mix(in srgb, var(--red) 42%, var(--text));
}

.system-deadline-error:empty {
  display: none;
}

.system-deadline-back-button {
  justify-self: start;
  min-height: 34px;
  padding: 6px 9px;
}

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

.system-deadline-detail-grid {
  margin: 0;
}

.system-deadline-detail-grid > div {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--soft-panel);
}

.system-deadline-detail-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.system-deadline-detail-grid dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  font-weight: 750;
}

.system-deadline-form {
  display: grid;
  gap: 14px;
}

.system-deadline-form-grid label:not(.system-deadline-default-toggle) {
  display: grid;
  align-content: start;
}

.system-deadline-default-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: var(--control-height);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--soft-panel);
}

.system-deadline-default-toggle input {
  width: 18px;
  height: 18px;
  min-height: 18px;
}

.system-deadline-default-toggle span {
  margin: 0;
  color: var(--text);
}

.system-deadline-section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.system-deadline-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--soft-panel) 76%, var(--panel));
}

.system-deadline-section > header > div {
  min-width: 0;
}

.system-deadline-section > header p {
  margin-top: 3px;
  font-size: 12px;
}

.system-deadline-assigned-list,
.system-deadline-position-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.system-deadline-assigned-list {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.system-deadline-assigned-list span {
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft-panel);
  overflow-wrap: anywhere;
}

.system-deadline-position-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 290px;
  overflow: auto;
}

.system-deadline-position-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--soft-panel);
}

.system-deadline-position-option input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 auto;
}

.system-deadline-position-option span,
.system-deadline-position-option strong,
.system-deadline-position-option small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.system-deadline-position-option small {
  margin-top: 3px;
  color: var(--muted);
}

.system-deadline-footer {
  justify-content: flex-end;
  flex-wrap: wrap;
  padding-top: 4px;
}

.system-deadline-confirmation {
  display: grid;
  gap: 6px;
}

@media (max-width: 760px) {
  .system-header {
    align-items: stretch;
    flex-direction: column;
  }

  .system-deadline-dialog {
    padding: 12px;
  }

  .system-deadline-detail-grid,
  .system-deadline-form-grid,
  .system-deadline-position-list {
    grid-template-columns: 1fr;
  }

  .system-deadline-table {
    min-width: 0;
  }

  .system-deadline-table thead {
    display: none;
  }

  .system-deadline-table :where(tbody, tr, td) {
    display: block;
    width: 100%;
  }

  .system-deadline-table tr {
    padding: 8px;
    border-bottom: 1px solid var(--line);
  }

  .system-deadline-table td {
    display: grid;
    grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
    gap: 8px;
    padding: 7px;
    border: 0;
  }

  .system-deadline-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .system-deadline-table td[colspan] {
    display: block;
  }

  .system-deadline-head {
    align-items: flex-start;
  }

  .system-deadline-head-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .system-deadline-head {
    align-items: stretch;
    flex-direction: column;
  }

  .system-deadline-head-actions {
    width: 100%;
  }

  .system-deadline-head-actions .primary {
    flex: 1 1 auto;
  }

  .system-deadline-toolbar > * {
    width: 100%;
  }

  .system-deadline-footer > button {
    flex: 1 1 140px;
  }
}

.system-alert.is-archived {
  border-style: dashed;
  opacity: 0.76;
}

.system-alert small {
  color: var(--muted);
}

.system-alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.system-alert-actions button {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 12px;
}

.system-alert.is-danger,
.system-pill.is-danger {
  border-color: color-mix(in srgb, var(--red) 58%, var(--line));
  background: color-mix(in srgb, var(--red) 14%, var(--panel));
  color: color-mix(in srgb, var(--red) 72%, var(--text));
}

.system-audit-detail-dialog {
  width: min(980px, 100%);
}

.system-audit-section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 92%, var(--soft-panel));
}

.system-audit-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.system-audit-section :where(h3, h4) {
  margin: 0;
  font-size: 0.9rem;
}

.system-audit-section > header > strong {
  display: inline-grid;
  min-width: 28px;
  min-height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft-panel);
}

.system-audit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px;
}

.system-audit-chips span {
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow-wrap: anywhere;
  background: var(--soft-panel);
  font-size: 0.78rem;
  font-weight: 800;
}

.system-audit-chips .is-empty {
  color: var(--muted);
  font-weight: 650;
}

.system-audit-diff {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.system-audit-diff article {
  min-width: 0;
}

.system-audit-section pre {
  max-width: 100%;
  margin: 0;
  padding: 12px;
  overflow: auto;
  color: var(--text);
  background: color-mix(in srgb, var(--bg) 38%, var(--panel));
  font-size: 0.76rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.system-audit-diff article pre {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

@media (max-width: 680px) {
  .system-audit-diff {
    grid-template-columns: 1fr;
  }
}

.system-alert.is-warning,
.system-pill.is-warning {
  border-color: color-mix(in srgb, var(--yellow) 58%, var(--line));
  background: color-mix(in srgb, var(--yellow) 14%, var(--panel));
  color: color-mix(in srgb, var(--yellow) 72%, var(--text));
}

.system-card span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.system-card strong {
  display: block;
  font-size: 20px;
  margin-top: 4px;
}

.system-error {
  background: color-mix(in srgb, var(--red) 12%, var(--panel));
  border-color: color-mix(in srgb, var(--red) 58%, var(--line));
  color: color-mix(in srgb, var(--red) 72%, var(--text));
}

