/* Calm, project-oriented navigation layer for the desktop management workspace. */
:root {
  --admin-nav: var(--admin-surface);
  --admin-nav-text: var(--admin-text);
}

.admin-shell {
  grid-template-columns: 256px minmax(0, 1fr);
}

.sidebar {
  padding: 28px 16px 20px;
  background: var(--admin-surface);
  color: var(--admin-text);
  border-right: 1px solid var(--admin-border);
}

.brand {
  position: relative;
  padding: 2px 12px 20px 18px;
  border-bottom: 1px solid var(--admin-border-soft, var(--admin-border));
  color: var(--admin-text);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand::before {
  position: absolute;
  top: 4px;
  left: 0;
  width: 4px;
  height: 36px;
  border-radius: 999px;
  background: var(--admin-primary);
  content: "";
}

.brand small,
.side-footer {
  color: var(--admin-muted);
}

.side-nav {
  gap: 6px;
  margin-top: 20px;
}

.side-nav a {
  position: relative;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--admin-muted);
  font-weight: 500;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.side-nav a:hover {
  background: var(--admin-bg);
  color: var(--admin-text);
}

.side-nav a.active {
  border-color: color-mix(in srgb, var(--admin-primary) 14%, var(--admin-border));
  background: var(--admin-primary-soft);
  color: var(--admin-primary);
  font-weight: 650;
}

.side-nav a.active::before {
  position: absolute;
  left: -9px;
  width: 3px;
  height: 22px;
  border-radius: 999px;
  background: var(--admin-primary);
  content: "";
}

.side-footer {
  padding: 18px 12px 0;
  border-top: 1px solid var(--admin-border-soft, var(--admin-border));
  line-height: var(--admin-leading-relaxed);
}

.topbar {
  height: 72px;
  padding: 0 36px;
  background: color-mix(in srgb, var(--admin-surface) 92%, var(--admin-bg));
}

.project-picker {
  font-size: 15px;
  letter-spacing: 0;
}

.utility button {
  border-color: var(--admin-border-soft, var(--admin-border));
  background: var(--admin-surface);
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.utility button:hover {
  border-color: color-mix(in srgb, var(--admin-primary) 30%, var(--admin-border));
  background: var(--admin-primary-soft);
  color: var(--admin-primary);
}

@media (max-width: 1180px) {
  body { min-width: 960px; }
  .admin-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .topbar, .main { padding-left: 24px; padding-right: 24px; }
}

/* Knowledge-library page: one reading surface with a quiet, functional index. */
.category-panel { align-self: start; padding: 0 18px 0 0; border-right: 1px solid var(--admin-border-soft, var(--admin-border)); box-shadow: none; }
.category-heading { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 12px 12px; border-bottom: 1px solid var(--admin-border-soft, var(--admin-border)); }
.category-heading h2 { margin: 0; font-size: 13px; font-weight: 650; }
.category-heading span { color: var(--admin-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.folder-list { padding-top: 8px; }
.folder-list button { display: flex; width: 100%; min-height: 42px; align-items: center; justify-content: space-between; padding: 0 12px; border: 0; border-radius: var(--admin-radius); background: transparent; color: var(--admin-muted); text-align: left; }
.folder-list button:hover { background: var(--admin-bg); color: var(--admin-text); }
.folder-list button.active { background: var(--admin-primary-soft); color: var(--admin-primary); font-weight: 650; }
.folder-list button span { color: inherit; font-size: 12px; font-variant-numeric: tabular-nums; }
.knowledge-table-card { overflow: hidden; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); box-shadow: none; }
.knowledge-head { align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--admin-border-soft, var(--admin-border)); }
.knowledge-head h2 { margin: 0; }
.knowledge-head p { margin: 4px 0 0; color: var(--admin-muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }
.knowledge-table-card .table { min-width: 860px; }
.knowledge-table-card .table th { background: var(--admin-bg); color: var(--admin-muted); font-size: 12px; font-weight: 600; }
.knowledge-table-card .table td { padding-top: 18px; padding-bottom: 18px; border-bottom-color: var(--admin-border-soft, var(--admin-border)); }
.knowledge-table-card .table tbody tr { transition: background-color 140ms ease; }
.knowledge-table-card .table tbody tr:hover { background: var(--admin-primary-soft); }
.knowledge-table-card .table td:first-child { min-width: 320px; }
.knowledge-table-card .table small { display: block; margin-top: 4px; color: var(--admin-muted); font-size: 12px; }
.knowledge-table-card .knowledge-file-cell { min-width: 220px; }
.file-listing { display: flex; min-width: 0; align-items: center; gap: 8px; white-space: nowrap; }
.file-listing-name { min-width: 0; overflow: hidden; color: var(--admin-text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-status-cell { white-space: nowrap; }
.knowledge-status-cell .status { display: inline-flex; min-height: 26px; align-items: center; padding: 0 9px; white-space: nowrap; }
.knowledge-table-card .text-button { min-height: 34px; padding: 0 8px; }
.knowledge-actions { white-space: nowrap; }
.knowledge-actions .text-button + .text-button { margin-left: 2px; }
.file-chip { display: inline-flex; min-height: 22px; align-items: center; padding: 0 6px; border: 1px solid var(--admin-border); border-radius: 5px; background: var(--admin-bg); color: var(--admin-primary); font-size: 10px; font-weight: 700; line-height: 1; letter-spacing: .04em; }
.knowledge-file-field { display: grid; min-width: 0; gap: 14px; padding: 16px; border: 1px solid var(--admin-border); border-radius: 10px; background: color-mix(in srgb, var(--admin-bg) 58%, var(--admin-surface)); }
.file-field-head { display: flex; align-items: flex-start; gap: 11px; }.file-field-head strong { display: block; color: var(--admin-text); font-size: 14px; line-height: var(--admin-leading-tight); }.file-field-head p { margin: 4px 0 0; color: var(--admin-muted); font-size: 12px; font-weight: 400; line-height: var(--admin-leading-body); }
.file-field-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border: 1px solid #d6c8ef; border-radius: 8px; background: var(--admin-primary-soft); color: #5d3e91; }.file-field-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.file-current { display: flex; min-width: 0; align-items: center; gap: 9px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--admin-border-soft); border-radius: 8px; background: var(--admin-surface); }.file-type-mark { display: inline-grid; min-width: 31px; height: 25px; flex: 0 0 auto; place-items: center; padding: 0 5px; border-radius: 5px; background: #f0eafb; color: #5d3e91; font-size: 10px; font-weight: 750; letter-spacing: .04em; }.file-current-name { min-width: 0; overflow: hidden; color: var(--admin-text); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }.file-current-status { display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 22px; padding: 0 7px; border-radius: 999px; background: #e6f4ec; color: #126943; font-size: 11px; font-weight: 650; white-space: nowrap; }
@media (max-width: 480px) { .file-current { gap: 7px; padding: 8px; }.file-current-status { padding: 0 6px; font-size: 10px; } }
.file-select-row { display: flex; min-width: 0; align-items: center; gap: 10px; }.file-select-button { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; padding: 0 11px; border: 1px solid #cdbce8; border-radius: 7px; background: var(--admin-surface); color: #5d3e91; cursor: pointer; font-size: 12px; font-weight: 650; transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease; }.file-select-button:hover { border-color: #aa8fdb; background: var(--admin-primary-soft); }.file-select-button:focus-visible { outline: 3px solid rgba(118, 82, 180, .28); outline-offset: 2px; }.selected-file { min-width: 0; color: var(--admin-muted); font-size: 12px; font-weight: 400; line-height: var(--admin-leading-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.file-input-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.knowledge-reader { width: min(560px, calc(100vw - 32px)); border: 0; border-radius: 12px; color: var(--admin-text); box-shadow: 0 20px 64px rgba(23, 32, 51, .22); }
.knowledge-reader::backdrop { background: rgba(23, 32, 51, .36); }
.reader-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 24px 18px; border-bottom: 1px solid var(--admin-border-soft); }
.reader-head p { margin: 0 0 5px; color: var(--admin-primary); font-size: 12px; font-weight: 700; letter-spacing: .06em; }.reader-head h2 { margin: 0; font-size: 20px; }.reader-body { display: grid; gap: 16px; padding: 22px 24px; }.reader-body p { margin: 0; color: var(--admin-muted); line-height: var(--admin-leading-relaxed); }.reader-body dl { display: grid; gap: 10px; margin: 0; }.reader-body dl div { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding-top: 10px; border-top: 1px solid var(--admin-border-soft); }.reader-body dt { color: var(--admin-muted); font-size: 12px; }.reader-body dd { margin: 0; color: var(--admin-text); font-size: 13px; word-break: break-all; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.knowledge-tools { display: flex; align-items: center; gap: 12px; }
.knowledge-search input { width: 230px; min-height: 38px; padding: 0 11px; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); color: var(--admin-text); }
.knowledge-search input:focus-visible { border-color: var(--admin-primary); }
.knowledge-search input::placeholder { color: var(--admin-muted); }
.knowledge-empty td { padding: 34px 16px !important; color: var(--admin-muted); text-align: center; }
.knowledge-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; border: 0; border-radius: 12px; box-shadow: 0 20px 64px rgba(23, 32, 51, .22); color: var(--admin-text); }
.knowledge-dialog::backdrop { background: rgba(23, 32, 51, .36); }
.knowledge-dialog form { display: grid; min-width: 0; max-height: calc(100dvh - 32px); gap: 18px; padding: 24px; overflow-y: auto; overflow-x: hidden; }
.knowledge-dialog .dialog-head { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--admin-border-soft); margin-bottom: 2px; }
.dialog-head h2 { margin: 0; font-size: 20px; font-weight: 700; color: var(--admin-text); }
.dialog-head p { margin: 4px 0 0; color: var(--admin-muted); font-size: 13px; line-height: 1.5; }
.icon-close { width: 36px; height: 36px; border: 0; border-radius: 7px; background: transparent; color: var(--admin-muted); font-size: 24px; line-height: 1; }
.icon-close:hover { background: var(--admin-bg); color: var(--admin-text); }
.knowledge-dialog label { display: grid; gap: 7px; color: var(--admin-text); font-weight: 600; }
.knowledge-dialog input, .knowledge-dialog select, .knowledge-dialog textarea { width: 100%; min-width: 0; min-height: 42px; padding: 0 11px; border: 1px solid var(--admin-border); border-radius: 7px; background: var(--admin-surface); color: var(--admin-text); font: inherit; }
.knowledge-dialog textarea { min-height: 88px; padding-top: 10px; line-height: 1.5; resize: vertical; }
.knowledge-dialog input:focus-visible, .knowledge-dialog select:focus-visible, .knowledge-dialog textarea:focus-visible { border-color: var(--admin-primary); outline: 3px solid color-mix(in srgb, var(--admin-primary) 20%, transparent); }
.knowledge-row-updated { animation: knowledge-row-update 1.4s ease-out; }
@keyframes knowledge-row-update { 0% { background: var(--admin-primary-soft); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .knowledge-row-updated { animation: none; background: var(--admin-primary-soft); } }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.personnel-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 20px; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); box-shadow: var(--admin-shadow); }
.personnel-summary div { display: grid; gap: 6px; padding: 18px 24px; border-right: 1px solid var(--admin-border-soft); }
.personnel-summary div:last-child { border-right: 0; }
.personnel-summary span { color: var(--admin-muted); font-size: 13px; }
.personnel-summary strong { font-size: 26px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.personnel-summary .personnel-warn { color: var(--admin-warning); }
.personnel-workspace { overflow: hidden; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); box-shadow: var(--admin-shadow); }
.personnel-tools { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--admin-border-soft); }
.personnel-tools h2 { margin: 0; font-size: 18px; }
.personnel-tools p { margin: 4px 0 0; color: var(--admin-muted); font-size: 13px; }
.personnel-controls { display: flex; align-items: center; gap: 10px; }
.personnel-search input, .personnel-controls select { min-height: 38px; padding: 0 11px; border: 1px solid var(--admin-border); border-radius: 7px; background: var(--admin-surface); color: var(--admin-text); }
.personnel-search input { width: 218px; }
.personnel-search input:focus-visible, .personnel-controls select:focus-visible { border-color: var(--admin-primary); outline: 3px solid color-mix(in srgb, var(--admin-primary) 20%, transparent); }
.personnel-table { min-width: 920px; }
.personnel-table td { padding-top: 17px; padding-bottom: 17px; }
.personnel-table small { display: block; margin-top: 4px; color: var(--admin-muted); font-size: 12px; }
.personnel-empty td { padding: 34px 16px !important; color: var(--admin-muted); text-align: center; }
.task-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 150px)) 1fr; align-items: center; min-height: 96px; margin: 0 0 20px; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); box-shadow: var(--admin-shadow); }
.task-summary div { display: grid; gap: 5px; padding: 18px 24px; border-right: 1px solid var(--admin-border-soft); }
.task-summary span { color: var(--admin-muted); font-size: 13px; }
.task-summary strong { color: var(--admin-text); font-size: 25px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.task-summary .task-doing { color: var(--admin-primary); }.task-summary .task-warn { color: var(--admin-warning); }
.task-summary p { margin: 0; padding: 0 26px; color: var(--admin-muted); font-size: 13px; }
.task-workspace { overflow: hidden; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); box-shadow: var(--admin-shadow); }
.task-tools { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--admin-border-soft); }
.task-tools h2 { margin: 0; font-size: 18px; }.task-tools p, .task-dialog .dialog-head p { margin: 4px 0 0; color: var(--admin-muted); font-size: 13px; }
.task-controls { display: flex; align-items: center; gap: 10px; }.task-search input { width: 245px; min-height: 38px; padding: 0 11px; border: 1px solid var(--admin-border); border-radius: 7px; background: var(--admin-surface); color: var(--admin-text); }
.task-search input:focus-visible { border-color: var(--admin-primary); outline: 3px solid color-mix(in srgb, var(--admin-primary) 20%, transparent); }.task-table { min-width: 940px; }.task-table td { padding-top: 17px; padding-bottom: 17px; }.task-table small { display: block; margin-top: 4px; color: var(--admin-muted); font-size: 12px; }.task-empty td { padding: 34px 16px !important; color: var(--admin-muted); text-align: center; }
.task-dialog { width: min(620px, calc(100vw - 32px)); }.task-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }.task-form-grid label { display: grid; gap: 7px; color: var(--admin-text); font-weight: 600; }.task-form-grid input, .task-form-grid select { min-height: 42px; padding: 0 11px; border: 1px solid var(--admin-border); border-radius: 7px; background: var(--admin-surface); color: var(--admin-text); }.task-form-full { grid-column: 1 / -1; }
@media (max-width: 760px) { .knowledge-head { align-items: flex-start; } .knowledge-tools { width: 100%; } .knowledge-search { flex: 1; } .knowledge-search input { width: 100%; } }

@media (max-width: 800px) {
  body { min-width: 0; }
  .admin-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 16px; border-right: 0; border-bottom: 1px solid var(--admin-border); }
  .brand { padding: 0 0 12px 14px; }
  .side-nav { display: flex; gap: 4px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; }
  .side-nav a { flex: 0 0 auto; min-height: 38px; padding: 0 10px; font-size: 13px; }
  .side-nav a.active::before { display: none; }
  .side-footer { display: none; }
  .topbar { height: auto; min-height: 58px; flex-wrap: wrap; gap: 8px 14px; padding: 12px 16px; }
  .crumb { width: 100%; font-size: 12px; }
  .project-picker { margin-right: auto; font-size: 13px; }
  .main { padding: 24px 16px 36px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 16px; }
  .page-head .primary { width: 100%; }
  .knowledge-layout { grid-template-columns: 1fr; }
   .category-panel { padding: 0 0 12px; border-right: 0; border-bottom: 1px solid var(--admin-border-soft, var(--admin-border)); }
   .category-heading { padding: 0 0 10px; }
   .folder-list { display: flex; gap: 6px; overflow-x: auto; }
  .folder-list button { flex: 0 0 auto; width: auto; min-height: 38px; }
  .category-panel .card-head { padding-bottom: 8px; }
  .knowledge-head { padding: 18px 16px; }
  .knowledge-tools { flex-wrap: wrap; gap: 8px; }
   .knowledge-search { min-width: 100%; }
   .personnel-summary { grid-template-columns: 1fr; }
   .personnel-summary div { border-right: 0; border-bottom: 1px solid var(--admin-border-soft); }
   .personnel-summary div:last-child { border-bottom: 0; }
   .personnel-tools { align-items: flex-start; flex-direction: column; padding: 18px 16px; }
   .personnel-controls { width: 100%; flex-wrap: wrap; }
   .personnel-search { flex: 1 1 100%; }
    .personnel-search input { width: 100%; }
    .task-summary { grid-template-columns: repeat(3, 1fr); }.task-summary p { display: none; }.task-summary div { padding: 16px; }.task-tools { align-items: flex-start; flex-direction: column; padding: 18px 16px; }.task-controls { width: 100%; }.task-search { flex: 1; }.task-search input { width: 100%; }
    .task-form-grid { grid-template-columns: 1fr; }.task-form-full { grid-column: auto; }
}

/* Issue closure: a continuous corrective-action workspace rather than disconnected cards. */
.issue-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 20px; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); box-shadow: var(--admin-shadow); }
.issue-metrics div { display: grid; gap: 4px; padding: 17px 22px; border-right: 1px solid var(--admin-border-soft); }.issue-metrics div:last-child { border-right: 0; }.issue-metrics span, .issue-metrics small { color: var(--admin-muted); font-size: 12px; }.issue-metrics strong { font-size: 25px; line-height: 1.1; font-variant-numeric: tabular-nums; }.issue-metrics div:nth-child(1) strong { color: var(--admin-danger); }.issue-metrics div:nth-child(2) strong { color: var(--admin-primary); }.issue-metrics div:nth-child(3) strong { color: var(--admin-success); }
.issue-workbench { display: grid; grid-template-columns: 300px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); box-shadow: var(--admin-shadow); }.issue-index { padding: 20px 14px; border-right: 1px solid var(--admin-border-soft); background: color-mix(in srgb, var(--admin-surface) 86%, var(--admin-bg)); }.issue-index-head, .issue-detail-head, .issue-form-footer, .review-assignment, .review-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }.issue-index h2, .issue-detail h2, .section-label h3, .issue-timeline h3 { margin: 0; }.issue-index p, .issue-detail-head p, .section-label p { margin: 4px 0 0; color: var(--admin-muted); font-size: 12px; }.issue-filter-row { display: flex; gap: 6px; margin: 18px 0 10px; }.issue-filter-row button { min-height: 32px; padding: 0 9px; border: 1px solid var(--admin-border); border-radius: 7px; background: var(--admin-surface); color: var(--admin-muted); font-size: 12px; }.issue-filter-row button[aria-pressed="true"] { border-color: #d6c8ef; background: var(--admin-primary-soft); color: var(--admin-primary); font-weight: 650; }.issue-list { display: grid; gap: 7px; }.issue-item { display: grid; width: 100%; gap: 7px; padding: 13px 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--admin-text); text-align: left; }.issue-item:hover { background: var(--admin-surface); border-color: var(--admin-border); }.issue-item.active { background: var(--admin-primary-soft); border-color: #d6c8ef; }.issue-item strong { font-size: 13px; line-height: 1.35; }.issue-item small { color: var(--admin-muted); font-size: 11px; }.issue-item .status { justify-self: start; }.issue-list-empty { padding: 20px 10px; color: var(--admin-muted); font-size: 12px; text-align: center; }
.issue-detail { min-width: 0; }.issue-detail-head { padding: 24px 28px; border-bottom: 1px solid var(--admin-border-soft); }.issue-code { display: flex; align-items: center; gap: 9px; color: var(--admin-muted); font-size: 12px; font-variant-numeric: tabular-nums; }.issue-detail h2 { margin-top: 8px; font-size: 21px; letter-spacing: 0; }.issue-stepper { display: grid; grid-template-columns: repeat(4, 1fr); padding: 18px 28px; border-bottom: 1px solid var(--admin-border-soft); }.issue-stepper div { display: flex; align-items: center; gap: 8px; color: var(--admin-muted); font-size: 12px; }.issue-stepper span { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid var(--admin-border); border-radius: 50%; background: var(--admin-surface); font-size: 11px; font-weight: 650; }.issue-stepper .done, .issue-stepper .active { color: var(--admin-primary); font-weight: 650; }.issue-stepper .done span { border-color: var(--admin-success); background: var(--admin-success); color: #fff; }.issue-stepper .active span { border-color: var(--admin-primary); background: var(--admin-primary-soft); }
.issue-plan, .review-panel, .issue-timeline { padding: 24px 28px; border-bottom: 1px solid var(--admin-border-soft); }.issue-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 18px; }.issue-form-grid label, .review-comment { display: grid; gap: 7px; color: var(--admin-text); font-size: 13px; font-weight: 650; }.issue-form-grid .full { grid-column: 1 / -1; }.issue-form-grid input, .issue-form-grid select, .issue-form-grid textarea, .review-comment textarea { min-height: 42px; padding: 10px 11px; border: 1px solid var(--admin-border); border-radius: 7px; background: var(--admin-surface); color: var(--admin-text); font: inherit; font-weight: 400; line-height: 1.5; }.issue-form-grid textarea, .review-comment textarea { min-height: 78px; resize: vertical; }.issue-form-grid :is(input, select, textarea):focus-visible, .review-comment textarea:focus-visible { border-color: var(--admin-primary); outline: 3px solid color-mix(in srgb, var(--admin-primary) 20%, transparent); }.issue-form-footer { margin-top: 17px; }.form-note { color: var(--admin-muted); font-size: 12px; }.review-panel { background: color-mix(in srgb, var(--admin-primary-soft) 28%, var(--admin-surface)); }.review-assignment { padding: 14px 16px; margin: 18px 0; border: 1px solid #dfd4f0; border-radius: 8px; background: var(--admin-surface); }.review-assignment div { display: grid; gap: 2px; }.review-assignment span:first-child, .review-assignment small { color: var(--admin-muted); font-size: 12px; }.review-assignment strong { font-size: 14px; }.review-comment { margin-bottom: 14px; }.review-actions { justify-content: flex-end; }.review-actions button[disabled] { cursor: not-allowed; opacity: .48; }.issue-timeline { border-bottom: 0; }.issue-timeline ol { display: grid; gap: 15px; padding: 0; margin: 18px 0 0; list-style: none; }.issue-timeline li { display: grid; grid-template-columns: 48px 1fr; gap: 14px; }.issue-timeline time { color: var(--admin-muted); font-size: 12px; font-variant-numeric: tabular-nums; }.issue-timeline strong { font-size: 13px; }.issue-timeline p { margin: 3px 0 0; color: var(--admin-muted); font-size: 12px; }
@media (max-width: 960px) { .issue-workbench { grid-template-columns: 1fr; }.issue-index { border-right: 0; border-bottom: 1px solid var(--admin-border-soft); }.issue-list { grid-template-columns: repeat(3, minmax(220px, 1fr)); overflow-x: auto; }.issue-item { min-height: 112px; }.issue-stepper { padding: 16px; }.issue-detail-head, .issue-plan, .review-panel, .issue-timeline { padding-left: 18px; padding-right: 18px; } }
@media (max-width: 640px) { .issue-metrics { grid-template-columns: 1fr; }.issue-metrics div { border-right: 0; border-bottom: 1px solid var(--admin-border-soft); }.issue-metrics div:last-child { border-bottom: 0; }.issue-detail-head, .issue-form-footer { align-items: flex-start; flex-direction: column; }.issue-stepper { overflow-x: auto; grid-template-columns: repeat(4, 130px); }.issue-form-grid { grid-template-columns: 1fr; }.issue-form-grid .full { grid-column: auto; }.issue-form-footer .primary { width: 100%; }.review-actions { width: 100%; }.review-actions button { flex: 1; }.issue-list { grid-template-columns: repeat(3, 250px); } }

/* Waterworks workspace refresh: pale lavender surfaces, one restrained violet action signal. */
:root {
  --admin-bg: #f5f2fa;
  --admin-surface: #ffffff;
  --admin-text: #29243a;
  --admin-muted: #706a80;
  --admin-border: #ddd7e8;
  --admin-border-soft: #ece8f2;
  --admin-primary: #7652b4;
  --admin-primary-soft: #eee8fa;
  --admin-success: #287a59;
  --admin-warning: #a66a12;
  --admin-danger: #b64a58;
  --admin-nav: #fbfaff;
  --admin-nav-text: #29243a;
  --admin-shadow: 0 14px 34px rgba(41, 36, 58, .06);
}

body { background: var(--admin-bg); }
.sidebar { background: var(--admin-nav); border-right-color: var(--admin-border); }
.brand::before { background: var(--admin-primary); }
.side-nav a { gap: 11px; color: var(--admin-muted); }
.side-nav a:hover { background: #f0ecf7; color: var(--admin-text); }
.side-nav a.active { border-color: #d6c8ef; background: var(--admin-primary-soft); color: #5d3e91; }
.side-nav a.active::before { background: var(--admin-primary); }
.side-nav .nav-icon { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.topbar { background: color-mix(in srgb, var(--admin-surface) 88%, var(--admin-bg)); }
.utility button { color: var(--admin-muted); }
.utility button:hover { border-color: #cdbce8; background: var(--admin-primary-soft); color: var(--admin-primary); }
.utility-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.primary { background: var(--admin-primary); box-shadow: 0 6px 14px rgba(118, 82, 180, .16); }
.primary:hover { background: #62419d; }
.card, .knowledge-table-card { border-color: var(--admin-border); box-shadow: var(--admin-shadow); }
.status.doing { background: #eee8fa; color: #5d3e91; }
.status.done { background: #e6f4ec; color: #126943; }
.status.warn { background: #fff3dc; color: #8d5300; }
.status.danger { background: #fae8e8; color: #9e3232; }
.avatar { background: #e8def7; color: #5d3e91; }

/* Dashboard task entry: a specific destination action, not a generic filled button. */
[data-od-id="admin-dashboard"] .page-head > a[href="admin-tasks.html"] { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; padding: 0 14px 0 13px; border: 1px solid #d6c8ef; border-radius: 9px; background: #fff; box-shadow: 0 2px 7px rgba(41, 36, 58, .05); color: #513683; font-size: 14px; font-weight: 650; letter-spacing: 0; line-height: 1; text-decoration: none; transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
[data-od-id="admin-dashboard"] .page-head > a[href="admin-tasks.html"]::before { width: 18px; height: 18px; flex: 0 0 18px; background: currentColor; content: ""; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 4h8M9 3h6v3H9zM7 7h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2Zm2 6h6m-6 4h4' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
[data-od-id="admin-dashboard"] .page-head > a[href="admin-tasks.html"]::after { margin-left: 2px; color: currentColor; content: "→"; font-size: 18px; font-weight: 400; }
[data-od-id="admin-dashboard"] .page-head > a[href="admin-tasks.html"]:hover { border-color: #aa8fdb; background: #f7f3fd; box-shadow: 0 7px 18px rgba(81, 54, 131, .10); color: #432a70; transform: translateY(-1px); }
[data-od-id="admin-dashboard"] .page-head > a[href="admin-tasks.html"]:active { background: #eee8fa; box-shadow: none; transform: translateY(0); }
[data-od-id="admin-dashboard"] .page-head > a[href="admin-tasks.html"]:focus-visible { outline: 3px solid rgba(118, 82, 180, .28); outline-offset: 3px; }

@media (max-width: 800px) {
  .side-nav .nav-icon { width: 16px; height: 16px; flex-basis: 16px; }
  [data-od-id="admin-dashboard"] .page-head > a[href="admin-tasks.html"] { width: 100%; justify-content: center; }
}

/* Project actions: one compact language for create, register, export, and maintain. */
:is([data-od-id="add-task"], [data-od-id="add-knowledge"], [data-od-id="add-personnel"], [data-od-id="admin-issues"] .page-head > button, [data-od-id="admin-reviews"] .page-head > button) {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 15px;
  border-radius: 9px;
  font-family: var(--admin-font-sans);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

:is([data-od-id="add-task"], [data-od-id="add-knowledge"], [data-od-id="add-personnel"], [data-od-id="admin-issues"] .page-head > button)::before,
[data-od-id="admin-reviews"] .page-head > button::before {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: currentColor;
  content: "";
}

[data-od-id="add-task"]::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 4h8M9 3h6v3H9zM7 7h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2Zm2 6h6m-6 4h4' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
[data-od-id="admin-issues"] .page-head > button::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='12' r='8.5' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
}
[data-od-id="admin-reviews"] .page-head > button::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v12m0 0 4-4m-4 4-4-4M5 19h14' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
[data-od-id="add-knowledge"]::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 4h9l4 4v12H5zM14 4v5h5M8 14h6m-3-3v6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
[data-od-id="add-personnel"]::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='9' cy='7' r='3.5' fill='none' stroke='black' stroke-width='1.8'/%3E%3Cpath d='M3 20a6 6 0 0 1 12 0m4-8v6m-3-3h6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

[data-od-id="admin-issues"] .page-head > button {
  border-color: #d7c9ed;
  background: var(--admin-primary-soft);
  box-shadow: none;
  color: #5d3e91;
}
[data-od-id="admin-reviews"] .page-head > button {
  border: 1px solid var(--admin-border);
  background: var(--admin-surface);
  box-shadow: none;
  color: var(--admin-text);
}
:is([data-od-id="add-task"], [data-od-id="add-knowledge"], [data-od-id="add-personnel"]):hover {
  box-shadow: 0 9px 18px rgba(81, 54, 131, .16);
  transform: translateY(-1px);
}
[data-od-id="admin-issues"] .page-head > button:hover {
  border-color: #bca7dc;
  background: #e8dff7;
  color: #513683;
}
[data-od-id="admin-reviews"] .page-head > button:hover {
  border-color: #c9b8e6;
  background: #f8f5fc;
  color: #513683;
}
:is([data-od-id="add-task"], [data-od-id="add-knowledge"], [data-od-id="add-personnel"], [data-od-id="admin-issues"] .page-head > button, [data-od-id="admin-reviews"] .page-head > button):active {
  box-shadow: none;
  transform: translateY(0);
}
:is([data-od-id="add-task"], [data-od-id="add-knowledge"], [data-od-id="add-personnel"], [data-od-id="admin-issues"] .page-head > button, [data-od-id="admin-reviews"] .page-head > button):focus-visible {
  outline: 3px solid rgba(118, 82, 180, .28);
  outline-offset: 3px;
}

@media (max-width: 800px) {
  :is([data-od-id="add-task"], [data-od-id="add-knowledge"], [data-od-id="add-personnel"], [data-od-id="admin-issues"] .page-head > button, [data-od-id="admin-reviews"] .page-head > button) { width: 100%; }
}

/* Closure evidence: each action is a durable, material-backed project record. */
.evidence-staging { padding: 15px 16px; border: 1px dashed #cfc3e4; border-radius: 9px; background: #faf8fd; }
.evidence-staging-head, .timeline-head, .record-composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.evidence-staging-head strong { display: block; font-size: 13px; }
.evidence-staging-head small, .timeline-head p, .record-file-summary { color: var(--admin-muted); font-size: 12px; }
.evidence-add { display: inline-flex; min-height: 34px; align-items: center; padding: 0 10px; border: 1px solid #d6c8ef; border-radius: 7px; background: var(--admin-surface); color: #5d3e91; cursor: pointer; font-size: 12px; font-weight: 650; }
.evidence-add:hover { border-color: #aa8fdb; background: var(--admin-primary-soft); }
.evidence-add:focus-within { outline: 3px solid rgba(118, 82, 180, .28); outline-offset: 2px; }
.evidence-staging-list, .record-attachments { display: grid; gap: 7px; padding: 0; margin: 13px 0 0; list-style: none; }
.evidence-staging-list li { display: flex; min-height: 32px; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--admin-border-soft); font-size: 12px; }
.evidence-staging-list li:first-child { border-top: 0; }
.evidence-empty { color: var(--admin-muted); }
.evidence-kind { padding: 2px 6px; border-radius: 999px; font-size: 11px; font-weight: 650; }
.evidence-kind-image { background: #e8effb; color: #365f9d; }.evidence-kind-video { background: #eee8fa; color: #5d3e91; }.evidence-kind-file { background: #f2eee6; color: #745b32; }
.evidence-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evidence-staging-list button { border: 0; background: transparent; color: var(--admin-danger); cursor: pointer; font-size: 12px; }
.timeline-head { align-items: flex-start; }
.timeline-count { flex: 0 0 auto; color: var(--admin-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.issue-timeline .timeline-entry { min-width: 0; padding: 0 0 16px; border-bottom: 1px solid var(--admin-border-soft); }
.issue-timeline li:last-child .timeline-entry { padding-bottom: 0; border-bottom: 0; }
.timeline-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.timeline-entry-head strong { font-size: 13px; }.timeline-entry-head span { flex: 0 0 auto; padding: 3px 7px; border-radius: 999px; background: var(--admin-primary-soft); color: #5d3e91; font-size: 11px; font-weight: 650; }
.record-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; color: var(--admin-muted); font-size: 11px; }
.record-attachments { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }.record-attachments li { overflow: hidden; padding: 8px 10px; border: 1px solid var(--admin-border); border-radius: 7px; background: var(--admin-bg); color: var(--admin-text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.record-composer { display: grid; gap: 12px; margin-top: 22px; padding: 16px; border: 1px solid var(--admin-border); border-radius: 9px; background: var(--admin-bg); }.record-composer > label { display: grid; gap: 7px; font-size: 13px; font-weight: 650; }.record-composer textarea { min-height: 76px; padding: 10px 11px; border: 1px solid var(--admin-border); border-radius: 7px; background: var(--admin-surface); color: var(--admin-text); font: inherit; line-height: 1.5; resize: vertical; }.record-composer textarea:focus-visible { border-color: var(--admin-primary); outline: 3px solid rgba(118, 82, 180, .20); }
@media (max-width: 640px) { .evidence-staging-head, .timeline-head, .record-composer-footer { align-items: flex-start; flex-direction: column; }.record-composer-footer { width: 100%; }.record-composer-footer .secondary { width: 100%; }.timeline-count { margin-top: -8px; }.record-attachments { grid-template-columns: 1fr; } }

/* Closure trace: a staged audit trail, not a generic vertical activity feed. */
.process-kicker { display: block; margin-bottom: 6px; color: var(--admin-primary); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.process-rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 24px 0 4px; border: 1px solid var(--admin-border); border-radius: 10px; background: var(--admin-bg); overflow: hidden; }
.process-stage { position: relative; display: grid; grid-template-columns: 28px 1fr; column-gap: 9px; padding: 14px; border-right: 1px solid var(--admin-border); color: var(--admin-muted); }
.process-stage:last-child { border-right: 0; }.process-stage span { grid-row: span 2; display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid var(--admin-border); border-radius: 50%; background: var(--admin-surface); color: inherit; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }.process-stage strong { align-self: end; color: var(--admin-text); font-size: 12px; line-height: 1.2; }.process-stage small { margin-top: 3px; color: inherit; font-size: 11px; }.process-stage.is-complete { background: #eef7f2; color: var(--admin-success); }.process-stage.is-complete span { border-color: var(--admin-success); background: var(--admin-success); color: #fff; }.process-stage.is-current { background: var(--admin-primary-soft); color: #5d3e91; }.process-stage.is-current span { border-color: var(--admin-primary); color: var(--admin-primary); }
.process-trace { position: relative; display: grid; gap: 0; padding: 4px 0 0; margin: 22px 0 0; list-style: none; }.process-trace::before { position: absolute; top: 18px; bottom: 18px; left: 64px; width: 1px; background: var(--admin-border); content: ""; }.process-trace li { position: relative; grid-template-columns: 50px 1fr; gap: 18px; padding-bottom: 18px; }.process-trace li::before { position: absolute; top: 7px; left: 59px; width: 11px; height: 11px; border: 3px solid var(--admin-surface); border-radius: 50%; background: var(--admin-primary); box-shadow: 0 0 0 1px var(--admin-primary); content: ""; }.process-trace li[data-record-phase="register"]::before { background: var(--admin-success); box-shadow: 0 0 0 1px var(--admin-success); }.process-trace li[data-record-phase="review"]::before { background: var(--admin-warning); box-shadow: 0 0 0 1px var(--admin-warning); }.process-trace li[data-record-phase="push"]::before { background: var(--admin-success); box-shadow: 0 0 0 1px var(--admin-success); }.process-trace .timeline-entry { padding: 13px 15px 16px; border: 1px solid var(--admin-border-soft); border-radius: 9px; background: var(--admin-surface); }.process-trace .timeline-entry::before { display: none; }.process-trace li:last-child .timeline-entry { border-bottom: 1px solid var(--admin-border-soft); }
@media (max-width: 760px) { .process-rail { grid-template-columns: 1fr 1fr; }.process-stage:nth-child(2) { border-right: 0; }.process-stage:nth-child(-n+2) { border-bottom: 1px solid var(--admin-border); }.process-trace::before { left: 58px; }.process-trace li::before { left: 53px; } }
@media (max-width: 480px) { .process-stage { padding: 12px 10px; }.process-stage strong { font-size: 11px; }.process-trace li { grid-template-columns: 44px 1fr; gap: 14px; }.process-trace::before { left: 50px; }.process-trace li::before { left: 45px; } }

/* Ledger: period-based project evidence, arranged as one continuous accounting workspace. */
.ledger-filter { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 18px; padding: 17px 20px; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); box-shadow: var(--admin-shadow); }
.ledger-filter-label h2 { margin: 0; font-size: 16px; }
.ledger-filter-label .process-kicker { margin-bottom: 3px; }
.ledger-filter-controls { display: flex; align-items: end; gap: 10px; }
.ledger-filter-controls label { display: grid; gap: 5px; color: var(--admin-muted); font-size: 12px; }
.ledger-filter-controls select { min-height: 38px; min-width: 116px; padding: 0 10px; border: 1px solid var(--admin-border); border-radius: 7px; background: var(--admin-surface); color: var(--admin-text); font: inherit; }
.ledger-filter-controls select:focus-visible { border-color: var(--admin-primary); outline: 3px solid color-mix(in srgb, var(--admin-primary) 20%, transparent); }
.ledger-period-note { display: inline-flex; min-height: 38px; align-items: center; padding: 0 11px; border-radius: 7px; background: var(--admin-primary-soft); color: #5d3e91; font-size: 12px; font-weight: 650; white-space: nowrap; }
.ledger-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); box-shadow: var(--admin-shadow); }
.ledger-summary div { display: grid; gap: 5px; padding: 18px 22px; border-right: 1px solid var(--admin-border-soft); }
.ledger-summary div:last-child { border-right: 0; }
.ledger-summary span, .ledger-summary small { color: var(--admin-muted); font-size: 12px; }
.ledger-summary strong { color: var(--admin-text); font-size: 26px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.ledger-summary div:nth-child(2) strong { color: var(--admin-success); }
.ledger-summary div:nth-child(3) strong { color: var(--admin-warning); }
.ledger-summary b { color: var(--admin-text); font-weight: 650; }
.ledger-workspace { display: grid; grid-template-columns: 248px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); box-shadow: var(--admin-shadow); }
.ledger-directory { padding: 20px 14px; border-right: 1px solid var(--admin-border-soft); background: color-mix(in srgb, var(--admin-surface) 82%, var(--admin-bg)); }
.ledger-directory-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 0 8px 13px; border-bottom: 1px solid var(--admin-border-soft); }
.ledger-directory-head .process-kicker { margin-bottom: 3px; }
.ledger-directory-head h2 { margin: 0; font-size: 15px; }
.ledger-directory-head > span { color: var(--admin-muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger-category-list { display: grid; gap: 4px; padding-top: 10px; }
.ledger-category-list button { display: flex; width: 100%; min-height: 42px; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--admin-muted); font: inherit; font-size: 13px; text-align: left; }
.ledger-category-list button:hover { background: var(--admin-bg); color: var(--admin-text); }
.ledger-category-list button.active { border-color: #d6c8ef; background: var(--admin-primary-soft); color: #5d3e91; font-weight: 650; }
.ledger-category-list b { min-width: 22px; color: inherit; font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.ledger-directory-note { margin: 18px 8px 0; color: var(--admin-muted); font-size: 12px; line-height: var(--admin-leading-relaxed); }
.ledger-list-pane { min-width: 0; }
.ledger-list-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 24px; border-bottom: 1px solid var(--admin-border-soft); }
.ledger-list-head h2 { margin: 0; font-size: 18px; }
.ledger-list-head p { margin: 4px 0 0; color: var(--admin-muted); font-size: 13px; }
.ledger-table { min-width: 940px; }
.ledger-table th { background: var(--admin-bg); color: var(--admin-muted); font-size: 12px; font-weight: 650; }
.ledger-table td { padding-top: 17px; padding-bottom: 17px; border-bottom-color: var(--admin-border-soft); }
.ledger-table td:nth-child(1) { color: var(--admin-muted); font-family: var(--admin-mono, ui-monospace, monospace); font-size: 12px; white-space: nowrap; }
.ledger-table td:nth-child(2) { min-width: 270px; }.ledger-table td:nth-child(2) small { display: block; margin-top: 4px; color: var(--admin-muted); font-size: 12px; }
.ledger-table td:nth-child(3), .ledger-table td:nth-child(4), .ledger-table td:nth-child(5), .ledger-table td:nth-child(6), .ledger-table td:nth-child(7) { white-space: nowrap; }
.ledger-table tbody tr { transition: background-color 140ms ease; }.ledger-table tbody tr:hover { background: var(--admin-primary-soft); }
.ledger-empty td { padding: 36px 16px !important; color: var(--admin-muted); text-align: center; }
.ledger-export { display: inline-flex; min-height: 42px; align-items: center; gap: 8px; border-color: #cdbce8; background: var(--admin-surface); color: #5d3e91; font-weight: 650; }
.ledger-export::before { width: 17px; height: 17px; background: currentColor; content: ""; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v12m0 0 4-4m-4 4-4-4M5 19h14' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.ledger-export:hover { border-color: #aa8fdb; background: var(--admin-primary-soft); }.ledger-export:focus-visible { outline: 3px solid rgba(118, 82, 180, .28); outline-offset: 3px; }
@media (max-width: 960px) { .ledger-workspace { grid-template-columns: 1fr; }.ledger-directory { border-right: 0; border-bottom: 1px solid var(--admin-border-soft); }.ledger-category-list { display: flex; overflow-x: auto; }.ledger-category-list button { width: auto; flex: 0 0 auto; }.ledger-directory-note { display: none; } }
@media (max-width: 800px) { .ledger-filter { align-items: flex-start; flex-direction: column; }.ledger-filter-controls { width: 100%; flex-wrap: wrap; }.ledger-filter-controls label { flex: 1; }.ledger-filter-controls select { width: 100%; }.ledger-period-note { flex: 1; }.ledger-summary { grid-template-columns: 1fr 1fr; }.ledger-summary div:nth-child(2) { border-right: 0; }.ledger-summary div:nth-child(-n+2) { border-bottom: 1px solid var(--admin-border-soft); }.ledger-list-head { align-items: flex-start; flex-direction: column; padding: 18px 16px; } }
@media (max-width: 480px) { .ledger-summary { grid-template-columns: 1fr; }.ledger-summary div { border-right: 0; border-bottom: 1px solid var(--admin-border-soft); }.ledger-summary div:last-child { border-bottom: 0; }.ledger-export { width: 100%; justify-content: center; } }

/* Report workflow: configuration, accountability, and evidence remain readable as work surfaces. */
.template-context,.template-workspace,.report-workspace,.reminder-panel,.score-panel { border:1px solid var(--admin-border); border-radius:var(--admin-radius); background:var(--admin-surface); box-shadow:var(--admin-shadow); }
.template-context { display:grid; grid-template-columns:minmax(0,1fr) 220px auto; align-items:end; gap:20px; padding:20px 24px; margin-bottom:20px; }.template-context h2,.template-intro h2,.report-workspace h2,.reminder-panel h2,.score-panel h2 { margin:0; font-size:18px; }.template-context p,.template-intro p,.report-workspace p,.reminder-panel p,.score-panel p { margin:5px 0 0; color:var(--admin-muted); font-size:13px; }.template-context label { display:grid; gap:6px; color:var(--admin-muted); font-size:12px; }.template-context select,.report-workspace select,.reminder-form select { min-height:40px; padding:0 10px; border:1px solid var(--admin-border); border-radius:7px; background:var(--admin-surface); color:var(--admin-text); }.template-context output { padding:10px 12px; border-radius:7px; background:var(--admin-primary-soft); color:#5d3e91; font-size:12px; font-weight:650; }
.template-workspace { display:grid; grid-template-columns:270px minmax(0,1fr); overflow:hidden; }.template-intro { padding:24px; background:color-mix(in srgb,var(--admin-surface) 82%,var(--admin-bg)); border-right:1px solid var(--admin-border-soft); }.template-intro dl { display:grid; gap:0; margin:22px 0 0; }.template-intro dl div { display:flex; justify-content:space-between; padding:11px 0; border-top:1px solid var(--admin-border-soft); }.template-intro dt { color:var(--admin-muted); font-size:12px; }.template-intro dd { margin:0; font-weight:650; }.template-list { display:grid; }.template-list article { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:22px 24px; border-bottom:1px solid var(--admin-border-soft); }.template-list article:last-child { border-bottom:0; }.template-list h3 { margin:8px 0 0; font-size:15px; }.template-list p,.template-list small { display:block; margin:4px 0 0; color:var(--admin-muted); font-size:12px; }.template-list .template-active { background:color-mix(in srgb,var(--admin-primary-soft) 46%,var(--admin-surface)); }.template-list button { flex:0 0 auto; }
.report-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin-bottom:20px; border:1px solid var(--admin-border); border-radius:var(--admin-radius); background:var(--admin-surface); box-shadow:var(--admin-shadow); }.report-summary div { display:grid; gap:5px; padding:18px 22px; border-right:1px solid var(--admin-border-soft); }.report-summary div:last-child { border-right:0; }.report-summary span,.report-summary small { color:var(--admin-muted); font-size:12px; }.report-summary strong { font-size:27px; line-height:1; font-variant-numeric:tabular-nums; }.report-summary div:nth-child(1) strong { color:var(--admin-primary); }.report-summary div:nth-child(2) strong { color:var(--admin-warning); }.report-summary div:nth-child(3) strong { color:var(--admin-success); }.report-workspace { overflow:hidden; }.report-workspace>header { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:20px 24px; border-bottom:1px solid var(--admin-border-soft); }.report-workspace>header label { display:grid; gap:6px; color:var(--admin-muted); font-size:12px; }.report-table { min-width:970px; }.report-table td { padding-top:17px; padding-bottom:17px; }.report-table td:nth-child(2) { min-width:250px; }.report-table small { display:block; margin-top:4px; color:var(--admin-muted); font-size:12px; }.report-table td:last-child { white-space:nowrap; }
.reminder-grid { display:grid; grid-template-columns:minmax(0,1.06fr) minmax(0,.94fr); gap:20px; }.reminder-panel>header,.score-panel>header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:20px 22px; border-bottom:1px solid var(--admin-border-soft); }.reminder-header-content { display:grid; min-width:0; flex:1; gap:12px; }.reminder-context { display:grid; grid-template-columns:minmax(176px,.72fr) minmax(0,1.28fr); gap:12px; padding:12px; border:1px solid var(--admin-border-soft); border-radius:8px; background:color-mix(in srgb,var(--admin-bg) 44%,var(--admin-surface)); }.reminder-context label { display:grid; min-width:0; gap:6px; color:var(--admin-muted); font-size:12px; font-weight:600; }.reminder-context label span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.reminder-context select { width:100%; min-width:0; height:40px; padding:0 10px; border:1px solid var(--admin-border); border-radius:7px; background:var(--admin-surface); color:var(--admin-text); font:inherit; font-size:13px; transition:border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease; }.reminder-context select:hover { border-color:color-mix(in srgb,var(--admin-primary) 42%,var(--admin-border)); background:color-mix(in srgb,var(--admin-primary-soft) 18%,var(--admin-surface)); }.reminder-context select:focus-visible { border-color:var(--admin-primary); box-shadow:0 0 0 3px color-mix(in srgb,var(--admin-primary) 18%,transparent); outline:0; }.reminder-context select:disabled { cursor:not-allowed; background:var(--admin-bg); color:var(--admin-muted); }.timing-strip { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0; margin:0; }.timing-strip div { padding:15px 22px; border-right:1px solid var(--admin-border-soft); border-bottom:1px solid var(--admin-border-soft); }.timing-strip div:nth-child(2n) { border-right:0; }.timing-strip dt { color:var(--admin-muted); font-size:12px; }.timing-strip dd { margin:4px 0 0; font-size:13px; font-weight:650; }.reminder-form { display:flex; align-items:end; gap:12px; padding:18px 22px 0; }.reminder-form label { display:grid; flex:1; gap:6px; color:var(--admin-muted); font-size:12px; }.reminder-log { display:grid; gap:0; padding:10px 22px 20px; margin:12px 0 0; list-style:none; }.reminder-log li { padding:10px 0; border-top:1px solid var(--admin-border-soft); color:var(--admin-muted); font-size:12px; }.score-table { min-width:660px; }.score-table td { padding-top:16px; padding-bottom:16px; }
.contractor-page { min-width:0; min-height:100vh; padding:48px 20px; background:var(--admin-bg); }.contractor-shell { width:min(780px,100%); margin:0 auto; border:1px solid var(--admin-border); border-radius:12px; background:var(--admin-surface); box-shadow:var(--admin-shadow); overflow:hidden; }.contractor-shell>header { display:flex; align-items:center; justify-content:space-between; padding:17px 24px; border-bottom:1px solid var(--admin-border-soft); }.contractor-mark { color:var(--admin-text); font-weight:700; }.contractor-issue { padding:28px 30px; border-bottom:1px solid var(--admin-border-soft); background:color-mix(in srgb,var(--admin-primary-soft) 36%,var(--admin-surface)); }.contractor-issue h1 { margin:7px 0 0; font-size:24px; }.contractor-issue>p { margin:7px 0 0; color:var(--admin-muted); }.contractor-issue dl { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:20px 0 0; }.contractor-issue dl div { padding-top:12px; border-top:1px solid var(--admin-border); }.contractor-issue dt { color:var(--admin-muted); font-size:12px; }.contractor-issue dd { margin:5px 0 0; font-size:13px; line-height:var(--admin-leading-body); }.contractor-form { display:grid; gap:20px; padding:28px 30px; }.form-heading h2 { margin:0; font-size:18px; }.form-heading p { margin:5px 0 0; color:var(--admin-muted); font-size:13px; }.contractor-fields { display:grid; grid-template-columns:1fr 1fr; gap:16px; }.contractor-fields label,.contractor-extra { display:grid; gap:7px; color:var(--admin-text); font-size:13px; font-weight:650; }.contractor-fields .full { grid-column:1 / -1; }.contractor-form input,.contractor-form textarea { min-height:42px; padding:10px 11px; border:1px solid var(--admin-border); border-radius:7px; background:var(--admin-surface); color:var(--admin-text); font:inherit; }.contractor-form textarea { min-height:92px; resize:vertical; }.contractor-form small { color:var(--admin-muted); font-size:12px; font-weight:400; }.comparison-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }.comparison-grid label { display:grid; gap:8px; padding:15px; border:1px dashed #cdbce8; border-radius:9px; background:#faf8fd; color:#5d3e91; font-size:13px; font-weight:650; }.comparison-grid input { padding:8px; background:var(--admin-surface); }.contractor-actions { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-top:2px; }.contractor-actions span { color:var(--admin-muted); font-size:12px; }.contractor-result { margin:0; padding:12px; border-radius:7px; background:#e6f4ec; color:#126943; font-size:13px; }
@media (max-width:800px) { .template-context,.template-workspace,.reminder-grid,.reminder-context { grid-template-columns:1fr; }.template-context { align-items:stretch; }.template-intro { border-right:0; border-bottom:1px solid var(--admin-border-soft); }.report-workspace>header,.reminder-form,.contractor-actions { align-items:stretch; flex-direction:column; }.report-workspace>header label { width:100%; }.report-workspace>header select,.reminder-form select,.reminder-form .primary,.contractor-actions .primary { width:100%; }.report-summary { grid-template-columns:1fr; }.report-summary div { border-right:0; border-bottom:1px solid var(--admin-border-soft); }.report-summary div:last-child { border-bottom:0; } }
@media (max-width:560px) { .template-list article { align-items:flex-start; flex-direction:column; }.template-list button { width:100%; }.contractor-page { padding:16px 0; }.contractor-shell { border-radius:0; border-left:0; border-right:0; }.contractor-issue,.contractor-form { padding-left:18px; padding-right:18px; }.contractor-issue dl,.contractor-fields,.comparison-grid { grid-template-columns:1fr; }.contractor-fields .full { grid-column:auto; }.timing-strip { grid-template-columns:1fr; }.timing-strip div,.timing-strip div:nth-child(2n) { border-right:0; } }

/* Template management: show the active project standard before the enterprise library. */
.template-current { display:grid; grid-template-columns:minmax(0,1fr) minmax(330px,.9fr) auto; align-items:center; gap:28px; padding:22px 24px; margin-bottom:20px; border:1px solid var(--admin-border); border-radius:var(--admin-radius); background:var(--admin-surface); box-shadow:var(--admin-shadow); }
.template-current-main .process-kicker { margin-bottom:5px; }.template-current-title { display:flex; align-items:center; gap:10px; }.template-current h2 { margin:0; font-size:20px; }.template-current-main p { margin:6px 0 0; color:var(--admin-muted); font-size:13px; }
.template-current-facts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; margin:0; }.template-current-facts div { min-width:0; padding:2px 16px; border-left:1px solid var(--admin-border-soft); }.template-current-facts dt { color:var(--admin-muted); font-size:11px; }.template-current-facts dd { overflow:hidden; margin:5px 0 0; color:var(--admin-text); font-size:12px; font-weight:650; text-overflow:ellipsis; white-space:nowrap; }
.template-import-button::before { display:inline-block; width:17px; height:17px; background:currentColor; content:""; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v12m0 0 4-4m-4 4-4-4M5 19h14' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.template-dialog { width:min(620px,calc(100vw - 32px)); padding:0; border:0; border-radius:12px; color:var(--admin-text); box-shadow:0 20px 64px rgba(41,36,58,.22); }.template-dialog::backdrop { background:rgba(41,36,58,.35); }.template-dialog form { display:grid; gap:18px; padding:24px; }
.template-upload-zone { display:grid; min-height:148px; place-items:center; align-content:center; gap:5px; padding:18px; border:1px dashed #bfaee0; border-radius:10px; background:color-mix(in srgb,var(--admin-primary-soft) 42%,var(--admin-surface)); color:var(--admin-text); cursor:pointer; text-align:center; }.template-upload-zone:focus-within { outline:3px solid rgba(118,82,180,.24); outline-offset:2px; }.template-upload-zone input { position:absolute; width:1px; height:1px; opacity:0; }.template-upload-zone strong { font-size:14px; }.template-upload-zone small,.template-import-note { color:var(--admin-muted); font-size:12px; }.template-upload-icon { display:grid; width:34px; height:34px; place-items:center; border-radius:50%; background:var(--admin-surface); color:var(--admin-primary); font-size:20px; font-weight:400; }
.template-file-preview { display:flex; align-items:center; gap:10px; min-width:0; padding:10px 12px; border:1px solid var(--admin-border); border-radius:8px; background:var(--admin-bg); }.template-file-preview>div { min-width:0; flex:1; }.template-file-preview strong,.template-file-preview small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.template-file-preview strong { font-size:12px; }.template-file-preview small { margin-top:2px; color:var(--admin-muted); font-size:11px; }
.template-import-fields { display:grid; grid-template-columns:1fr 150px; gap:14px; }.template-import-fields label { display:grid; gap:7px; color:var(--admin-text); font-size:12px; font-weight:650; }.template-import-fields .full { grid-column:1/-1; }.template-import-fields input,.template-import-fields select { min-height:42px; padding:0 11px; border:1px solid var(--admin-border); border-radius:7px; background:var(--admin-surface); color:var(--admin-text); font:inherit; }.template-import-fields :is(input,select):focus-visible { border-color:var(--admin-primary); outline:3px solid rgba(118,82,180,.2); }
@media (max-width:1000px) { .template-current { grid-template-columns:1fr; gap:18px; }.template-current-facts { max-width:620px; }.template-current-facts div:first-child { padding-left:0; border-left:0; } }
@media (max-width:560px) { .template-current { padding:18px; }.template-current-title { align-items:flex-start; flex-direction:column; gap:7px; }.template-current-facts { grid-template-columns:1fr; gap:10px; }.template-current-facts div { padding:0; border-left:0; }.template-current .secondary { width:100%; }.template-import-fields { grid-template-columns:1fr; }.template-import-fields .full { grid-column:auto; }.template-file-preview { align-items:flex-start; flex-wrap:wrap; }.template-file-preview .status { margin-left:41px; } }

/* Approved desktop shell from the supplied prototype screenshot. */
:root { --admin-nav: #192032; --admin-nav-text: #edf1f6; }

@media (min-width: 1181px) {
  .admin-shell { grid-template-columns: 236px minmax(0, 1fr); }
  .sidebar { padding: 24px 14px; border-right: 0; background: var(--admin-nav); color: var(--admin-nav-text); }
  .brand { position: static; padding: 0 10px 24px; border-bottom: 1px solid rgba(255,255,255,.13); color: #fff; font-size: 17px; }
  .brand::before { display: none; }
  .brand small, .side-footer { color: #93a7c0; }
  .side-nav { gap: 4px; margin-top: 22px; }
  .side-nav a { min-height: 42px; padding: 0 10px; border: 0; border-radius: 7px; color: inherit; font-weight: 400; }
  .side-nav a:hover { background: #1e3c61; color: #fff; }
  .side-nav a.active { border: 0; background: #1e3c61; color: #fff; font-weight: 500; }
  .side-nav a.active::before { display: none; }
  .side-footer { padding: 14px 10px 0; border-top: 1px solid rgba(255,255,255,.13); line-height: 1.5; }
  .topbar { height: 72px; padding: 0 32px; background: var(--admin-surface); }
}

/* Neutral blue palette from the supplied prototype screenshot. */
:root {
  --admin-bg: #f6f7f9;
  --admin-surface: #ffffff;
  --admin-text: #172033;
  --admin-muted: #6b7689;
  --admin-border: #d8dee8;
  --admin-border-soft: #edf1f6;
  --admin-primary: #2563eb;
  --admin-primary-soft: #eef4ff;
  --admin-success: #16a34a;
  --admin-warning: #f59e0b;
  --admin-danger: #dc2626;
  --admin-nav: #192032;
  --admin-nav-text: #edf1f6;
  --admin-shadow: 0 12px 32px rgba(23,32,51,.08);
}
.primary { box-shadow: 0 6px 14px rgba(37,99,235,.16); }
.primary:hover { background: #1d4ed8; }
.avatar { background: #eaf1ff; color: #245ac4; }

/* Project Management Workspace Styles */
.page-kicker, .section-kicker { display: block; margin-bottom: 4px; color: var(--admin-primary); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.project-primary-shell { display: grid; gap: 0; }

.project-level-one { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--admin-surface); border: 1px solid var(--admin-border); border-radius: var(--admin-radius) var(--admin-radius) 0 0; overflow: hidden; }
.project-level-one button { display: flex; align-items: center; gap: 14px; padding: 18px 24px; border: 0; border-right: 1px solid var(--admin-border-soft); border-bottom: 3px solid transparent; background: var(--admin-surface); color: var(--admin-muted); font: inherit; text-align: left; transition: all 160ms ease; cursor: pointer; }
.project-level-one button:last-child { border-right: 0; }
.project-level-one button:hover { background: color-mix(in srgb, var(--admin-bg) 60%, var(--admin-surface)); color: var(--admin-text); }
.project-level-one button.active { border-bottom-color: var(--admin-primary); background: #ffffff; color: var(--admin-text); }

.project-tab-index { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 8px; background: var(--admin-bg); color: var(--admin-muted); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.project-level-one button.active .project-tab-index { background: var(--admin-primary-soft); color: var(--admin-primary); }

.project-level-one button span strong { display: block; font-size: 15px; color: var(--admin-text); line-height: 1.25; }
.project-level-one button span small { display: block; margin-top: 3px; color: var(--admin-muted); font-size: 12px; font-weight: 400; }

.project-portfolio-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--admin-surface); border: 1px solid var(--admin-border); border-top: 0; margin-bottom: 20px; box-shadow: var(--admin-shadow); }
.project-portfolio-summary div { display: grid; gap: 5px; padding: 18px 24px; border-right: 1px solid var(--admin-border-soft); }
.project-portfolio-summary div:last-child { border-right: 0; }
.project-portfolio-summary span { color: var(--admin-muted); font-size: 13px; }
.project-portfolio-summary strong { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--admin-text); }
.project-portfolio-summary strong.summary-warning { color: var(--admin-warning); }
.project-portfolio-summary small { display: flex; align-items: center; gap: 6px; color: var(--admin-muted); font-size: 12px; }

.summary-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--admin-muted); }
.summary-dot.is-active { background: var(--admin-success); }
.summary-dot.is-warning { background: var(--admin-warning); }

.project-overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .95fr); gap: 20px; }

.project-focus-panel, .project-activity-panel { border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); box-shadow: var(--admin-shadow); overflow: hidden; }
.project-focus-panel header, .project-activity-panel header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; border-bottom: 1px solid var(--admin-border-soft); }
.project-focus-panel header h2, .project-activity-panel header h2 { margin: 0; font-size: 19px; letter-spacing: 0; }
.project-focus-panel header p { margin: 4px 0 0; color: var(--admin-muted); font-size: 13px; }

.project-focus-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 18px 26px; background: color-mix(in srgb, var(--admin-primary-soft) 22%, var(--admin-surface)); border-bottom: 1px solid var(--admin-border-soft); }
.project-focus-metrics div { display: grid; gap: 4px; }
.project-focus-metrics span { color: var(--admin-muted); font-size: 12px; }
.project-focus-metrics strong { font-size: 24px; font-variant-numeric: tabular-nums; line-height: 1.1; }

.project-priority-list { display: grid; padding: 4px 26px; }
.project-priority-list a { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--admin-border-soft); color: var(--admin-text); text-decoration: none; transition: background-color 140ms ease; }
.project-priority-list a:last-child { border-bottom: 0; }
.project-priority-list a:hover strong { color: var(--admin-primary); }

.priority-level { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 7px; background: var(--admin-bg); color: var(--admin-muted); font-size: 12px; font-weight: 700; }
.priority-level.is-danger { background: #fce9e7; color: #dc2626; }
.priority-level.is-warning { background: #fff4dc; color: #d97706; }

.project-priority-list strong { font-size: 14px; font-weight: 600; display: block; }
.project-priority-list small { display: block; margin-top: 3px; color: var(--admin-muted); font-size: 12px; }
.project-priority-list b { color: var(--admin-muted); font-size: 12px; font-weight: 500; white-space: nowrap; }

.project-focus-panel footer { display: flex; align-items: center; justify-content: space-between; padding: 18px 26px; border-top: 1px solid var(--admin-border-soft); background: var(--admin-surface); }
.project-focus-panel footer a { color: var(--admin-primary); font-size: 13px; font-weight: 600; text-decoration: none; }

.project-activity-panel { display: flex; flex-direction: column; }
.project-activity-panel header a { color: var(--admin-primary); font-size: 13px; font-weight: 600; text-decoration: none; }
.project-activity-list { margin: 0; padding: 14px 24px; list-style: none; display: grid; gap: 14px; }
.project-activity-list li { display: grid; gap: 3px; padding-bottom: 12px; border-bottom: 1px solid var(--admin-border-soft); }
.project-activity-list li:last-child { border-bottom: 0; }
.project-activity-list time { color: var(--admin-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.project-activity-list strong { font-size: 13px; font-weight: 600; color: var(--admin-text); }
.project-activity-list span { color: var(--admin-muted); font-size: 12px; }

.project-closure { margin-top: auto; padding: 18px 24px; background: color-mix(in srgb, var(--admin-bg) 64%, var(--admin-surface)); border-top: 1px solid var(--admin-border-soft); }
.project-closure div:first-child { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--admin-text); }
.project-closure div:first-child strong { font-variant-numeric: tabular-nums; }
.project-closure-bar { height: 7px; border-radius: 999px; background: var(--admin-border); overflow: hidden; margin: 10px 0 8px; }
.project-closure-bar i { display: block; height: 100%; border-radius: 999px; background: var(--admin-primary); transition: width 300ms ease; }
.project-closure p { display: flex; justify-content: space-between; margin: 0; color: var(--admin-muted); font-size: 12px; }

.project-switcher { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; border: 0; background: transparent; box-shadow: none; overflow: visible; }
.project-index { display: flex; flex-direction: column; padding: 20px 18px; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); box-shadow: var(--admin-shadow); }
.project-index header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.project-index header h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--admin-text); }
.project-subtitle { margin: 3px 0 0; color: var(--admin-muted); font-size: 12px; }
.project-count { display: inline-flex; min-height: 22px; align-items: center; padding: 0 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--admin-primary) 20%, transparent); background: color-mix(in srgb, var(--admin-primary-soft) 40%, var(--admin-surface)); color: var(--admin-primary); font-size: 12px; font-weight: 650; white-space: nowrap; }

.project-index-tools { display: flex; gap: 8px; margin-bottom: 14px; }
.project-search { flex: 1; min-width: 0; }
.project-search input { width: 100%; min-height: 38px; padding: 0 12px; border: 1px solid var(--admin-border); border-radius: 7px; background: var(--admin-surface); color: var(--admin-text); font-size: 13px; }
.project-search input:focus-visible, select[data-project-status-filter]:focus-visible, select[data-project-page-size]:focus-visible { border-color: var(--admin-primary); outline: 3px solid color-mix(in srgb, var(--admin-primary) 20%, transparent); }
select[data-project-status-filter] { min-height: 38px; padding: 0 10px; border: 1px solid var(--admin-border); border-radius: 7px; background: var(--admin-surface); color: var(--admin-text); font-size: 13px; }

.project-list { display: flex; flex-direction: column; gap: 10px; max-height: 480px; overflow-y: auto; padding: 2px 4px 2px 2px; }
.project-list-item { position: relative; display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 12px 14px 12px 16px; border: 1px solid var(--admin-border-soft); border-radius: 8px; background: var(--admin-surface); color: var(--admin-text); font: inherit; text-align: left; cursor: pointer; transition: all 160ms ease; overflow: hidden; }
.project-list-item:hover { border-color: color-mix(in srgb, var(--admin-primary) 35%, var(--admin-border)); background: color-mix(in srgb, var(--admin-bg) 30%, var(--admin-surface)); transform: translateY(-1px); }
.project-list-item:focus-visible { outline: 2px solid var(--admin-primary); outline-offset: 2px; }
.project-list-item.active { border-color: var(--admin-primary); background: #ffffff; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08); }
.project-list-item.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--admin-primary); border-radius: 8px 0 0 8px; }
.project-list-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-list-top strong { font-size: 14px; font-weight: 700; color: var(--admin-text); }
.project-list-item > span:not(.project-list-top) { color: var(--admin-muted); font-size: 12px; }
.project-progress { height: 4px; border-radius: 999px; background: color-mix(in srgb, var(--admin-border) 60%, transparent); overflow: hidden; margin-top: 2px; }
.project-progress i { display: block; height: 100%; border-radius: 999px; background: var(--admin-primary); }
.project-list-item small { display: flex; justify-content: space-between; color: var(--admin-muted); font-size: 11px; margin-top: 1px; }
.project-list-item small b { color: var(--admin-text); font-weight: 700; }

.project-list-empty { padding: 32px 14px; color: var(--admin-muted); font-size: 13px; text-align: center; margin: 0; }

.project-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--admin-border-soft); font-size: 12px; color: var(--admin-muted); flex-wrap: wrap; }
.page-size-select { height: 32px; min-height: 32px; padding: 0 8px; border: 1px solid var(--admin-border); border-radius: 6px; background: var(--admin-surface); color: var(--admin-text); font: inherit; font-size: 12px; cursor: pointer; }
.pagination-controls { display: flex; align-items: center; gap: 6px; }
.btn-page { min-height: 32px; padding: 0 12px; border: 1px solid var(--admin-border); border-radius: 6px; background: var(--admin-surface); color: var(--admin-text); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; transition: all 140ms ease; }
.btn-page:hover:not(:disabled) { border-color: var(--admin-primary); color: var(--admin-primary); background: color-mix(in srgb, var(--admin-primary-soft) 40%, var(--admin-surface)); }
.btn-page:active:not(:disabled) { transform: scale(0.97); }
.btn-page:disabled { opacity: 0.45; cursor: not-allowed; border-color: var(--admin-border-soft); color: var(--admin-muted); background: var(--admin-bg); }
.page-indicator { color: var(--admin-text); font-size: 12px; font-weight: 600; padding: 0 4px; font-variant-numeric: tabular-nums; }

@media (max-width: 991px) {
  .project-switcher { grid-template-columns: 1fr; gap: 20px; }
  .project-list { max-height: 380px; }
}

.project-detail { padding: 28px 32px; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); box-shadow: var(--admin-shadow); }
.project-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.project-detail-head h2 { margin: 0; font-size: 22px; letter-spacing: 0; }
.project-detail-head p { margin: 5px 0 0; color: var(--admin-muted); font-size: 14px; }
.project-detail-actions { display: flex; align-items: center; gap: 12px; }

.project-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 24px; padding: 20px 24px; border: 1px solid var(--admin-border-soft); border-radius: 9px; background: color-mix(in srgb, var(--admin-bg) 50%, var(--admin-surface)); }
.project-facts dt { color: var(--admin-muted); font-size: 12px; }
.project-facts dd { margin: 4px 0 0; font-size: 13px; font-weight: 650; color: var(--admin-text); word-break: break-all; }

.project-health { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 24px; border: 1px solid var(--admin-border); border-radius: 9px; background: var(--admin-surface); }
.project-health div { display: grid; gap: 4px; }
.project-health span { color: var(--admin-muted); font-size: 13px; }
.project-health strong { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--admin-text); }

.project-detail-empty { display: grid; place-items: center; align-content: center; gap: 12px; min-height: 380px; padding: 48px 24px; text-align: center; }
.project-detail-empty h2 { margin: 0; font-size: 20px; }
.project-detail-empty p { margin: 0; color: var(--admin-muted); font-size: 14px; }

.project-config-shell { border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); box-shadow: var(--admin-shadow); overflow: hidden; }
.project-config-context { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 28px; border-bottom: 1px solid var(--admin-border-soft); background: color-mix(in srgb, var(--admin-bg) 40%, var(--admin-surface)); }
.project-config-context h2 { margin: 0; font-size: 19px; font-weight: 700; color: var(--admin-text); }
.project-config-context p { margin: 4px 0 0; color: var(--admin-muted); font-size: 13px; }

.project-config-layout { display: flex; flex-direction: column; }
.project-level-two { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--admin-border-soft); border-right: 0; background: var(--admin-surface); padding: 0; }
.project-level-two button { display: grid; gap: 4px; width: 100%; padding: 16px 20px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--admin-text); font: inherit; text-align: center; cursor: pointer; transition: all 160ms ease; }
.project-level-two button:hover { background: color-mix(in srgb, var(--admin-primary-soft) 30%, transparent); }
.project-level-two button.active { border-bottom-color: var(--admin-primary); background: transparent; color: var(--admin-primary); }
.project-level-two button strong { display: block; font-size: 14px; font-weight: 650; }
.project-level-two button span { display: block; color: var(--admin-muted); font-size: 12px; font-weight: 400; }
.project-level-two button.active span { color: var(--admin-primary); }

.project-config-content { padding: 24px 28px; }
.project-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.project-section-head h2 { margin: 2px 0 0; font-size: 18px; }
.project-section-head p { margin: 4px 0 0; color: var(--admin-muted); font-size: 13px; }

.company-list { display: grid; gap: 12px; }
.company-row { display: grid; grid-template-columns: 42px minmax(180px, 1fr) 2fr auto; align-items: center; gap: 18px; padding: 16px 20px; border: 1px solid var(--admin-border); border-radius: 9px; background: var(--admin-surface); }
.company-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 8px; font-size: 15px; font-weight: 700; }
.company-mark.build { background: #eaf1ff; color: #2563eb; }
.company-mark.design { background: #eee8fa; color: #7652b4; }
.company-mark.supervise { background: #e6f4ec; color: #16a34a; }
.company-row strong { display: block; font-size: 14px; font-weight: 650; }
.company-row span { display: block; margin-top: 2px; color: var(--admin-muted); font-size: 12px; }
.company-row p { margin: 0; color: var(--admin-muted); font-size: 13px; line-height: 1.45; } .company-actions { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; } .company-actions .danger { color: var(--admin-danger); }

.project-role-table { min-width: 680px; }
.role-tag { display: inline-flex; padding: 3px 9px; border-radius: 6px; background: var(--admin-primary-soft); color: var(--admin-primary); font-size: 12px; font-weight: 650; }

.project-dialog { width: min(580px, calc(100vw - 32px)); }
.project-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.project-form-grid label { display: grid; gap: 6px; color: var(--admin-text); font-size: 13px; font-weight: 650; }
.project-form-grid input, .project-form-grid select { min-height: 40px; padding: 0 11px; border: 1px solid var(--admin-border); border-radius: 7px; background: var(--admin-surface); color: var(--admin-text); font: inherit; }
.project-form-grid input:focus-visible, .project-form-grid select:focus-visible { border-color: var(--admin-primary); outline: 3px solid color-mix(in srgb, var(--admin-primary) 20%, transparent); }
.project-form-grid .form-full { grid-column: 1 / -1; }

@media (max-width: 960px) {
  .project-level-one { grid-template-columns: 1fr; border-radius: var(--admin-radius); border-bottom: 1px solid var(--admin-border); }
  .project-level-one button { border-right: 0; border-bottom: 1px solid var(--admin-border-soft); }
  .project-portfolio-summary { grid-template-columns: 1fr 1fr; border-top: 1px solid var(--admin-border); border-radius: var(--admin-radius); }
  .project-portfolio-summary div:nth-child(2) { border-right: 0; }
  .project-portfolio-summary div:nth-child(-n+2) { border-bottom: 1px solid var(--admin-border-soft); }
  .project-overview-grid { grid-template-columns: 1fr; }
  .project-switcher { grid-template-columns: 1fr; }
  .project-index { border-right: 0; border-bottom: 1px solid var(--admin-border-soft); }
  .project-facts, .project-health { grid-template-columns: 1fr 1fr; }
  .project-config-layout { grid-template-columns: 1fr; }
  .project-level-two { border-right: 0; border-bottom: 1px solid var(--admin-border-soft); grid-template-columns: 1fr 1fr; }
  .company-row { grid-template-columns: 42px 1fr; gap: 12px; }
  .company-row p { grid-column: 1 / -1; }
  .company-row button { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 560px) {
  .project-portfolio-summary { grid-template-columns: 1fr; }
  .project-portfolio-summary div { border-right: 0; border-bottom: 1px solid var(--admin-border-soft); }
  .project-portfolio-summary div:last-child { border-bottom: 0; }
  .project-focus-metrics { grid-template-columns: 1fr; gap: 12px; }
  .project-facts, .project-health { grid-template-columns: 1fr; }
  .project-level-two { grid-template-columns: 1fr; }
  .project-form-grid { grid-template-columns: 1fr; }
  .project-form-grid .form-full { grid-column: auto; }
}

/* --- User Management & Personnel Management Module --- */
.user-summary, .personnel-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--admin-surface); border: 1px solid var(--admin-border); border-radius: var(--admin-radius); margin-bottom: 24px; box-shadow: var(--admin-shadow); overflow: hidden; }
.user-summary div, .personnel-summary div { display: grid; gap: 5px; padding: 20px 24px; border-right: 1px solid var(--admin-border-soft); }
.user-summary div:last-child, .personnel-summary div:last-child { border-right: 0; }
.user-summary span, .personnel-summary span { color: var(--admin-muted); font-size: 13px; }
.user-summary strong, .personnel-summary strong { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--admin-text); }
.user-summary strong.user-warning, .personnel-summary strong.personnel-warn { color: var(--admin-warning); }
.user-summary small { display: block; color: var(--admin-muted); font-size: 12px; }

.user-workspace, .personnel-workspace { border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); box-shadow: var(--admin-shadow); overflow: hidden; }
.user-tools, .personnel-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--admin-border-soft); background: color-mix(in srgb, var(--admin-bg) 30%, var(--admin-surface)); }
.user-tools h2, .personnel-tools h2 { margin: 0; font-size: 18px; font-weight: 650; }
.user-tools p, .personnel-tools p { margin: 4px 0 0; color: var(--admin-muted); font-size: 13px; }
.user-controls, .personnel-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.user-search, .personnel-search { display: flex; align-items: center; }
.user-search input, .personnel-search input { height: 36px; min-width: 220px; padding: 0 12px; border: 1px solid var(--admin-border); border-radius: 7px; background: var(--admin-surface); color: var(--admin-text); font: inherit; font-size: 13px; }
.user-controls select, .personnel-controls select { height: 36px; padding: 0 10px; border: 1px solid var(--admin-border); border-radius: 7px; background: var(--admin-surface); color: var(--admin-text); font: inherit; font-size: 13px; }

.role-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 650; line-height: 1.3; }
.role-badge.role-admin { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.role-badge.role-inspector { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.role-badge.role-contractor { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.role-badge.role-viewer { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }

.user-table { width: 100%; border-collapse: collapse; }
.user-table td small { display: block; margin-top: 2px; color: var(--admin-muted); font-size: 12px; }

/* --- Report Management Module --- */
.report-templates-card { border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); box-shadow: var(--admin-shadow); margin-bottom: 24px; overflow: hidden; }
.report-templates-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 28px 18px; border-bottom: 1px solid var(--admin-border-soft); }
.report-templates-head h2 { margin: 2px 0 0; font-size: 19px; }
.report-templates-head p { margin: 4px 0 0; color: var(--admin-muted); font-size: 13px; }
.template-selected-chip { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 6px; background: color-mix(in srgb, var(--admin-primary-soft) 45%, var(--admin-surface)); border: 1px solid color-mix(in srgb, var(--admin-primary) 20%, transparent); color: var(--admin-primary); font-size: 12px; font-weight: 650; }

.report-template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 22px 28px; background: color-mix(in srgb, var(--admin-bg) 30%, var(--admin-surface)); }
.template-card { display: grid; gap: 6px; padding: 18px 20px; border: 1px solid var(--admin-border); border-radius: 9px; background: var(--admin-surface); cursor: pointer; transition: all 160ms ease; }
.template-card:hover { border-color: color-mix(in srgb, var(--admin-primary) 40%, var(--admin-border)); transform: translateY(-1px); }
.template-card.active { border-color: var(--admin-primary); background: color-mix(in srgb, var(--admin-primary-soft) 25%, var(--admin-surface)); box-shadow: 0 0 0 1px var(--admin-primary); }
.template-no { display: inline-block; color: var(--admin-primary); font-size: 12px; font-weight: 700; }
.template-card h3 { margin: 0; font-size: 15px; font-weight: 650; color: var(--admin-text); }
.template-card p { margin: 0; color: var(--admin-muted); font-size: 12px; }

.report-template-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 28px; border-top: 1px solid var(--admin-border-soft); background: var(--admin-surface); }
.report-template-footer strong { font-size: 13px; font-weight: 650; color: var(--admin-text); }
.report-template-footer span { font-size: 12px; color: var(--admin-muted); margin-left: 8px; }
.report-template-footer .data-source { color: var(--admin-muted); font-size: 12px; }

.report-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--admin-surface); border: 1px solid var(--admin-border); border-radius: var(--admin-radius); margin-bottom: 24px; box-shadow: var(--admin-shadow); overflow: hidden; }
.report-summary div { display: grid; gap: 5px; padding: 20px 24px; border-right: 1px solid var(--admin-border-soft); }
.report-summary div:last-child { border-right: 0; }
.report-summary span { color: var(--admin-muted); font-size: 13px; }
.report-summary strong { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--admin-text); }
.report-summary strong.summary-warning { color: var(--admin-warning); }
.report-summary strong.summary-success { color: var(--admin-success); }
.report-summary small { display: block; color: var(--admin-muted); font-size: 12px; }

.project-detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-top: 20px; }
.project-detail-card { border: 1px solid var(--admin-border-soft); border-radius: 9px; background: var(--admin-surface); overflow: hidden; }
.project-card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--admin-border-soft); background: color-mix(in srgb, var(--admin-bg) 40%, var(--admin-surface)); }
.project-card-head h3 { margin: 2px 0 0; font-size: 15px; font-weight: 650; color: var(--admin-text); }
.company-quick-item { display: flex; align-items: center; gap: 12px; }
.company-quick-item strong { display: block; font-size: 13px; font-weight: 650; color: var(--admin-text); }
.company-quick-item small { display: block; margin-top: 2px; color: var(--admin-muted); font-size: 12px; }

/* Danger actions for project management */
.secondary.btn-danger, button.btn-danger { border-color: #fca5a5; color: #dc2626; background: #ffffff; transition: all 160ms ease; }
.secondary.btn-danger:hover, button.btn-danger:hover { border-color: #ef4444; background: #fef2f2; color: #b91c1c; }
.primary.btn-danger-primary, button.btn-danger-primary { border-color: #dc2626; background: #dc2626; color: #ffffff; font-weight: 600; transition: all 160ms ease; }
.primary.btn-danger-primary:hover, button.btn-danger-primary:hover { background: #b91c1c; border-color: #b91c1c; }

/* Configure Project button — distinct from edit/delete without being aggressive */
[data-user-config-project] { color: var(--admin-primary) !important; }
[data-user-config-project]:hover { background: var(--admin-primary-soft); border-radius: 5px; }

/* --- User Management & Modal Dialog Polish --- */
.user-dialog {
  width: min(580px, calc(100vw - 32px));
  border: 0;
  border-radius: 14px;
  box-shadow: 0 24px 68px rgba(41, 36, 58, .18), 0 6px 16px rgba(41, 36, 58, .06);
  background: var(--admin-surface);
  color: var(--admin-text);
}
.user-dialog form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px 32px;
}
.user-dialog .dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--admin-border-soft);
  margin-bottom: 4px;
}
.user-dialog .dialog-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--admin-text);
  letter-spacing: -0.01em;
}
.user-dialog .dialog-head p {
  margin: 5px 0 0;
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.5;
}
.user-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 18px;
}
.user-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 650;
}
.user-form-grid .form-full {
  grid-column: 1 / -1;
}
.user-form-grid input,
.user-form-grid select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  background: var(--admin-surface);
  color: var(--admin-text);
  font: inherit;
  font-size: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.user-form-grid input:focus-visible,
.user-form-grid select:focus-visible {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--admin-primary) 15%, transparent);
  outline: none;
}

/* Multi-select Scope Chips */
.scope-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.scope-group label[for="user-scope-preset"] {
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 650;
}
.scope-sub-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed var(--admin-border);
}
.scope-sub-title {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 500;
}
.scope-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.scope-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: all 160ms ease;
}
.scope-chip:hover {
  border-color: #aa8fdb;
  background: #f7f3fd;
}
.scope-chip input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--admin-primary);
  cursor: pointer;
}
.scope-chip:has(input:checked) {
  border-color: #d6c8ef;
  background: var(--admin-primary-soft);
  color: #513683;
  font-weight: 650;
}

.user-dialog .dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--admin-border-soft);
}
.user-dialog .dialog-actions button {
  min-height: 44px;
  padding: 0 22px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 650;
  transition: all 160ms ease;
}

/* Project configuration dialog polish (Dropdown Select Mode) */
.user-project-config-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 0;
  border-radius: 14px;
  box-shadow: 0 24px 68px rgba(41, 36, 58, .18);
  background: var(--admin-surface);
  color: var(--admin-text);
  overflow: hidden;
}
.user-project-config-dialog .dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--admin-border-soft);
}
.user-project-config-dialog form {
  padding: 22px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.project-config-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.config-label {
  color: var(--admin-text);
  font-size: 13.5px;
  font-weight: 650;
}
.project-config-select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  background: var(--admin-surface);
  color: var(--admin-text);
  font: inherit;
  font-size: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.project-config-select:hover {
  border-color: #aa8fdb;
}
.project-config-select:focus-visible {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--admin-primary) 15%, transparent);
  outline: none;
}
.project-tags-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 96px;
  padding: 12px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: #fdfdfd;
  transition: all 160ms ease;
}
.project-tags-head {
  color: var(--admin-text);
  font-size: 12.5px;
  font-weight: 600;
}
.project-tags-head strong {
  color: var(--admin-primary);
}
.project-tags-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.project-tags-list.is-empty::before {
  content: "暂未配置分配项目，请在上方下拉框选择添加项目";
  color: var(--admin-muted);
  font-size: 13px;
  padding: 8px 0;
}
.project-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--admin-primary) 25%, transparent);
  border-radius: 6px;
  background: var(--admin-primary-soft);
  color: #4a2e7c;
  font-size: 13px;
  font-weight: 600;
}
.project-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6c4e99;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: all 140ms ease;
}
.project-tag-remove:hover {
  background: #d8c6f2;
  color: #29114c;
}
.project-config-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--admin-border-soft);
  margin-top: 4px;
}
.project-config-hint {
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 500;
}
.project-config-footer .dialog-actions {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

/* User delete confirm dialog polish */
.user-delete-dialog {
  width: min(460px, calc(100vw - 32px));
  border: 0;
  border-radius: 14px;
  box-shadow: 0 24px 68px rgba(41, 36, 58, .18);
  padding: 28px 32px;
}
.user-delete-confirm-text {
  margin: 18px 0 24px;
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.7;
}
.user-delete-confirm-text strong {
  color: var(--admin-danger);
}

@media (max-width: 640px) {
  .user-dialog, .user-project-config-dialog, .user-delete-dialog {
    width: calc(100vw - 24px);
    margin: 12px auto;
  }
  .user-dialog form { padding: 20px; }
  .user-form-grid { grid-template-columns: 1fr; }
  .user-form-grid .form-full { grid-column: auto; }
}

