.entry-shell { max-width: 32rem; margin: 4rem auto; padding: 1.5rem; }
.forbidden-page {
  display: flex;
  min-height: 100dvh;
  padding: 24px;
  background: #f0f4f8;
  color: #172033;
}
.forbidden-card {
  width: 100%;
  max-width: 32rem;
  margin: auto;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  background: #fff;
  text-align: center;
  box-shadow: 0 12px 32px rgba(23, 32, 51, 0.08);
}
.forbidden-brand { margin: 0 0 28px; color: #526070; font-size: 0.9rem; font-weight: 700; }
.forbidden-icon { width: 48px; height: 48px; margin-bottom: 16px; color: #073b66; }
.forbidden-card h1 { margin: 0 0 12px; font-size: clamp(1.4rem, 4vw, 1.8rem); line-height: 1.4; }
.forbidden-description { margin: 0 0 28px; color: #526070; line-height: 1.7; word-break: keep-all; }
.forbidden-dashboard-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 8px;
  background: #073b66;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.forbidden-dashboard-link:hover { background: #115a92; }
.forbidden-dashboard-link:focus-visible { outline: 3px solid #0e7490; outline-offset: 3px; }
.route-error { margin: 1rem 1.5rem; padding: 0.75rem 1rem; border: 1px solid #b45309; background: #fff7ed; color: #7c2d12; border-radius: 8px; }
.mutation-conflict { margin: 0.75rem 0; padding: 0.75rem; border: 1px solid #b45309; background: #fff7ed; border-radius: 8px; }
.hard-delete-dialog { margin: 0.75rem 0; padding: 0.75rem; border: 1px solid #9f1239; background: #fff1f2; border-radius: 8px; }

.upload-details-form,
.posting-editor {
  margin: 0.75rem 0 1.25rem;
}

.form-section {
  margin: 0 0 12px;
  padding: 14px 16px 16px;
  border: 1px solid #e4eaf1;
  border-radius: 12px;
  background: #fff;
}

.form-section legend {
  padding: 0 6px;
  color: #111827;
  font-size: 0.95rem;
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.upload-details-form label,
.posting-editor label,
.posting-assign label {
  display: block;
  color: #344054;
  font-size: 0.85rem;
  font-weight: 700;
}

.upload-details-form input,
.upload-details-form select,
.posting-editor input,
.posting-editor select,
.posting-editor textarea,
.posting-assign select {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #d0d7e2;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-weight: 600;
}

.posting-editor textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.45;
}

.upload-details-form input:focus,
.upload-details-form select:focus,
.posting-editor input:focus,
.posting-editor select:focus,
.posting-editor textarea:focus,
.posting-assign select:focus {
  border-color: #0e7490;
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.16);
  outline: none;
}

.field-help {
  margin: 0 0 8px;
  color: #667085;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.45;
}

label .field-help {
  display: block;
  margin: 6px 0 0;
}

.req {
  color: #9f1239;
}

.form-actions,
.posting-card-actions,
.posting-assign {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.form-actions {
  margin-top: 4px;
}

.posting-diff:empty {
  display: none;
}

.posting-diff {
  margin: 0 0 12px;
  color: #344054;
  font-size: 0.85rem;
  font-weight: 700;
}

.posting-list-toolbar {
  gap: 10px;
  padding: 16px;
  border: 1px solid #e3eaf2;
  border-radius: 14px;
  background: #fff;
}
.posting-list-toolbar .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.posting-search { flex: 1 1 260px; min-width: 160px; }
.posting-filter { flex: 0 1 140px; }
.posting-list-toolbar input, .posting-list-toolbar select {
  width: 100%; min-height: 42px; padding: 10px 12px;
  border: 1px solid #d5dfeb; border-radius: 9px; background: #f8fafc;
  color: #243b53; font: inherit; font-size: 0.88rem; box-sizing: border-box;
}
.posting-list-toolbar input:focus-visible, .posting-list-toolbar select:focus-visible {
  outline: 2px solid #0b6e8a; outline-offset: 2px; background: #fff;
}
.posting-list-toolbar #open-posting-create { min-height: 42px; margin-left: auto; }
.posting-list-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; min-height: 32px; margin: 14px 2px 8px; }
.posting-list-count { margin: 0; color: #58687a; font-size: 0.85rem; font-weight: 600; }
.posting-table-wrap { margin-top: 10px; border-radius: 14px; border: 1px solid #e1e8f0; }
.admin-page .posting-table { min-width: 0; width: 100%; table-layout: fixed; }
.posting-table th:nth-child(1) { width: auto; }
.posting-table th:nth-child(2) { width: 9%; }
.posting-table th:nth-child(3) { width: 10%; }
.posting-table th:nth-child(4) { width: 13%; }
.posting-table th:nth-child(5) { width: 25%; }
.posting-table th:nth-child(6) { width: 140px; }
.admin-page .posting-table th {
  padding: 14px 12px; background: #f4f7fb; color: #52657a;
  font-size: 0.8rem; font-weight: 700; white-space: normal;
}
.admin-page .posting-table td {
  padding: 20px 12px; vertical-align: top; white-space: normal;
  border-bottom: 1px solid #e9eef5; overflow-wrap: anywhere;
}
.admin-page .posting-table tbody tr:last-child td { border-bottom: 0; }
.admin-page .posting-table tbody tr:hover { background: #f9fbfe; }
.admin-page .posting-table tbody tr[data-posting-status="archived"] { background: #fafbfc; }
.posting-title-line { display: flex; align-items: flex-start; gap: 12px; }
.posting-title-copy { min-width: 0; }
.posting-document-mark {
  display: block; flex: 0 0 36px; width: 36px; height: 42px;
  border: 1px solid #d9e9ed; border-radius: 9px; background: #edf7f8;
  position: relative;
}
.posting-document-mark::before {
  content: ""; position: absolute; inset: 11px 11px 9px;
  border: 1.5px solid #16778a; border-radius: 2px;
}
.posting-document-mark::after {
  content: ""; position: absolute; left: 15px; right: 15px; top: 18px;
  height: 2px; background: #16778a; box-shadow: 0 5px #16778a;
}
.posting-family { display: block; margin-bottom: 4px; color: #58687a; font-size: 0.78rem; font-weight: 600; }
.posting-name { display: block; color: #163a58; font-size: 1rem; line-height: 1.5; font-weight: 750; }
.posting-used-summary, .posting-deleted-label, .posting-draft-note {
  display: block; margin-top: 7px; color: #58687a; font-size: 0.76rem; line-height: 1.5;
}
.posting-location { color: #41556a; font-size: 0.86rem; line-height: 1.6; }
.posting-versions { display: grid; gap: 9px; min-width: 0; }
.posting-current-version { display: flex; align-items: center; gap: 7px; color: #58687a; font-size: 0.82rem; font-weight: 650; line-height: 1.5; }
.posting-current-version.is-published { color: #0a6c55; }
.posting-version-dot { width: 6px; height: 6px; border-radius: 50%; background: #139876; flex-shrink: 0; }
.posting-version { display: grid; gap: 8px; padding: 8px 0; }
.posting-version--draft { padding: 10px; border: 1px solid #e1e8f1; border-radius: 10px; background: #fff; }
.posting-version-label, .posting-version-actions, .posting-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.posting-version-no { color: #41556a; font-size: 0.78rem; font-weight: 650; }
.posting-version .status-pill { font-size: 0.72rem; padding: 3px 7px; }
.posting-version-actions .small { padding: 5px 9px; font-size: 0.76rem; }
.posting-row-actions { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px; }
.posting-row-actions .small { min-height: 32px; white-space: nowrap; }
.posting-delete-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px;
  width: 32px; height: 32px; padding: 0; border: 1px solid #e5d6d8; border-radius: 8px;
  background: #fff; color: #a3444a; cursor: pointer;
}
.posting-delete-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.posting-delete-btn:hover:not(:disabled) { background: #fff1f2; border-color: #dcaeb3; }
.posting-delete-btn:focus-visible { outline: 2px solid #a3444a; outline-offset: 3px; }
.posting-delete-btn:disabled { opacity: 0.5; cursor: wait; }
.posting-text-action {
  border: 0; border-radius: 6px; background: transparent; color: #52657a;
  font: inherit; font-size: 0.78rem; padding: 6px 8px; cursor: pointer;
}
.posting-text-action--danger { color: #9c3d42; }
.posting-text-action--danger:hover { background: #fff1f2; }
.posting-text-action:focus-visible { outline: 2px solid #0b6e8a; outline-offset: 2px; }
.posting-text-action:disabled { opacity: 0.6; cursor: wait; }
.posting-history summary, .posting-use summary { color: #52657a; font-size: 0.76rem; cursor: pointer; width: fit-content; padding: 3px 0; }
.posting-history summary:focus-visible, .posting-use summary:focus-visible { outline: 2px solid #0b6e8a; outline-offset: 3px; border-radius: 3px; }
.posting-history-list { margin-top: 5px; padding-left: 10px; border-left: 2px solid #e5eaf1; }
.posting-use { margin-top: 5px; }
.posting-use ul { margin: 5px 0 0; padding-left: 16px; color: #58687a; font-size: 0.76rem; line-height: 1.6; }
.posting-empty button { display: block; margin: 12px auto 0; }

@media (max-width: 1100px) {
  .posting-document-mark { display: none; }
  .posting-title-line { gap: 0; }
}
@media (max-width: 600px) {
  .admin-page:has(#job-postings-panel.active) .admin-nav-drawer {
    position: relative; inset: auto; width: 100%; height: auto; padding: 10px 12px;
    border-right: 0; border-bottom: 1px solid #e1e8f0; display: block;
  }
  .admin-page:has(#job-postings-panel.active) .admin-tabs {
    display: flex; flex-direction: row; gap: 8px; overflow-x: auto; align-items: center;
  }
  .admin-page:has(#job-postings-panel.active) .admin-nav-dev:not([hidden]) { display: contents; }
  .admin-page:has(#job-postings-panel.active) .admin-tab {
    display: inline-flex; flex: 0 0 auto; width: auto; min-height: 42px; margin: 0;
    padding: 8px 10px; white-space: nowrap; transform: none;
  }
  .admin-page:has(#job-postings-panel.active) .admin-tab-desc,
  .admin-page:has(#job-postings-panel.active) .admin-tab-meta,
  .admin-page:has(#job-postings-panel.active) .admin-nav-dev-label { display: none; }
  .admin-page:has(#job-postings-panel.active) .admin-layout { padding: 0 12px !important; }
  .posting-list-toolbar { display: grid; grid-template-columns: 1fr 1fr; padding: 12px; }
  .posting-search { grid-column: 1 / -1; }
  .posting-list-toolbar #open-posting-create { grid-column: 1 / -1; width: 100%; margin: 0; }
  .admin-page .posting-table-wrap { border: 0; background: transparent; overflow: visible; }
  .admin-page .posting-table { display: block; min-width: 0; }
  .posting-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .posting-table tbody { display: grid; gap: 14px; }
  .posting-table tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #e1e8f0; border-radius: 13px; background: #fff; overflow: hidden; }
  .admin-page .posting-table td { display: block; padding: 12px; border: 0; }
  .posting-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 7px; color: #58687a; font-size: 0.72rem; font-weight: 600; }
  .posting-table .posting-title-cell, .posting-table .posting-version-cell, .posting-table .posting-management-cell, .posting-table .posting-empty { grid-column: 1 / -1; }
  .admin-page .posting-table .posting-title-cell { padding: 18px 14px 8px; }
  .admin-page .posting-table .posting-version-cell { border-top: 1px solid #e9eef5; }
  .admin-page .posting-table .posting-management-cell { background: #f8fafc; }
  .posting-table .posting-management-cell::before { display: none; }
  .posting-row-actions { flex-direction: row; justify-content: flex-end; }
  .posting-row-actions .small { min-width: 94px; }
  .posting-document-mark { display: block; }
  .posting-title-line { gap: 10px; }
}

.posting-modal-box {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  text-align: left;
  box-sizing: border-box;
}

.posting-modal-box > .detail-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.posting-modal-box .posting-editor {
  margin: 0;
}

.posting-modal-actions {
  justify-content: flex-end;
}

.posting-status--draft { border-color: #eddeb5; background: #fff4da; color: #805409; }
.posting-status--published,
.posting-status--active { border-color: #cfe8dd; background: #eff8f3; color: #12663f; }
.posting-status--superseded { background: #f2f4f7; color: #667085; }
.posting-status--archived { border-color: #f5c2c7; background: #fff1f2; color: #9f1239; }

.analysis-run {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid #e4eaf1;
  border-radius: 10px;
  background: #fff;
}

.analysis-run strong {
  color: #111827;
  font-size: 0.9rem;
}

.analysis-run .run-meta {
  margin-left: auto;
}

.route-raw,
.run-meta {
  color: #98a2b3;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 500;
}

.dashboard-page #detail-modal .assistant-chat-fab {
  position: absolute;
  right: 1.35rem;
  bottom: calc(1.35rem + 70px);
  z-index: 60;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  width: 58px;
  height: 58px;
  min-width: 58px;
  max-width: 58px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #0b3d6e;
  color: #fff;
  box-shadow: 0 10px 28px rgba(11, 61, 110, 0.32);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-page #detail-modal .assistant-chat-fab[hidden] {
  display: none;
}

.dashboard-page #detail-modal .assistant-chat-fab:hover,
.dashboard-page #detail-modal .assistant-chat-fab:focus-visible {
  background: #0e4f8a;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(11, 61, 110, 0.38);
  outline: none;
}

.dashboard-page #detail-modal .assistant-chat-fab.is-active {
  background: #094a86;
  box-shadow: 0 0 0 3px rgba(11, 61, 110, 0.18), 0 10px 28px rgba(11, 61, 110, 0.32);
}

.dashboard-page #detail-modal .assistant-chat-fab-icon {
  display: block;
  width: 22px;
  height: 22px;
}

.dashboard-page #detail-modal .assistant-chat-fab-label {
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
}

.dashboard-page #detail-modal .assistant-chat-popup {
  position: absolute;
  right: calc(1.35rem + 72px);
  bottom: 1.35rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: min(360px, calc(100% - 7rem));
  height: min(440px, calc(100% - 6rem));
  border: 1px solid #d8e1eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.dashboard-page #detail-modal .assistant-chat-popup[hidden] {
  display: none;
}

.assistant-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #0b3d6e;
  color: #fff;
}

.assistant-chat-head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.assistant-chat-close {
  min-height: 0;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
}

.assistant-chat-body {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #f8fafc;
}

.assistant-chat-notice {
  margin: 0;
  color: #667085;
  font-size: 0.9rem;
  font-weight: 700;
}

.assistant-chat-input {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 10px 12px;
  border-top: 1px solid #e4eaf1;
}

.assistant-chat-input textarea {
  flex: 1;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d0d7e2;
  border-radius: 8px;
  background: #f2f4f7;
  color: #98a2b3;
  font: inherit;
  resize: none;
}

.assistant-chat-input button:disabled,
.assistant-chat-input textarea:disabled {
  cursor: not-allowed;
}

.detail-developer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed #d0d7e2;
}

.detail-developer-actions[hidden] {
  display: none;
}

@media (max-width: 800px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .span-2 {
    grid-column: auto;
  }

  .posting-assign,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .posting-assign label {
    flex: none;
  }
}
