:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18322d;
  background: #f3f6f3;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(219, 234, 223, .7), transparent 34rem),
    #f3f6f3;
}

button, input { font: inherit; }

.admin-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.topbar, .panel-heading, .actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar { margin-bottom: 24px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.04em; }
h2 { margin-bottom: 8px; font-size: 1.35rem; }
p { line-height: 1.55; }

.eyebrow {
  margin-bottom: 6px;
  color: #60756d;
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.admin-label {
  padding: 9px 13px;
  border: 1px solid #c5d5cb;
  border-radius: 999px;
  color: #315447;
  background: #e6efe8;
  font-size: .85rem;
  font-weight: 750;
  white-space: nowrap;
}

.panel {
  margin: 16px 0;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid #d9e2dc;
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 40px rgba(24, 50, 45, .06);
}

.panel > p { max-width: 65ch; color: #54675f; }

form { display: grid; gap: 10px; max-width: 440px; }
form[hidden] { display: none; }
label { margin-top: 8px; color: #334b42; font-size: .9rem; font-weight: 700; }
input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #bdcbc2;
  border-radius: 10px;
  color: #18322d;
  background: #fff;
}
input:focus-visible, button:focus-visible {
  outline: 3px solid #8bbca1;
  outline-offset: 2px;
}

button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #194b3a;
  border-radius: 10px;
  color: white;
  background: #194b3a;
  font-weight: 750;
  cursor: pointer;
}
form button { margin-top: 8px; }
button:hover:not(:disabled) { background: #246148; }
button:disabled { cursor: wait; opacity: .58; }
.button-secondary {
  border-color: #cbd7cf;
  color: #294b3d;
  background: #f5f8f5;
}
.button-secondary:hover:not(:disabled) { background: #eaf1eb; }

.notice {
  margin: 16px 0;
  padding: 15px 17px;
  border: 1px solid #c8d9ce;
  border-radius: 12px;
  color: #315447;
  background: #edf5ef;
  line-height: 1.55;
}
.notice-error {
  border-color: #e7c3ba;
  color: #7c3529;
  background: #fff3ef;
}
.notice h2 { color: inherit; }
.notice p:last-child { margin-bottom: 0; }
.actions { justify-content: flex-start; flex-wrap: wrap; margin: 18px 0 8px; }
.status-message { min-height: 1.6em; margin-bottom: 8px; color: #566b61; }
.status-message[data-kind="error"] { color: #9a382c; }
.status-message[data-kind="success"] { color: #246148; }

.table-scroll { overflow-x: auto; margin-top: 14px; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 12px 10px; border-bottom: 1px solid #e2e9e4; text-align: left; vertical-align: top; }
th { color: #5b6d64; font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; }
td { color: #29443a; }
.run-status { font-weight: 750; text-transform: capitalize; }
.run-id { display: block; margin-top: 4px; color: #718078; font-family: ui-monospace, monospace; font-size: .72rem; }

[hidden] { display: none !important; }

@media (max-width: 620px) {
  .admin-shell { width: min(100% - 20px, 980px); padding-top: 18px; }
  .topbar { align-items: flex-start; }
  .panel-heading { align-items: flex-start; }
  .table-scroll { margin-right: -8px; }
  table { min-width: 720px; }
}

.submission-review { margin-top: 32px; padding-top: 28px; border-top: 1px solid #d9e2dc; }
.submission-review .panel-heading { flex-wrap: wrap; }
.submission-card { max-width: none; margin: 18px 0; padding: 18px; border: 1px solid #d9e2dc; border-radius: 12px; background: #f8faf8; }
.submission-card h3 { margin: 0; }
.submission-card p { margin: 4px 0; color: #53685e; }
.submission-card textarea { width: 100%; min-height: 90px; padding: 10px 12px; border: 1px solid #bdcbc2; border-radius: 10px; font: inherit; }
.submission-card .actions { margin: 10px 0 0; }

.review-section{margin-top:32px;padding-top:28px;border-top:1px solid #d9e2dc}.review-section>p{max-width:70ch;color:#54675f}.review-source-link{color:#19533f;font-size:.78rem;font-weight:700}.event-actions{display:flex;gap:8px;flex-wrap:wrap}.event-actions button{min-height:36px;padding:7px 10px;font-size:.78rem;white-space:nowrap}

.topbar-actions { display: flex; align-items: center; gap: 10px; }
.demo-management { margin-top: 30px; padding: 20px; border: 1px solid #ceddd2; border-radius: 14px; background: #f3f8f4; }
.demo-count { margin: 0; color: #315447; font-weight: 750; }
.button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border: 1px solid #cbd7cf; border-radius: 10px; color: #294b3d; text-decoration: none; font-weight: 750; }
.password-help { margin-top: 12px; background: transparent; }
.password-help:hover:not(:disabled) { background: #eaf1eb; }
.button-danger { border-color: #9a382c; background: #9a382c; }
.button-danger:hover:not(:disabled) { background: #7c2e24; }
.event-card-list { display: grid; gap: 16px; }
.review-group { display: grid; gap: 12px; margin-top: 20px; }
.review-group > h3 { margin: 0; color: #315447; font-size: 1rem; }
.event-review-card { padding: 18px; border: 1px solid #d9e2dc; border-radius: 14px; background: #fbfcfb; }
.source-evidence { margin-top: 12px; padding: 12px 14px; border-left: 3px solid #88a997; border-radius: 6px; background: #f1f6f2; color: #40594c; }
.source-evidence h4 { margin: 0 0 6px; font-size: .82rem; }
.source-evidence ul { display: grid; gap: 4px; margin: 0; padding-left: 18px; font-size: .78rem; line-height: 1.45; overflow-wrap: anywhere; }
.event-review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.event-review-head h3 { margin: 0; font-size: 1.1rem; }
.event-review-head h3 { flex: 1; }
.bulk-select { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: #194b3a; }
.priority-badge { padding: 5px 9px; border-radius: 999px; font-size: .76rem; font-weight: 750; white-space: nowrap; }
.priority-badge.is-high { color: #194b3a; background: #d5ecdc; }
.priority-badge.is-medium { color: #6b4a12; background: #f6e7c8; }
.priority-badge.is-low { color: #743e32; background: #f8e2dc; }
.priority-reasons { margin: 8px 0 0; color: #53685e; font-size: .82rem; }
.shadow-badge { padding: 5px 9px; border: 1px dashed currentColor; border-radius: 999px; font-size: .76rem; font-weight: 750; white-space: nowrap; }
.shadow-badge.is-pass { color: #1f4f7a; background: #e4eef8; }
.shadow-badge.is-flagged { color: #7a1f3d; background: #f8e4ec; }
.shadow-flags { margin: 8px 0 0; padding: 8px 10px; border-radius: 9px; color: #7a1f3d; background: #fbeef3; font-size: .82rem; }
.shadow-summary { margin: 6px 0 0; color: #1f4f7a; font-size: .9rem; }
.priority-summary { margin: 16px 0 0; color: #315447; font-weight: 700; }
.bulk-review-bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 12px; border: 1px solid #d9e2dc; border-radius: 12px; background: #fff; box-shadow: 0 2px 8px rgba(24, 50, 45, .08); }
.bulk-review-count { margin: 0 6px 0 0; font-weight: 750; }
.bulk-review-bar input { flex: 1 1 180px; min-height: 40px; padding: 8px 10px; border: 1px solid #bdcbc2; border-radius: 9px; font: inherit; }
.review-badge { padding: 5px 9px; border-radius: 999px; color: #315447; background: #e6efe8; font-size: .76rem; font-weight: 750; text-transform: capitalize; white-space: nowrap; }
.event-edit-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: none; margin-top: 14px; }
.event-edit-form > label { display: grid; gap: 6px; margin: 0; }
.category-choices { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 14px; border: 1px solid #d9e2dc; border-radius: 10px; }
.category-choices legend { padding: 0 5px; color: #334b42; font-size: .9rem; font-weight: 750; }
.category-choice { display: grid; grid-template-columns: 20px 1fr; align-items: start; gap: 2px 9px; margin: 0; padding: 9px; border: 1px solid #d9e2dc; border-radius: 9px; background: #fff; cursor: pointer; }
.category-choice.is-suggested { border-color: #91b59f; background: #f0f7f1; }
.category-choice input { grid-row: span 2; width: 18px; min-height: 18px; margin: 2px 0 0; accent-color: #194b3a; }
.category-choice-name { font-size: .84rem; }
.category-choice-evidence { color: #53685e; font-size: .73rem; font-weight: 500; line-height: 1.4; }
.category-choice-evidence.is-low-confidence { color: #8b4a20; }
.category-no-suggestion { grid-column: 1 / -1; margin: 0; color: #53685e; font-size: .82rem; }
.event-edit-form select, .event-edit-form input { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #bdcbc2; border-radius: 9px; color: #18322d; background: white; font: inherit; }
.event-edit-form .category-choice input { width: 18px; min-height: 18px; padding: 0; border: 0; }
.event-edit-form .review-source-link, .event-edit-form .event-evidence, .event-edit-form .event-requirements, .event-edit-form .event-actions, .event-edit-form .event-history { grid-column: 1 / -1; }
.event-edit-form .review-source-link { overflow-wrap: anywhere; }
.event-evidence, .event-requirements { margin: 0; color: #53685e; font-size: .87rem; }
.event-requirements { padding: 10px 12px; border-radius: 9px; color: #743e32; background: #f8e8e2; }
.event-edit-form .tag-option { display: flex; align-items: center; gap: 8px; }
.event-edit-form .tag-option input { width: 20px; min-height: 20px; }
.event-edit-form .event-actions { margin: 0; }
.event-history { padding: 10px 12px; border-left: 3px solid #cbd7cf; background: #f5f8f5; }
.audit-entry + .audit-entry { margin-top: 12px; padding-top: 12px; border-top: 1px solid #d9e2dc; }
.audit-entry p { margin-bottom: 4px; font-weight: 700; }
.audit-entry ul { margin: 0; padding-left: 20px; }
@media (max-width: 620px) {
  .topbar-actions { align-items: flex-end; flex-direction: column; gap: 6px; }
  .demo-management { padding: 16px; }
  .demo-management .panel-heading { flex-direction: column; }
  .event-review-card { padding: 14px; }
  .event-edit-form { grid-template-columns: 1fr; }
  .category-choices { grid-template-columns: 1fr; grid-column: 1; }
  .event-edit-form .review-source-link, .event-edit-form .event-evidence, .event-edit-form .event-requirements, .event-edit-form .event-actions, .event-edit-form .event-history { grid-column: 1; }
}

.candidate-change-card { border-left: 4px solid #d3a254; }
.candidate-change-diff { margin: 6px 0; color: #263e35; font-size: .9rem; overflow-wrap: anywhere; }
.candidate-change-card .actions { margin-top: 12px; }

.source-health-filters { max-width: none; grid-template-columns: minmax(180px, 2fr) repeat(2, minmax(150px, 1fr)) auto; align-items: end; gap: 8px 12px; margin: 18px 0; }
.source-health-filters label { margin: 0; }
.source-health-filters input, .source-health-filters select { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #bdcbc2; border-radius: 9px; color: #18322d; background: white; font: inherit; }
.source-health-card .source-health-detail { margin: 6px 0; color: #53685e; font-size: .86rem; overflow-wrap: anywhere; }
.source-health-history { margin-top: 12px; padding: 10px 12px; border: 1px solid #d9e2dc; border-radius: 10px; }
.source-health-history summary { cursor: pointer; color: #19533f; font-weight: 700; }
.source-health-history-entry { margin: 8px 0; color: #53685e; font-size: .82rem; overflow-wrap: anywhere; }
.source-health-history button { margin-top: 6px; }
.source-health-detail strong { color: #334b42; }
.source-health-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; }
.source-health-pagination span { color: #53685e; font-size: .88rem; font-weight: 700; }
.source-health-help { margin-top: 14px; font-size: .85rem; }
@media (max-width: 620px) {
  .source-health-filters { grid-template-columns: 1fr; }
  .source-health-filters button { width: 100%; }
  .source-health-pagination { justify-content: space-between; }
}

.admin-dashboard { margin-top: 16px; }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding: 22px clamp(18px, 4vw, 30px); border: 1px solid #d9e2dc; border-radius: 18px; background: rgba(255,255,255,.94); }
.dashboard-heading h2 { margin: 0; }
.dashboard-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 8px; border: 1px solid #d9e2dc; border-radius: 14px; background: #eaf1eb; }
.dashboard-nav button { flex: 1 1 155px; min-height: 48px; border-color: transparent; color: #294b3d; background: transparent; }
.dashboard-nav button:hover:not(:disabled) { background: #dce9df; }
.dashboard-nav button[aria-current="page"] { border-color: #194b3a; color: #fff; background: #194b3a; }
.dashboard-area { padding: clamp(18px, 4vw, 30px); border: 1px solid #d9e2dc; border-radius: 18px; background: rgba(255,255,255,.94); box-shadow: 0 14px 40px rgba(24,50,45,.05); }
.dashboard-area > h2 { margin-bottom: 8px; }
.dashboard-intro, .dashboard-note { max-width: 70ch; color: #54675f; }
.dashboard-note { margin: 18px 0 0; font-size: .85rem; }
.dashboard-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.dashboard-summary { display: grid; justify-items: start; align-content: start; gap: 8px; min-height: 140px; padding: 18px; border-color: #d3dfd6; color: #18322d; background: #f8fbf8; text-align: left; white-space: normal; }
.dashboard-summary:hover:not(:disabled) { border-color: #8bad96; background: #edf5ef; }
.dashboard-summary:focus-visible, .dashboard-nav button:focus-visible, .admin-task-section summary:focus-visible { outline: 3px solid #528b6a; outline-offset: 3px; }
.dashboard-summary-label { color: #53685e; font-size: .88rem; font-weight: 700; }
.dashboard-summary strong { font-size: 1.75rem; line-height: 1.2; }
.dashboard-summary > span:last-child { color: #19533f; font-size: .85rem; font-weight: 750; }
.admin-task-section { margin: 12px 0; border: 1px solid #d9e2dc; border-radius: 12px; background: #fbfcfb; }
.admin-task-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 12px 16px; border-radius: 12px; color: #24483a; font-weight: 750; cursor: pointer; list-style-position: inside; }
.admin-task-section[open] > summary { border-bottom: 1px solid #d9e2dc; border-radius: 12px 12px 0 0; background: #f1f6f2; }
.admin-task-section > section, .admin-task-section > .table-scroll { margin: 0; padding: 16px; }
.admin-task-section .review-section, .admin-task-section .submission-review { border: 0; }
.admin-task-section .review-section > .panel-heading h3, .admin-task-section .submission-review h3 { margin: 0; font-size: 1.08rem; }
.queue-badge { min-width: 76px; padding: 4px 9px; border-radius: 999px; color: #315447; background: #e4eee6; font-size: .78rem; font-weight: 750; text-align: center; }
.admin-task-section .demo-management { margin-top: 0; }
.admin-task-section .demo-management h3 { margin: 0 0 8px; }
@media (max-width: 620px) {
  .dashboard-heading { align-items: flex-start; }
  .dashboard-heading .button-secondary { min-width: 44px; padding-inline: 10px; }
  .dashboard-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-nav button { min-width: 0; padding: 9px 8px; font-size: .84rem; }
  .dashboard-nav button:last-child { grid-column: 1 / -1; }
  .dashboard-summary-grid { grid-template-columns: 1fr; }
  .dashboard-summary { min-height: 0; }
  .admin-task-section > summary { align-items: flex-start; }
  .admin-task-section > section, .admin-task-section > .table-scroll { padding: 12px; }
}



.source-alias-review { margin: .85rem 0; padding: .8rem; border: 1px solid var(--line); border-radius: .65rem; background: #f8faf9; }
.source-alias-review h4 { margin: 0 0 .45rem; font-size: .92rem; }
.source-alias-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .3rem 0; }
.source-alias-row a { color: var(--sea); overflow-wrap: anywhere; }
.source-alias-row button, [data-identity-split-id] { min-height: 40px; }
