:root {
  --sidebar: #0b2a4a;
  --sidebar-deep: #071c33;
  --sidebar-hover: #133a63;
  --accent: #3db8ff;
  --accent-soft: rgba(61, 184, 255, 0.14);
  --gold: #e8b84a;
  --bg: #eef2f6;
  --panel: #ffffff;
  --text: #1a2433;
  --muted: #5b6b7c;
  --link: #345673;
  --line: #d7e0ea;
  --ok: #1a9a6a;
  --warn: #c47a12;
  --run: #1d6fd8;
  --hold: #7a5af5;
  --danger: #c0392b;
  --shadow: 0 10px 30px rgba(15, 36, 64, 0.08);
}

.f69-page > .content { width: 100%; max-width: 1100px; margin: 0 auto; }
.f69-year { background: white; padding: 28px; margin-bottom: 24px; font-family: "Times New Roman", serif; color: #111; }
.f69-code { font-size: 12pt; }
.f69-year h2 { text-align: center; font-size: 18pt; margin: 20px 0 8px; }
.f69-year-label { text-align: center; margin-bottom: 20px; }
.f69-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.f69-year .f69-table th, .f69-year .f69-table td { border: 1px solid #111; padding: 8px; white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.f69-table th { background: white; color: #111; font-family: "Times New Roman", serif; font-size: inherit; text-transform: none; letter-spacing: normal; }
.f69-row-observer { margin-top: 8px; font-size: 0.9em; }
.f69-year > p { margin-top: 18px; }
.f69-signatures { margin-top: 24px; }
.f69-signatures p { margin: 10px 0; }
.f69-signature-line { display: inline-block; width: 55mm; border-bottom: 1px solid #111; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration: none; }

.management-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.management-body { padding: 14px 16px; }
.management-dashboard .panel-bar { padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
.management-dashboard .panel-bar h3 { font-size: 16px; }
.management-dashboard .panel-bar .btn { padding: 5px 10px; font-size: 12px; }
.management-metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.management-metric { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; }
.management-metric dt { color: var(--muted); font-size: 12px; }
.management-metric dd { margin: 0; font-size: 18px; font-weight: 600; }
.management-warning { border-color: var(--warn); }
.management-warning dd { color: var(--warn); }
.management-progress { margin-bottom: 24px; }
.management-progress p { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.management-progress progress { width: 100%; height: 12px; accent-color: var(--ok); }
.management-note { font-size: 12px; line-height: 1.5; margin-bottom: 10px; }
.management-notice { padding: 8px; margin-bottom: 12px; background: var(--bg); border-radius: 6px; font-size: 13px; }
.management-chart { margin-bottom: 12px; }
.management-stack { height: 10px; border-radius: 5px; margin-bottom: 10px; }
.management-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.management-legend li { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.management-legend i { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 auto; }
.management-chart-pie { display: flex; align-items: center; gap: 20px; }
.management-pie { width: 96px; height: 96px; border-radius: 50%; flex: 0 0 auto; }
.management-chart-pie .management-legend { display: grid; gap: 7px; }
.management-yearly-goals { grid-column: 1 / -1; }
.management-document-attention { margin-bottom: 16px; border-color: var(--warn); }
.management-attention-list { list-style: none; padding: 0 16px; }
.management-attention-list > li { padding: 12px 0; overflow-wrap: anywhere; }
.management-attention-list > li + li { border-top: 1px solid var(--line); }
.management-attention-links { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.management-attention-links .btn { font-size: 12px; padding: 5px 10px; }
@media (max-width: 900px) { .management-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .management-body { padding: 12px; } .management-chart-pie { gap: 12px; } .management-pie { width: 76px; height: 76px; } }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
}

.print-frame {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 268px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-deep) 100%);
  color: #e8f1fa;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  height: 100vh;
  overflow: hidden;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.logo {
  width: 38px; height: 38px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(61,184,255,0.35);
}
.brand h1 { font-size: 16px; font-weight: 700; letter-spacing: 0.2px; }
.brand p { font-size: 11px; color: #8fb0cc; margin-top: 1px; }

.nav {
  padding: 14px 10px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #7fa0bc;
  padding: 10px 12px 6px;
  font-weight: 600;
}

.menu-item { margin-bottom: 2px; }
.menu-btn {
  width: 100%;
  background: transparent;
  border: 0;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
  transition: background .15s;
}
.menu-btn:hover { background: var(--sidebar-hover); }
a.menu-btn { text-decoration: none; }
.menu-item.open > .menu-btn,
.menu-item.active > .menu-btn {
  background: var(--accent-soft);
  color: #fff;
}
.menu-btn .icon {
  width: 20px; text-align: center; opacity: 0.9;
}
.chev {
  margin-left: auto;
  font-size: 11px;
  opacity: 0.65;
  transition: transform .2s;
}
.menu-item.open .chev { transform: rotate(90deg); }

.submenu {
  display: none;
  padding: 2px 0 6px 18px;
}
.menu-item.open .submenu { display: block; }
.submenu a {
  display: block;
  color: #c5d8ea;
  text-decoration: none;
  font-size: 13.5px;
  padding: 7px 12px;
  border-radius: 7px;
  border-left: 2px solid transparent;
}
.submenu a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.submenu a.current {
  color: #fff;
  background: rgba(61,184,255,0.12);
  border-left-color: var(--accent);
}

.sidebar-foot {
  padding: 14px 16px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: #2a5a86;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #dff;
}
.user-meta { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.25; }
.user-meta span { display: block; color: #8fb0cc; font-size: 11px; }
.logout-form { margin-left: auto; }
.logout-btn {
  border: 0;
  background: transparent;
  color: #c5d8ea;
  padding: 6px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.logout-btn:hover { color: #fff; text-decoration: underline; }

/* ===== MAIN ===== */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: 268px;
}

.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.crumb { font-size: 13px; color: var(--muted); }
.crumb b { color: var(--text); font-weight: 600; }
.search {
  margin-left: auto;
  display: flex;
  align-items: center;
  background: #f4f7fa;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  width: 280px;
  gap: 8px;
}
.search input {
  border: 0; background: transparent; outline: none;
  font: inherit; font-size: 13.5px; width: 100%; color: var(--text);
}
.search-icon { opacity: 0.55; }
.chip {
  font-size: 12px;
  background: #e8f6ee;
  color: #157a4f;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

.content { padding: 24px 28px 40px; }
.content-centered {
  min-height: calc(100vh - 49px);
  display: grid;
  place-items: center;
}

.empty-state {
  width: min(100%, 560px);
  text-align: center;
  padding: 48px 24px;
}
.empty-state-code {
  width: max-content;
  margin: 0 auto 18px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--danger);
  font-size: 14px;
  box-shadow: var(--shadow);
}
.empty-state-title {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
}
.empty-state-text {
  max-width: 440px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.action-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}
.page-head h2 { font-size: 22px; font-weight: 700; }
.page-head p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.stat .k { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat .v { font-size: 24px; font-weight: 700; margin-top: 4px; letter-spacing: -0.4px; }
.stat .d { font-size: 11.5px; margin-top: 4px; color: var(--muted); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-bar h3 { font-size: 15px; font-weight: 600; }
.person-link { color: var(--link); text-decoration: underline; }
.person-link:hover { text-decoration: none; }
.person-list-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.person-card { max-width: 860px; }
.document-panel {
  max-width: 100%;
  margin-top: 16px;
  overflow-x: auto;
}
.document-list {
  min-width: 760px;
  display: grid;
}
.document-header,
.document-row {
  display: grid;
  grid-template-columns: 25% 9% 16% 14% 12% 12% 12%;
}
.document-header {
  background: #f7fafc;
  border-bottom: 1px solid var(--line);
}
.document-header span {
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.document-header span:last-child { border-right: 0; }
.document-row {
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}
.document-row:last-child { border-bottom: 0; }
.document-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 54px;
  padding: 9px 12px;
  border-right: 1px solid var(--line);
  font-size: 13px;
}
.document-cell:nth-child(7) { border-right: 0; }
.document-name { overflow-wrap: anywhere; }
.document-details { display: inline-flex; flex-shrink: 0; margin-left: auto; padding: 4px; color: var(--muted); }
.document-details:hover { color: var(--text); }
.document-cell:has(.document-details) { gap: 8px; }
.document-row-register .document-cell:has(.badge) { flex-wrap: wrap; gap: 4px; }
.document-action { justify-content: center; }
.document-action .btn { width: 100%; padding-left: 6px; padding-right: 6px; }
.document-upload-control { position: relative; width: 100%; }
.document-upload {
  display: grid;
  gap: 8px;
  margin: 0;
}
.document-upload input[type="file"] {
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 11px;
}
.document-row .form-error { grid-column: 1 / -1; margin: 0; }
.stash-panel .panel-bar { align-items: flex-start; gap: 16px; }
.stash-upload-control { width: min(100%, 300px); }
.stash-upload {
  display: grid;
  gap: 8px;
  margin: 0;
}
.stash-upload input[type="file"] {
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 11px;
}
.stash-error { margin: 12px 18px 0; }
[data-document-upload] [hidden] { display: none !important; }
.document-dropzone {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  margin: 0 12px 12px;
  padding: 12px 16px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  overflow-wrap: anywhere;
}
.stash-panel > .document-dropzone { margin: 12px 18px; }
.document-dropzone small { font-size: 11px; }
.document-dropzone.is-dragging { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.document-dropzone.has-error { border-color: #b91c1c; color: #b91c1c; }
[data-upload-status]:empty { display: none; }
[data-upload-picker]:disabled { cursor: wait; opacity: .65; }
@media print { .document-dropzone { display: none !important; } }
.print-document .document-dropzone { display: none !important; }
.stash-list { min-width: 620px; }
.stash-header,
.stash-row {
  display: grid;
  grid-template-columns: 50% 20% 15% 15%;
}
.stash-header {
  background: #f7fafc;
  border-bottom: 1px solid var(--line);
}
.stash-header span {
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.stash-header span:last-child { border-right: 0; }
.stash-row { border-bottom: 1px solid var(--line); }
.stash-row:last-child { border-bottom: 0; }
.stash-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 50px;
  padding: 9px 12px;
  border-right: 1px solid var(--line);
  font-size: 13px;
}
.stash-cell:last-child { border-right: 0; }
.stash-name { overflow-wrap: anywhere; }
.stash-empty { padding: 18px; font-size: 13px; }

/* Embeddable image slots and stashes use the shared panel and button tokens. */
.image-panel { margin-top: 16px; min-width: 0; }
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 16px;
  padding: 18px;
}
.image-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.image-thumbnail {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
  cursor: zoom-in;
}
.image-thumbnail img { display: block; width: 100%; height: 100%; object-fit: contain; }
.image-thumbnail:focus-visible, .image-dropzone:focus-within { outline: 2px solid var(--run); outline-offset: 3px; }
.image-card figcaption { display: grid; gap: 4px; font-size: 13px; overflow-wrap: anywhere; }
.image-card > .btn { margin-top: auto; align-self: flex-start; }
.image-upload { display: grid; gap: 10px; padding: 18px; border-top: 1px solid var(--line); }
.image-upload > .btn { justify-self: start; }
.image-dropzone {
  display: grid;
  gap: 10px;
  padding: 24px 18px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  background: var(--bg);
  font-size: 13px;
  cursor: pointer;
}
.image-dropzone.is-dragging { border-color: var(--run); background: var(--accent-soft); }
.image-dropzone input { max-width: 100%; min-width: 0; font: inherit; }
.image-upload-status { font-size: 13px; overflow-wrap: anywhere; }
.image-upload-status:empty { display: none; }
.image-error { margin: 12px 18px; }
.image-lightbox {
  margin: auto;
  padding: 16px;
  max-width: 95vw;
  max-height: 95vh;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}
.image-lightbox::backdrop { background: rgba(7, 28, 51, 0.8); }
.image-lightbox form { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.image-lightbox img { display: block; max-width: 85vw; max-height: 75vh; object-fit: contain; }
.person-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
}
.person-details > div {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
}
.person-details dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.person-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.person-details .person-roles { grid-column: 1 / -1; }
.person-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.education-year-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.education-year-nav label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.education-year-nav select,
.education-editor input:not([type="checkbox"]),
.education-editor select {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.education-editor input[type="number"] { width: 86px; }
.education-editor input[type="text"] { min-width: 220px; }
.education-editor input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.education-role-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 260px;
}
.education-role-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.user-form .education-role-option { margin-top: 0; }
.education-role-option input { margin: 0; }
.education-add-panel { margin-top: 18px; }
.education-record-evaluation {
  display: block;
  min-width: 180px;
  font-size: 12px;
  line-height: 1.4;
}
.education-record-evaluation span { display: block; }
.education-record-form { width: min(100%, 760px); }
.competency-summary,
.competency-history { margin-top: 16px; }
.competency-summary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 18px;
}
.competency-form-panel { width: min(100%, 820px); }
.competency-form-panel textarea { line-height: 1.5; }
.role-requirement-text {
  min-width: 170px;
  max-width: 280px;
  line-height: 1.45;
  vertical-align: top;
}
.role-person-link {
  display: block;
  margin-bottom: 5px;
  white-space: nowrap;
}
.qualification-requirement {
  margin-top: 12px;
  padding: 12px;
  border-left: 3px solid var(--run);
  background: #f4f7fa;
  line-height: 1.5;
}
.qualification-requirement p { margin-top: 5px; }
.filters { display: flex; gap: 8px; }
.filters button, .btn {
  border: 1px solid var(--line);
  background: #fff;
  padding: 6px 11px;
  border-radius: 7px;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--text);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.btn:hover { background: #f4f7fa; }
.filters button.active {
  background: #0b2a4a;
  color: #fff;
  border-color: #0b2a4a;
}
.btn-primary {
  background: #0b2a4a;
  color: #fff;
  border-color: #0b2a4a;
  font-weight: 600;
}
.btn-primary:hover { background: var(--sidebar-hover); }
.btn-danger {
  background: #fff;
  color: var(--danger);
  border-color: #e4aaa4;
  font-weight: 600;
}
.btn-danger:hover { background: #fdecea; }

.table-scroll { overflow-x: auto; }
.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.form-panel {
  width: min(100%, 620px);
  padding: 20px;
}
.user-form {
  display: grid;
  gap: 8px;
}
.control-test-editor { padding: 20px; }
[data-control-samples] { display: grid; gap: 12px; }
[data-control-sample] {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
[data-control-sample] legend { padding: 0 5px; font-weight: 600; }
[data-control-sample] [data-remove-sample] { justify-self: start; }
.user-form label {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
}
.user-form input:not([type="checkbox"]),
.user-form textarea,
.user-form select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}
.user-form textarea {
  resize: vertical;
}
.user-form input:not([type="checkbox"]):focus,
.user-form textarea:focus,
.user-form select:focus {
  border-color: var(--run);
  box-shadow: 0 0 0 3px rgba(29, 111, 216, 0.14);
}
.user-form .checkbox-field {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.user-form .checkbox-field input {
  width: 16px;
  height: 16px;
  margin: 0;
}
.role-fields {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.role-fields legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 700;
}
.role-fields label:first-of-type { margin-top: 0; }
.person-roles dd {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.form-error {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--danger);
  background: #fdecea;
  color: #8f291f;
  font-size: 13px;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.confirm-panel {
  width: min(100%, 520px);
  padding: 28px;
}
.confirm-panel h2 { font-size: 22px; }
.confirm-panel p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.55;
}
.confirm-panel .form-error { margin-top: 18px; }
.action-row-inline { margin-top: 24px; }

/* ===== LOGIN ===== */
.login-page {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    linear-gradient(rgba(238, 242, 246, 0.92), rgba(238, 242, 246, 0.98)),
    repeating-linear-gradient(135deg, var(--sidebar) 0 1px, transparent 1px 24px);
}
.login-panel {
  width: min(100%, 420px);
  padding: 34px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.login-brand {
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 8px;
  object-fit: cover;
}
.login-product {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.login-panel h1 {
  margin-top: 4px;
  font-size: 26px;
  line-height: 1.25;
}
.login-intro {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.login-error {
  margin-top: 20px;
  padding: 10px 12px;
  border-left: 3px solid var(--danger);
  background: #fdecea;
  color: #8f291f;
  font-size: 13px;
}
.login-form {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}
.login-form label {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
}
.login-form input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}
.login-form input:focus {
  border-color: var(--run);
  box-shadow: 0 0 0 3px rgba(29, 111, 216, 0.14);
}
.login-submit {
  min-height: 42px;
  margin-top: 14px;
  font-size: 14px;
}

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 14px;
  background: #f7fafc;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f6;
  vertical-align: middle;
}
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f6fafd; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12.5px; font-weight: 500; color: #0b2a4a; }
.muted { color: var(--muted); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}
.badge::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.s-run { background: #e8f1fc; color: var(--run); }
.s-ok { background: #e6f6ef; color: var(--ok); }
.s-wait { background: #f8eedc; color: var(--warn); }
.s-hold { background: #eee8ff; color: var(--hold); }
.s-fail { background: #fdecea; color: var(--danger); }

.prio-high { color: var(--danger); font-weight: 600; }
.prio-med { color: var(--warn); font-weight: 600; }
.prio-low { color: var(--muted); }
.person-error-list { display: grid; gap: 5px; }
.person-error-list span {
  padding-left: 10px;
  border-left: 2px solid var(--danger);
  color: var(--danger);
  font-weight: 500;
}

/* ===== NONCONFORMING WORK ===== */
/* Risk management uses shared cards, forms and table components. */
.catalog-page .page-head, .catalog-page .table-actions { flex-wrap: wrap; }
.catalog-body { padding: 18px; }
.catalog-tree { list-style: none; margin: 0; padding: 0; }
.catalog-tree .catalog-tree { margin: 4px 0 4px 10px; padding-left: 18px; border-left: 1px solid var(--line); }
.catalog-tree summary, .catalog-leaf { padding: 8px 0; overflow-wrap: anywhere; }
.catalog-tree summary, .catalog-history summary { cursor: pointer; }
.catalog-type-icon { display: inline-flex; align-items: center; margin-right: 7px; vertical-align: middle; color: var(--muted); }
.catalog-details-link { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-left: 6px; vertical-align: middle; color: var(--muted); border-radius: 4px; }
.catalog-details-link:hover, .catalog-details-link:focus-visible { color: var(--text); background: var(--line); }
.catalog-attention { display: inline-flex; align-items: center; gap: 5px; margin-left: 12px; max-width: calc(100% - 12px); overflow-wrap: anywhere; vertical-align: middle; color: var(--danger); font-size: 13px; font-weight: 600; }
.catalog-attention-icon { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 17px; height: 17px; border: 1.5px solid currentColor; border-radius: 50%; font-weight: 700; }
.catalog-tree details[open] > summary > .catalog-descendant-attention { display: none; }
.catalog-attention-control { display: flex; align-items: center; gap: 8px; }
.catalog-attention-control input[type="checkbox"] { width: auto; margin: 0; }
.catalog-path { margin-bottom: 16px; color: var(--muted); overflow-wrap: anywhere; }
.catalog-children { margin-top: 16px; }
.catalog-history { margin-bottom: 16px; }
.catalog-page td, .catalog-page h2 { overflow-wrap: anywhere; }
.catalog-page select { min-width: 0; }
.impartiality-page .page-head, .impartiality-page .table-actions { flex-wrap: wrap; }
.impartiality-table { width: 100%; table-layout: fixed; min-width: 760px; }
.impartiality-table th, .impartiality-table td { width: 25%; vertical-align: top; overflow-wrap: anywhere; white-space: normal; }
.risk-page .page-head, .risk-page .table-actions, .risk-filter { flex-wrap: wrap; }
.risk-page .page-head > div { min-width: 0; }
.risk-page h2, .risk-page td, .risk-page dd { overflow-wrap: anywhere; }
.risk-card { margin-bottom: 16px; }
.risk-card summary { cursor: pointer; }
.risk-prose { padding: 18px; line-height: 1.6; }
.risk-prose p + p { margin-top: 12px; }
.risk-filter { margin-bottom: 16px; }
.risk-filter input { min-height: 34px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; font: inherit; max-width: 100%; }
.risk-summary { margin: 12px 0 16px; color: var(--muted); font-size: 13px; }
.risk-table { min-width: 1450px; }
.risk-table td { vertical-align: top; }
.risk-table .badge { margin-top: 6px; white-space: nowrap; }
.risk-table .prio-high { margin-top: 6px; font-size: 12px; }
.risk-page .form-panel select { min-width: 0; max-width: 100%; }

.np-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0; }
.np-form .np-grid, .np-form .np-grid > div { display: contents; }
.np-card { margin-bottom: 16px; }
.np-card .person-details > div:has(+ .np-wide) { grid-column: 1 / -1; }
.np-page .page-head { flex-wrap: wrap; }
.np-page .table-actions { flex-wrap: wrap; }
.np-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.np-grid > div { display: grid; gap: 6px; min-width: 0; }
.np-wide { grid-column: 1 / -1; }
.np-section { padding: 20px; margin: 16px 0; }
.np-text { overflow-wrap: anywhere; }
.complaints-page .role-fields { min-width: 0; }
.complaints-page .role-fields legend { max-width: 100%; overflow-wrap: anywhere; }
.complaints-page .user-form input, .complaints-page .user-form select, .complaints-page .user-form textarea { min-width: 0; }
.complaints-table { min-width: 780px; }
.complaints-table td:first-child, .complaints-table td:nth-child(3), .complaints-table td:nth-child(4) { white-space: nowrap; }
.complaints-filter select { min-height: 34px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--text); font: inherit; max-width: 100%; }
.np-section summary { cursor: pointer; }
@media (max-width: 820px) { .np-grid { grid-template-columns: 1fr; } }

/* ===== AUDITS ===== */
.audit-toolbar, .audit-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.audit-toolbar { margin: 14px 0; }
.audit-section { padding: 20px; margin: 16px 0; }
.audit-section > * + * { margin-top: 12px; }
.audit-section h4 { font-size: 14px; }
.audit-section p { line-height: 1.6; }
.audit-form { width: min(100%, 900px); }
.audit-report-form { width: min(100%, 1100px); }
.audit-form .user-form, .audit-report-form .user-form { width: 100%; }
.audit-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.audit-form-grid > div, .audit-months > div { display: grid; gap: 6px; }
.audit-months { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.audit-text { overflow-wrap: anywhere; white-space: normal; }
.audit-report-heading { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; }
.audit-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.audit-details dt { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.audit-details dd { margin: 0; overflow-wrap: anywhere; }
.audit-checklist { display: grid; gap: 16px; margin-top: 16px; }
.audit-question { padding: 16px; border: 1px solid var(--line); border-radius: 6px; display: grid; gap: 8px; }
.audit-question-title { font-weight: 600; line-height: 1.6; }
.audit-question select { max-width: 220px; }
.audit-plan-table { min-width: 960px; }
.audit-report-checklist td:first-child { width: 45%; }
.audit-report-checklist td:last-child { width: 40%; }
.audit-report-checklist td { vertical-align: top; }
@media (max-width: 820px) {
  .audit-form-grid, .audit-details { grid-template-columns: 1fr; }
  .audit-report-heading { flex-wrap: wrap; }
}

@media (max-width: 1100px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .search { width: 200px; }
}
@media (max-width: 820px) {
  .sidebar { width: 220px; }
  .main { margin-left: 220px; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .person-details { grid-template-columns: 1fr; }
  .empty-state { padding-left: 0; padding-right: 0; }
  .empty-state-title { font-size: 24px; }
  .login-panel { padding: 28px 22px; }
}
@media screen and (max-width: 600px) {
  body:has(.complaints-page) { flex-direction: column; }
  body:has(.complaints-page) > .sidebar { position: static; width: 100%; height: auto; }
  .main.complaints-page { margin-left: 0; width: 100%; }
  .complaints-page .form-panel { padding: 16px; }
  .complaints-page .page-head > div { min-width: 0; }
}

/* Document details: current version first, history and management on demand. */
.catalog-overview { padding: 24px; margin: 16px 0; }
.catalog-version-main, .catalog-pending { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.catalog-version-main h3 { margin: 0; }
.catalog-version-main p, .catalog-pending p { margin: 8px 0 0; overflow-wrap: anywhere; }
.catalog-pending { padding: 16px; margin-top: 20px; background: var(--bg, #f6f8fa); border: 1px solid var(--line, #dfe5eb); border-radius: 8px; }
.catalog-pending .badge { margin-left: 12px; }
.catalog-upload { margin-top: 16px; }
.catalog-upload .user-form { max-width: 560px; margin-top: 16px; }
.catalog-secondary-actions { display: flex; flex-wrap: wrap; gap: 16px; margin: 16px 0; }
.catalog-metadata { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px 32px; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line, #dfe5eb); }
.catalog-metadata:empty, .catalog-secondary-actions:empty { display: none; }
.catalog-metadata dt { font-size: 13px; color: var(--muted, #667085); margin-bottom: 4px; }
.catalog-metadata dd { margin: 0; overflow-wrap: anywhere; }
.catalog-management { margin-top: 24px; }
.catalog-management > summary { cursor: pointer; color: var(--muted, #667085); }
.catalog-file-download { display: inline-block; margin-left: 8px; font-size: 12px; }
.catalog-file-actions { display: inline-flex; gap: 8px; }
.catalog-file-icon { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 8px; }
.catalog-preview-details { margin: 0 0 16px; overflow-wrap: anywhere; }
.catalog-obsolete-notice { margin: 16px 0; padding: 20px; border: 3px solid #b42318; background: #fff1f0; color: #8f1d18; }
.catalog-obsolete-notice strong { font-size: 20px; letter-spacing: .04em; }
.catalog-obsolete-notice p { margin: 8px 0 0; }
.catalog-preview-shell.is-obsolete { border: 5px solid #b42318; padding: 8px; background: repeating-linear-gradient(135deg,#fee4e2 0,#fee4e2 10px,#fff 10px,#fff 20px); }
.catalog-preview-shell.is-draft { border: 5px solid #a15c00; padding: 8px; background: repeating-linear-gradient(135deg,#ffe0a3 0,#ffe0a3 10px,#fff 10px,#fff 20px); }
.catalog-preview-shell.is-current { border: 2px solid #28734b; padding: 4px; background: #eef8f1; }
.catalog-preview-state { padding: 14px 16px; background: #eef8f1; color: #205c3c; overflow-wrap: anywhere; }
.catalog-preview-state strong { display: block; font-size: 18px; letter-spacing: .03em; }
.catalog-preview-state span { display: block; margin-top: 4px; }
.is-obsolete > .catalog-preview-state { background: #b42318; color: #fff; }
.is-draft > .catalog-preview-state { background: #794300; color: #fff; }
.catalog-preview-state-footer { font-weight: 700; text-align: center; }
.catalog-preview-toolbar { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.catalog-preview-toolbar button { display: inline-flex; align-items: center; gap: 8px; }
.catalog-preview-toolbar button:disabled { opacity: .45; cursor: not-allowed; }
.catalog-deleted-item { padding: 16px; border-left: 4px solid #b42318; margin: 12px 0; background: #fff1f0; }
.catalog-deleted-item strong { color: #b42318; margin-left: 12px; }
.catalog-draft-warning { margin: 0 0 20px; padding: 16px; border: 1px solid var(--danger); border-radius: 8px; background: #fff8ed; color: #713f12; }
.catalog-history-control { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin: 0 0 12px; }
.catalog-history-button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; font-size: 12px; }
.topbar.has-document-history { flex-wrap: wrap; }
.topbar > .catalog-history-control { margin: 0 0 0 auto; }
.approved-snapshot-stamp { padding: 8px 12px; border-bottom: 1px solid #999; font-size: 10px; }
.catalog-preview-frame { display: block; width: 100%; height: 75vh; height: 75dvh; min-height: 360px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
@media (max-width: 700px) { .catalog-overview { padding: 16px; } .catalog-metadata { grid-template-columns: 1fr; } }

/* F56: responsibility matrix, with document-local Jednatel column. */
.responsibility-table { min-width: 960px; table-layout: fixed; }
.responsibility-table th:first-child { width: 36%; }
.responsibility-table thead th:not(:first-child), .responsibility-table td { text-align: center; }
.responsibility-table tbody th { text-align: left; font-weight: 500; }
.responsibility-table .responsibility-owner { font-weight: 700; background: #eaf3ef; }
.responsibility-table .print-control { width: 90px; }
.responsibility-legend, .responsibility-role-key { margin: 12px 0; line-height: 1.5; }
.responsibility-prose { padding: 16px; }
.responsibility-prose p { margin: 0 0 12px; }
.responsibility-prose p:last-child { margin-bottom: 0; }

.goals-toolbar, .goals-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.goals-toolbar { margin-bottom: 20px; }
.goals-toolbar input { width: 100px; }
.goals-text { white-space: normal; overflow-wrap: anywhere; min-width: 220px; }
.goals-page .form-panel { margin-top: 20px; }
@media print { .goals-page { margin-left: 0; width: 100%; } }

.goals-page .s-failed { color: var(--danger); background: #fce8e6; }

.improvements-toolbar, .improvement-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.improvements-toolbar { margin: 16px 0; }
.improvement-description { min-width: 220px; max-width: 500px; white-space: normal; overflow-wrap: anywhere; }
.improvement-complete { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media print { .improvements-page { margin-left: 0; width: 100%; } }

.effectiveness-page .page-head { flex-wrap: wrap; gap: 12px; }
.effectiveness-toolbar { margin: 16px 0; }
.effectiveness-toolbar input { width: 100px; }
.effectiveness-notice { padding: 16px; margin: 16px 0; background: var(--accent-soft); border-radius: 8px; line-height: 1.6; }
.effectiveness-text { white-space: normal; overflow-wrap: anywhere; min-width: 180px; max-width: 400px; }
.effectiveness-evaluation-form { display: grid; gap: 8px; min-width: 240px; }
.effectiveness-evaluation-form select, .effectiveness-evaluation-form textarea { width: 100%; padding: 8px; font: inherit; border: 1px solid var(--line); border-radius: 6px; }
@media print { .effectiveness-page { margin-left: 0; width: 100%; } }

.zkousky-table { min-width: 800px; }
.zkousky-table td { vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.zkousky-table .zkousky-number { white-space: nowrap; vertical-align: top; }
.zkousky-table .zkousky-number-unaccredited { background: #fff1db; color: #874900; }
.zkousky-outside { margin-left: 2px; font-size: 0.8em; }
.zkousky-legend { margin: 12px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.pt-page .page-head { flex-wrap: wrap; gap: 12px; }
.pt-page h3 { margin: 26px 0 12px; }
.pt-page h4 { margin: 20px 0 10px; font-size: 16px; }
.pt-groups-table, .pt-items-table { table-layout: fixed; min-width: 700px; }
.pt-groups-table th:first-child, .pt-items-table th:first-child { width: 29%; }
.pt-groups-table th:nth-child(2), .pt-items-table th:nth-child(2) { width: 18%; }
.pt-groups-table th:last-child:not(:nth-child(3)), .pt-items-table th:last-child:not(:nth-child(3)) { width: 100px; }
.pt-groups-table th, .pt-groups-table td, .pt-items-table td { vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.pt-groups-table tbody th { text-transform: none; letter-spacing: normal; font-size: 13.5px; }
.pt-test-label { display: block; margin-bottom: 4px; }
.pt-legend { margin: 16px 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.pt-type { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.pt-type-external { background: #eaf2fc; color: #215b98; }
.pt-type-internal { background: #f0ecfa; color: #694392; }
.pt-test-options { margin: 12px 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; }
.pt-test-options legend { padding: 0 6px; font-weight: 600; }
.pt-test-options .checkbox-field { align-items: flex-start; font-weight: 400; }
.pt-test-options input[type="checkbox"] { flex-shrink: 0; margin-top: 2px; }

.pt-plan-table { table-layout: fixed; min-width: 650px; }
.pt-plan-table th:first-child { width: 15%; }
.pt-plan-table th:nth-child(2) { width: 36%; }
.pt-plan-table th:nth-child(3) { width: 16%; }
.pt-plan-table th:nth-child(5) { width: 110px; }
.pt-plan-table td { vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.pt-plan-table .btn { white-space: nowrap; }
.pt-test-number { white-space: nowrap; cursor: help; }
a.pt-test-number { cursor: pointer; }

/* PT execution records and live plan progress. */
.pt-record-form { width: min(100%, 850px); }
.pt-form-columns { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
.pt-record-summary { padding: 16px 20px; }
.pt-record-summary dl { display: grid; grid-template-columns: 130px 1fr; gap: 10px 20px; margin: 0; }
.pt-record-summary dt { color: var(--muted); }
.pt-record-summary dd { margin: 0; overflow-wrap: anywhere; }
.pt-record-result { display: inline-flex; align-items: baseline; gap: 5px; margin: 3px 10px 3px 0; flex-wrap: wrap; }
.pt-result { display: inline-block; padding: 3px 7px; border-radius: 5px; font-size: 12px; font-weight: 600; }
.pt-result-passed { color: #20643c; background: #e9f6ed; }
.pt-result-failed { color: #a32929; background: #fdeaea; }
.pt-result-planned { color: #596476; background: #f0f2f5; }
.pt-test-passed { color: #20643c; font-weight: 700; }
.pt-test-failed { color: #a32929; font-weight: 700; }
.pt-test-planned { color: var(--text); font-weight: 700; }
.pt-test-badge { white-space: normal; overflow-wrap: anywhere; max-width: 100%; line-height: 1.5; }
.pt-missing-np { color: #9a540b; font-size: 12px; }
.pt-progress-link { margin-top: 5px; font-size: 12px; }
.pt-plan-table:has(th:nth-child(6)) { min-width: 880px; }
.pt-plan-table:has(th:nth-child(6)) th:nth-child(2) { width: 28%; }
.pt-plan-table:has(th:nth-child(6)) th:nth-child(5) { width: 20%; }
.pt-plan-table:has(th:nth-child(6)) th:nth-child(6) { width: 100px; }
.pt-results-form { min-width: 500px; }
.pt-results-form th:first-child { width: 90px; }
.pt-record-form [hidden] { display: none; }
@media (max-width: 600px) { .pt-form-columns { grid-template-columns: 1fr; } }

/* Shared F25 autosave controls and the people/test matrix. */
.assignment-cell { display: grid; gap: 8px; min-width: 160px; }
.assignment-cell select { width: 100%; font: inherit; }
.assignment-sign { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.assignment-cell small { min-height: 1em; color: var(--muted); }
.assignment-cell.has-error small { color: #b91c1c; }
.assignment-matrix { max-height: 70vh; overflow: auto; }
.assignment-matrix table { border-collapse: separate; border-spacing: 0; }
.assignment-matrix thead th { position: sticky; top: 0; z-index: 2; background: #f1f5f9; min-width: 180px; }
.assignment-matrix th small { display: block; font-weight: normal; max-width: 210px; white-space: normal; }
.assignment-matrix tbody th { position: sticky; left: 0; z-index: 1; background: #fff; min-width: 180px; }
.assignment-matrix thead th:first-child { left: 0; z-index: 3; }
.assignment-matrix td { vertical-align: top; }
[data-assignment-editor] [hidden] { display: none !important; }
.assignment-cell select[size="3"] { height: auto; padding: 3px; border-radius: 5px; }
.assignment-cell select[size="3"] option { padding: 5px 8px; }
.assignment-save-indicator { display: inline-flex; align-items: center; gap: 6px; min-height: 20px; opacity: 1; }
.assignment-save-indicator::before { display: inline-block; flex: 0 0 auto; }
.assignment-save-indicator[data-state="saving"]::before,
.assignment-save-indicator[data-state="pending"]::before { content: ""; width: 14px; height: 14px; border: 2px solid #cbd5e1; border-top-color: #2563eb; border-radius: 50%; animation: assignment-spin .7s linear infinite; }
.assignment-save-indicator[data-state="saved"]::before { content: "✓"; color: #15803d; font-size: 20px; font-weight: bold; line-height: 1; }
.assignment-save-indicator[data-state="error"] { color: #b91c1c; }
.assignment-save-indicator.is-fading { opacity: 0; transition: opacity .6s ease; }
.assignment-status-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@keyframes assignment-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .assignment-save-indicator[data-state="saving"]::before,
  .assignment-save-indicator[data-state="pending"]::before { animation: none; }
  .assignment-save-indicator.is-fading { transition: none; }
}
.inventory-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0; }
.inventory-filter input[type="search"] { min-width: 180px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
.inventory-page .panel { margin-bottom: 18px; }
.inventory-page td { overflow-wrap: anywhere; }
.inventory-page th { text-align: left; }
.inventory-source { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Start years left-to-right; measured grid spans pack later cards by available height. */
.inventory-years { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; gap: 14px; margin-top: 18px; }
.inventory-years.is-masonry { grid-auto-rows: 1px; row-gap: 0; }
.inventory-year { width: 100%; box-sizing: border-box; margin: 0; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 3px 12px #0a294707; overflow: hidden; }
.inventory-year-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; background: #f4f8fc; border-bottom: 1px solid var(--line); }
.inventory-year-head h3 { margin: 0; font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.inventory-year-head h3 span { font-size: 9px; letter-spacing: .12em; vertical-align: middle; color: #60758a; }
.inventory-year-head > span { font-size: 11px; color: #60758a; }
.inventory-items { list-style: none; margin: 0; padding: 3px 10px; }
.inventory-item { display: flex; align-items: center; gap: 5px; min-height: 37px; padding: 5px 0; border-bottom: 1px solid #edf1f5; }
.inventory-item:last-child { border-bottom: 0; }
.inventory-item-label { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1; color: inherit; font-size: 12px; line-height: 1.4; text-decoration: none; }
.inventory-item-number { flex: 0 0 42px; font-size: 10px; color: #647a90; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inventory-item-name { overflow-wrap: anywhere; }
.inventory-qty { border-radius: 7px; padding: 2px 4px; background: #edf3f9; color: #526f89; font-size: 10px; white-space: nowrap; }
.inventory-item-actions, .inventory-item-actions form { display: flex; gap: 1px; align-items: center; flex-shrink: 0; margin: 0; }
.inventory-icon { display: inline-flex; justify-content: center; align-items: center; width: 26px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #688096; cursor: pointer; text-decoration: none; }
.inventory-icon:hover { color: #123e61; background: #edf3f9; }
.inventory-icon-delete:hover { color: #a33131; background: #fff0ee; }
.inventory-icon:focus-visible, .inventory-item-label:focus-visible { outline: 2px solid #2479b0; outline-offset: 2px; }
@media (max-width: 600px) { .inventory-years { grid-template-columns: 1fr; } .inventory-icon { width: 28px; min-height: 30px; } }

/* MZZ / F3 vz. 26 */
.mzz-form-grid, .mzz-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 24px; }
.mzz-form-grid > div { display:grid; align-content:start; gap:6px; }
.mzz-form-grid input, .mzz-form-grid select, .mzz-form-grid textarea { width:100%; min-width:0; }
.mzz-page .mzz-form-grid [aria-invalid="true"], .mzz-page .mzz-form-grid :user-invalid { border:2px solid #b42318; background:#fff4f2; outline-color:#b42318; }
.mzz-page .mzz-form-grid [aria-invalid="true"]:focus, .mzz-page .mzz-form-grid :user-invalid:focus { border-color:#b42318; box-shadow:0 0 0 3px rgba(180,35,24,.16); }
.mzz-form-grid > div:has([aria-invalid="true"]) > label, .mzz-field-error { color:#b42318; }
.mzz-field-error { margin:0; font-size:13px; }
.mzz-error-summary { margin-bottom:18px; padding:12px 16px; border:1px solid #b42318; border-radius:8px; background:#fff4f2; }
.mzz-error-summary p { margin:0; font-weight:600; }
.mzz-error-summary ul { margin:8px 0 0; padding-left:20px; }
.mzz-error-summary a { color:#b42318; }
.mzz-interval-unit { margin:0; padding:0; border:0; min-width:0; }
.mzz-interval-unit legend { font-size:12px; color:var(--muted); margin-bottom:5px; }
.mzz-unit-toggle { display:inline-flex; gap:0; }
.mzz-unit-toggle label { position:relative; cursor:pointer; }
.mzz-page .mzz-unit-toggle input { position:absolute; width:1px; height:1px; padding:0; margin:0; opacity:0; }
.mzz-unit-toggle span { display:block; padding:7px 16px; border:1px solid var(--line); background:#fff; }
.mzz-unit-toggle label:first-child span { border-radius:6px 0 0 6px; }
.mzz-unit-toggle label:last-child span { border-radius:0 6px 6px 0; }
.mzz-unit-toggle input:checked + span { color:#fff; background:var(--run); border-color:var(--run); }
.mzz-unit-toggle input:focus-visible + span { outline:2px solid var(--run); outline-offset:3px; }
.mzz-wide { grid-column:1 / -1; }
.mzz-details { margin:0; }
.mzz-details dt { color:var(--muted); font-size:12px; margin-bottom:4px; }
.mzz-details dd { margin:0; white-space:normal; overflow-wrap:anywhere; }
.mzz-page .panel + .panel { margin-top:18px; }
.mzz-page td { vertical-align:top; overflow-wrap:anywhere; }
@media (max-width:800px) { .mzz-form-grid, .mzz-details { grid-template-columns:1fr; } }
@media print { .mzz-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 20px; } .mzz-details dd { margin:0; } .mzz-wide { grid-column:1 / -1; } }
