:root {
  color-scheme: light;
  --orange: #d85a35;
  --orange-strong: #b94727;
  --blue: #174f86;
  --blue-strong: #0f3d69;
  --focus: rgba(241, 100, 63, 0.34);
  --ink: #18212f;
  --muted: #667085;
  --line: #e1e6ee;
  --paper: #ffffff;
  --surface: #f4f6f8;
  --soft: #fff7ed;
  --white: #ffffff;
  --green: #148271;
  --red: #b84427;
  --amber: #9a6500;
  --shadow: 0 20px 48px rgba(16, 24, 40, 0.08);
  --shadow-soft: 0 8px 24px rgba(16, 24, 40, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #ffffff 0, #f7f8fa 280px),
    var(--surface);
  color: var(--ink);
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
a,
input,
select,
textarea {
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

a {
  color: inherit;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 40;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 850;
  padding: 10px 12px;
  transform: translateY(-140%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.admin-shell {
  min-height: 100dvh;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(31, 38, 48, 0.1);
  background: rgba(255, 255, 255, 0.94);
  padding: 12px max(20px, env(safe-area-inset-right)) 10px max(20px, env(safe-area-inset-left));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  backdrop-filter: blur(18px);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-brand img {
  width: 42px;
  height: 38px;
}

.admin-brand span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-brand h1,
.panel-heading h3 {
  margin: 0;
}

.admin-brand h1 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.admin-header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.admin-status {
  min-width: 0;
  max-width: min(42vw, 360px);
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-header-actions a,
.admin-header-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid rgba(31, 38, 48, 0.14);
  border-radius: 8px;
  background: var(--white);
  color: #33404d;
  font-weight: 850;
  padding: 8px 12px;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.admin-header-actions button {
  appearance: none;
}

.admin-header-actions a::after {
  content: "->";
  color: var(--orange);
  font-weight: 950;
}

.admin-header-actions a:hover,
.admin-header-actions button:hover:not(:disabled) {
  border-color: rgba(216, 90, 53, 0.32);
  color: var(--orange-strong);
  transform: translateY(-1px);
}

.admin-header-actions button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.admin-action-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  color: currentColor;
}

.admin-action-icon::before,
.admin-action-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.admin-action-icon-logout::before {
  left: 2px;
  top: 3px;
  width: 9px;
  height: 12px;
  border: 2px solid currentColor;
  border-right: 0;
  border-radius: 3px 0 0 3px;
}

.admin-action-icon-logout::after {
  right: 1px;
  top: 8px;
  width: 12px;
  height: 2px;
  background: currentColor;
  box-shadow: 4px -4px 0 -1px currentColor, 4px 4px 0 -1px currentColor;
}

.admin-main {
  display: grid;
  gap: 5px;
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 6px 14px 28px;
  scroll-margin-top: 84px;
}

.admin-panel,
.admin-summary-card,
.user-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.panel-heading p,
.empty-state,
.item-meta {
  color: var(--muted);
}

.admin-status.is-error {
  color: var(--red);
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.admin-summary-card {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 7px;
  background: var(--white);
}

.admin-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: #cbd5e1;
}

.admin-summary-card.metric-requests::before,
.admin-summary-card.metric-evaluations::before {
  background: var(--orange);
}

.admin-summary-card.metric-users::before,
.admin-summary-card.metric-credits::before {
  background: var(--blue);
}

.admin-summary-card.metric-admins::before {
  background: var(--green);
}

.admin-summary-card.metric-counterarguments::before {
  background: var(--blue);
}

.admin-summary-card.metric-strengthen::before {
  background: var(--green);
}

.admin-summary-card span {
  display: none;
}

.admin-summary-card strong {
  display: block;
  order: 2;
  margin-top: 0;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1;
}

.admin-summary-card em {
  display: block;
  order: 1;
  min-width: 0;
  margin-top: 0;
  color: #4d5966;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 820;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-tabs-shell {
  position: sticky;
  top: 67px;
  z-index: 8;
  margin-inline: -4px;
  padding: 3px 4px 5px;
  background: linear-gradient(rgba(244, 246, 248, 0.98) 78%, rgba(244, 246, 248, 0));
  backdrop-filter: blur(10px);
}

.admin-tabs {
  display: inline-flex;
  width: min(100%, 780px);
  gap: 6px;
  border: 1px solid #c5cfda;
  border-radius: 8px;
  background: #dfe5ed;
  padding: 5px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    var(--shadow-soft);
}

.admin-tabs button {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #f8fafc;
  color: #263341;
  font-weight: 850;
  padding: 0 12px;
}

.admin-tabs button[aria-selected="true"] {
  border-color: #18212f;
  background: #18212f;
  color: #fff;
  box-shadow: 0 4px 14px rgba(24, 33, 47, 0.22);
}

.admin-tabs button:hover {
  border-color: rgba(216, 90, 53, 0.28);
  background: #fff;
  color: var(--orange-strong);
}

.admin-tabs button[aria-selected="true"]:hover {
  background: #18212f;
  color: #fff;
}

.tab-count {
  display: inline-grid;
  min-width: 24px;
  min-height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgba(216, 90, 53, 0.12);
  color: var(--orange-strong);
  font-size: 0.76rem;
  line-height: 1;
  padding-inline: 6px;
}

.admin-tabs button[aria-selected="true"] .tab-count {
  background: #fff;
  color: #18212f;
}

.admin-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  min-width: 0;
  background: #fff;
}

.admin-panel[hidden] {
  display: none !important;
}

.panel-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(31, 38, 48, 0.08);
}

.panel-heading h3 {
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.panel-heading p {
  margin: 2px 0 0;
  font-size: 0.78rem;
}

.panel-heading select,
.user-search input,
.user-search button,
.admin-action-row input,
.admin-action-row select,
.admin-action-row button,
.policy-rule-form input,
.policy-rule-form select,
.policy-rule-form textarea,
.policy-rule-form button,
.admin-card button,
.admin-card textarea {
  min-height: 40px;
  border: 1px solid rgba(31, 38, 48, 0.14);
  border-radius: 8px;
  background: var(--white);
  padding: 8px 10px;
}

.panel-heading select,
.user-search input,
.admin-action-row input,
.admin-action-row select,
.admin-action-row textarea,
.policy-rule-form input,
.policy-rule-form select,
.policy-rule-form textarea,
.admin-card textarea {
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
}

.panel-heading select:focus,
.user-search input:focus,
.admin-action-row input:focus,
.admin-action-row select:focus,
.admin-action-row textarea:focus,
.policy-rule-form input:focus,
.policy-rule-form select:focus,
.policy-rule-form textarea:focus,
.admin-card textarea:focus {
  border-color: rgba(216, 90, 53, 0.48);
  box-shadow: 0 0 0 3px rgba(241, 100, 63, 0.12);
  outline: 0;
}

.user-search {
  display: flex;
  gap: 8px;
  align-items: center;
}

.user-search input {
  width: min(280px, 42vw);
}

.user-search button,
.admin-action-row button,
.policy-rule-form button,
.admin-card button {
  border-color: rgba(216, 90, 53, 0.24);
  background: linear-gradient(145deg, #f1643f, var(--orange));
  color: #fff;
  font-weight: 850;
  box-shadow: 0 10px 20px rgba(211, 79, 44, 0.16);
}

.user-search button:hover,
.admin-action-row button:hover,
.policy-rule-form button:hover,
.admin-card button:hover {
  filter: brightness(1.03) saturate(1.04);
  transform: translateY(-1px);
}

.admin-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

#auditPanel .admin-list {
  width: min(100%, 1060px);
  margin-inline: auto;
}

.policy-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.policy-rule-form,
.policy-rule-list-shell {
  border: 1px solid rgba(31, 38, 48, 0.12);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.policy-rule-form {
  position: sticky;
  top: 132px;
  display: grid;
  gap: 10px;
}

.policy-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.55fr);
  gap: 10px;
}

.policy-rule-form label {
  display: grid;
  gap: 6px;
  color: #475467;
  font-size: 0.74rem;
  font-weight: 850;
}

.policy-rule-form label > span {
  line-height: 1;
}

.policy-wide-field {
  grid-column: 1 / -1;
}

.policy-rule-form textarea {
  resize: vertical;
}

.policy-active-toggle {
  display: inline-flex !important;
  grid-template-columns: auto auto;
  width: max-content;
  align-items: center;
}

.policy-active-toggle input {
  min-height: auto;
  width: 18px;
  height: 18px;
}

.admin-form-status {
  margin: 0;
  border-radius: 8px;
  background: #effaf7;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 820;
  padding: 8px 10px;
}

.admin-form-status.is-error {
  background: #fff0ec;
  color: var(--red);
}

.policy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.policy-rule-card {
  display: grid;
  gap: 10px;
}

.policy-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.policy-card-title {
  min-width: 0;
}

.policy-card-title h4 {
  margin: 0;
}

.policy-guidance {
  margin: 0;
  color: #344054;
  font-size: 0.84rem;
  line-height: 1.45;
}

.policy-trigger-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.policy-trigger-list li {
  border: 1px solid rgba(23, 79, 134, 0.16);
  border-radius: 999px;
  background: #eef6ff;
  color: var(--blue-strong);
  font-size: 0.7rem;
  font-weight: 850;
  padding: 4px 8px;
}

.policy-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.policy-rule-card .secondary-action,
.policy-rule-form .secondary-action {
  border-color: rgba(31, 38, 48, 0.14);
  background: var(--white);
  color: #33404d;
  box-shadow: none;
}

.evaluation-spec-panel {
  overflow: hidden;
  background:
    linear-gradient(180deg, #141414 0, #141414 164px, #f7f8fb 164px),
    #f7f8fb;
}

.evaluation-spec-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: end;
  padding: 18px;
  color: #fff;
}

.evaluation-spec-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.evaluation-spec-titlebar .evaluation-spec-runtime {
  min-width: 0;
  flex: 1 1 auto;
}

.evaluation-spec-titlebar .evaluation-spec-commandbar {
  display: none;
}

.evaluation-spec-hero h2,
.evaluation-spec-hero p,
.evaluation-spec-runtime strong,
.evaluation-spec-runtime em {
  margin: 0;
}

.evaluation-spec-hero h2 {
  font-size: clamp(1.45rem, 2vw, 2.15rem);
  line-height: 1;
}

.evaluation-spec-hero p {
  max-width: 620px;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  font-weight: 720;
  line-height: 1.35;
}

.evaluation-spec-runtime {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.evaluation-spec-runtime span,
.evaluation-spec-section-head span {
  color: #32c6a6;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.evaluation-spec-heading-tip {
  position: relative;
  width: max-content;
  max-width: 100%;
  border-radius: 4px;
  cursor: help;
}

.evaluation-spec-heading-tip::after {
  content: attr(data-tooltip);
  position: absolute;
  inset-block-end: calc(100% + 9px);
  inset-inline-start: 0;
  z-index: 20;
  width: min(300px, calc(100vw - 48px));
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.35;
  opacity: 0;
  padding: 9px 10px;
  pointer-events: none;
  text-transform: none;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
  visibility: hidden;
  white-space: normal;
}

.evaluation-spec-heading-tip:hover::after,
.evaluation-spec-heading-tip:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.evaluation-spec-runtime strong {
  overflow: hidden;
  font-size: 1rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evaluation-spec-runtime em {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evaluation-spec-commandbar {
  position: static;
  top: auto;
  z-index: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 0;
  backdrop-filter: none;
}

.evaluation-spec-layout {
  display: grid;
  grid-template-columns: minmax(284px, 0.78fr) minmax(0, 1.22fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
}

.evaluation-spec-layout > .evaluation-spec-form,
.evaluation-spec-layout > .evaluation-spec-list-shell,
.evaluation-spec-layout > .evaluation-spec-test-shell {
  margin-top: 0;
}

.evaluation-spec-list-shell,
.evaluation-spec-form,
.evaluation-spec-test-shell {
  border: 1px solid rgba(31, 38, 48, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 12px;
  box-shadow: 0 16px 34px rgba(16, 24, 40, 0.08);
}

.evaluation-spec-list-shell {
  padding-top: 6px;
  padding-left: 6px;
  padding-top: 0;
}

.evaluation-spec-list-shell {
  --evaluation-spec-rail-top: 132px;
  --evaluation-spec-rail-viewport-top: var(--evaluation-spec-rail-top);
  position: sticky;
  top: var(--evaluation-spec-rail-top);
  align-self: start;
  max-height: calc(100dvh - var(--evaluation-spec-rail-viewport-top) - 18px);
  max-block-size: calc(100dvb - var(--evaluation-spec-rail-viewport-top) - 18px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.evaluation-spec-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.evaluation-spec-section-head small {
  color: #667085;
  font-size: 0.72rem;
  font-weight: 820;
}

.evaluation-spec-form,
.evaluation-spec-test-form {
  display: grid;
  gap: 12px;
}

.evaluation-spec-form {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.96)),
    #fff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 18px 44px rgba(15, 23, 42, 0.09);
}

.evaluation-spec-form fieldset {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  border: 0;
}

.evaluation-spec-block {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-top: 3px solid #32c6a6 !important;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92)),
    #fff;
  padding: 12px !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.evaluation-spec-identity-block {
  border-top-color: var(--orange) !important;
}

.evaluation-spec-platform-block {
  border-top-color: var(--admin-blue) !important;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(241, 247, 254, 0.94)),
    #f8fbff;
}

.evaluation-spec-form legend {
  width: max-content;
  max-width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: #fff;
  color: #18212f;
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1.2;
  padding: 5px 8px;
  text-transform: uppercase;
}

.evaluation-spec-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(160px, 0.54fr);
  gap: 10px;
}

.evaluation-spec-form label,
.evaluation-spec-test-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #344054;
  font-size: 0.74rem;
  font-weight: 900;
  padding: 9px;
}

.evaluation-spec-form label:focus-within,
.evaluation-spec-test-form label:focus-within {
  border-color: rgba(0, 114, 178, 0.32);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 114, 178, 0.08);
}

.evaluation-spec-form label > span,
.evaluation-spec-test-form label > span {
  color: #475467;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.evaluation-spec-form input,
.evaluation-spec-form select,
.evaluation-spec-form textarea,
.evaluation-spec-test-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(15, 23, 42, 0.13);
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.45;
  padding: 10px 11px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02) inset;
}

.evaluation-spec-form textarea,
.evaluation-spec-test-form textarea {
  resize: vertical;
}

.evaluation-spec-editor-rail textarea {
  min-block-size: 7.75rem;
  max-block-size: min(34rem, calc(100dvb - 220px));
  height: auto;
  overflow-y: hidden;
  resize: none;
  field-sizing: content;
  scrollbar-color: rgba(0, 95, 149, 0.42) transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.evaluation-spec-editor-rail textarea[data-autosize-overflow] {
  overflow-y: auto;
}

.evaluation-spec-editor-rail textarea::-webkit-scrollbar {
  width: 9px;
}

.evaluation-spec-editor-rail textarea::-webkit-scrollbar-track {
  background: transparent;
}

.evaluation-spec-editor-rail textarea::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(0, 95, 149, 0.36);
  background-clip: padding-box;
}

.evaluation-spec-editor-rail textarea:hover::-webkit-scrollbar-thumb,
.evaluation-spec-editor-rail textarea:focus::-webkit-scrollbar-thumb {
  background: rgba(0, 95, 149, 0.56);
  background-clip: padding-box;
}

.evaluation-spec-criteria-block label {
  border-color: rgba(15, 23, 42, 0.11);
  background:
    linear-gradient(180deg, #ffffff, #f8fafc),
    #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 10px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.evaluation-spec-criteria-block label:hover {
  border-color: rgba(0, 95, 149, 0.18);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.94) inset,
    0 6px 16px rgba(15, 23, 42, 0.06);
}

.evaluation-spec-criteria-block label > span {
  color: #344054;
  font-size: 0.7rem;
}

.evaluation-spec-criteria-block textarea {
  min-block-size: 8.25rem;
  border: 1px solid rgba(71, 84, 103, 0.26);
  background:
    linear-gradient(180deg, #ffffff, #fcfdff),
    #fff;
  color: #101828;
  font-size: 0.9rem;
  line-height: 1.55;
  padding: 12px 13px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.96) inset,
    0 0 0 3px rgba(15, 23, 42, 0.025),
    0 8px 18px rgba(15, 23, 42, 0.045);
  caret-color: #005f95;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.evaluation-spec-criteria-block #evaluationSpecReasoning,
.evaluation-spec-criteria-block #evaluationSpecExamples {
  min-block-size: 10rem;
}

.evaluation-spec-criteria-block textarea::placeholder {
  color: #7a8696;
}

.evaluation-spec-criteria-block label:focus-within {
  border-color: rgba(0, 95, 149, 0.34);
  background: #fff;
  box-shadow:
    0 0 0 3px rgba(0, 114, 178, 0.1),
    0 12px 28px rgba(15, 23, 42, 0.08);
}

.evaluation-spec-form .evaluation-spec-criteria-block textarea:focus {
  border-color: #1d6fb8;
  box-shadow:
    0 0 0 1px #1d6fb8,
    0 0 0 4px rgba(29, 111, 184, 0.15),
    0 10px 22px rgba(15, 23, 42, 0.08);
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.evaluation-spec-form input:focus,
.evaluation-spec-form select:focus,
.evaluation-spec-form textarea:focus,
.evaluation-spec-test-form textarea:focus {
  border-color: rgba(0, 114, 178, 0.62);
  box-shadow:
    0 0 0 3px rgba(0, 114, 178, 0.12),
    0 1px 0 rgba(15, 23, 42, 0.02) inset;
  outline: 0;
}

.evaluation-spec-form select:disabled {
  cursor: not-allowed;
  background: #eef2f7;
  color: #4b5563;
}

.evaluation-spec-form textarea[readonly] {
  min-block-size: 18rem;
  max-block-size: min(44rem, calc(100dvb - 180px));
  background:
    linear-gradient(180deg, #f8fbff, #f1f6fb),
    #f3f7fb;
  color: #334155;
  cursor: default;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.5;
}

.evaluation-spec-form textarea[readonly]:focus {
  border-color: rgba(29, 111, 214, 0.38);
  box-shadow: 0 0 0 3px rgba(29, 111, 214, 0.12);
}

.admin-field-note {
  margin: 0;
  color: #697586;
  font-size: 0.74rem;
  font-weight: 720;
  line-height: 1.4;
}

.evaluation-spec-actions,
.evaluation-spec-commandbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.evaluation-spec-actions {
  position: sticky;
  bottom: 12px;
  z-index: 3;
  justify-content: flex-end;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  padding: 10px;
  box-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.86) inset,
    0 14px 32px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(14px);
}

.evaluation-spec-commandbar {
  align-items: center;
}

.evaluation-spec-commandbar-note {
  color: #667085;
  font-size: 0.78rem;
  font-weight: 780;
}

.evaluation-spec-actions button,
.evaluation-spec-commandbar button,
.evaluation-spec-test-form button {
  appearance: none;
  min-height: 40px;
  border: 1px solid rgba(20, 130, 113, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, #168f7d, #126c5f);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 880;
  padding: 8px 12px;
}

.evaluation-spec-viewlike-btn,
.evaluation-spec-commandbar .evaluation-spec-viewlike-btn,
.evaluation-spec-viewlike-btn:visited {
  min-height: 34px;
  border: 1px solid rgba(20, 130, 113, 0.24);
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  padding-block: 0;
  padding-inline: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.evaluation-spec-commandbar {
  padding-block: 0;
}

.evaluation-spec-viewlike-btn:hover:not(:disabled),
.evaluation-spec-viewlike-btn:focus-visible {
  background: #126c5f;
  outline: 3px solid rgba(20, 130, 113, 0.18);
  outline-offset: 2px;
}

.evaluation-spec-actions button:hover:not(:disabled),
.evaluation-spec-commandbar button:hover:not(:disabled),
.evaluation-spec-test-form button:hover:not(:disabled),
.evaluation-spec-actions button:focus-visible,
.evaluation-spec-commandbar button:focus-visible,
.evaluation-spec-test-form button:focus-visible {
  background: linear-gradient(180deg, #126c5f, #0f5d52);
  outline: 3px solid rgba(20, 130, 113, 0.18);
  outline-offset: 2px;
}

.evaluation-spec-actions button:disabled,
.evaluation-spec-test-form button:disabled {
  cursor: default;
  opacity: 0.52;
}

.evaluation-spec-actions .secondary-action,
.evaluation-spec-commandbar .secondary-action {
  border-color: rgba(31, 38, 48, 0.14);
  background: var(--white);
  color: #33404d;
  box-shadow: none;
}

.evaluation-spec-actions .danger-action,
.evaluation-spec-commandbar .danger-action,
.evaluation-spec-card-actions .danger-action {
  border-color: rgba(184, 68, 39, 0.32);
  background: #fff0ec;
  color: var(--red);
  box-shadow: none;
}

.evaluation-spec-actions .danger-action:hover:not(:disabled),
.evaluation-spec-commandbar .danger-action:hover:not(:disabled),
.evaluation-spec-card-actions .danger-action:hover:not(:disabled),
.evaluation-spec-actions .danger-action:focus-visible,
.evaluation-spec-commandbar .danger-action:focus-visible,
.evaluation-spec-card-actions .danger-action:focus-visible {
  background: var(--red);
  color: #fff;
}

.evaluation-spec-card {
  position: relative;
  display: grid;
  gap: 11px;
  overflow: hidden;
  border-color: rgba(31, 38, 48, 0.12);
  background: #fff;
}

.evaluation-spec-card[data-evaluation-spec-id] {
  cursor: pointer;
}

.evaluation-spec-card::before {
  content: "";
  display: block;
  height: 4px;
  margin: -12px -12px 0;
  background: #98a2b3;
}

.evaluation-spec-card.is-active::before {
  height: 6px;
  background: linear-gradient(90deg, #32c6a6, #0072b2);
}

.evaluation-spec-card.is-active {
  border-color: rgba(50, 198, 166, 0.62);
  background:
    linear-gradient(180deg, rgba(50, 198, 166, 0.16), rgba(255, 255, 255, 0) 62px),
    #fff;
  box-shadow:
    0 0 0 3px rgba(50, 198, 166, 0.14),
    0 18px 34px rgba(15, 118, 110, 0.14);
}

.evaluation-spec-card.is-active::after {
  content: "Live";
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 12px;
  border: 1px solid rgba(50, 198, 166, 0.38);
  border-radius: 999px;
  background: #083b35;
  color: #fff;
  font-size: 0.64rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  text-transform: uppercase;
}

.evaluation-spec-card.is-draft::before {
  background: var(--orange);
}

.evaluation-spec-card.is-archived::before {
  background: #667085;
}

.evaluation-spec-card.is-selected {
  border-color: #005f95;
  background:
    linear-gradient(90deg, rgba(0, 114, 178, 0.28), rgba(0, 114, 178, 0.08) 118px, rgba(255, 255, 255, 0) 72%),
    #fff;
  box-shadow:
    0 0 0 4px rgba(0, 114, 178, 0.24),
    0 20px 38px rgba(0, 95, 149, 0.2);
  transform: translateX(2px);
}

.evaluation-spec-card.is-selected::before {
  height: 8px;
  background: linear-gradient(90deg, #005f95, #32c6a6);
}

.evaluation-spec-card.is-selected:hover,
.evaluation-spec-card.is-selected:focus-within {
  border-color: #005f95;
  box-shadow:
    0 0 0 4px rgba(0, 114, 178, 0.24),
    0 20px 38px rgba(0, 95, 149, 0.2);
}

.evaluation-spec-card.is-active.is-selected {
  border-color: #005f95;
  box-shadow:
    0 0 0 5px rgba(0, 114, 178, 0.24),
    0 22px 42px rgba(0, 95, 149, 0.22);
}

.evaluation-spec-card.is-selected::after {
  content: "Viewing";
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 12px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: #005f95;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  padding: 5px 9px;
  box-shadow: 0 8px 18px rgba(0, 95, 149, 0.28);
  text-transform: uppercase;
}

.evaluation-spec-card.is-active.is-selected::after {
  content: "Live / Viewing";
}

.evaluation-spec-card-status,
.evaluation-spec-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.evaluation-spec-card-status > span:not(.pill) {
  color: #667085;
  font-size: 0.7rem;
  font-weight: 920;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.evaluation-spec-card-title h4,
.evaluation-spec-card-title p,
.evaluation-spec-card-summary {
  margin: 0;
}

.evaluation-spec-card-title h4 {
  color: #111827;
  font-size: 1rem;
  line-height: 1.12;
}

.evaluation-spec-card-title p {
  margin-top: 4px;
  color: #667085;
  font-size: 0.76rem;
  font-weight: 820;
}

.evaluation-spec-card-summary {
  color: #344054;
  font-size: 0.83rem;
  line-height: 1.45;
}

.evaluation-spec-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.evaluation-spec-card-metrics span {
  min-width: 0;
  border: 1px solid rgba(31, 38, 48, 0.08);
  border-radius: 8px;
  background: #f7f9fc;
  padding: 7px;
}

.evaluation-spec-card-metrics strong,
.evaluation-spec-card-metrics em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evaluation-spec-card-metrics strong {
  color: #111827;
  font-size: 0.74rem;
  font-weight: 900;
}

.evaluation-spec-card-metrics em {
  color: #667085;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 820;
  text-transform: uppercase;
}

.evaluation-spec-card-actions button {
  min-height: 34px;
  border: 1px solid rgba(20, 130, 113, 0.24);
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 7px 9px;
}

.evaluation-spec-card-actions .secondary-action {
  border-color: rgba(31, 38, 48, 0.14);
  background: #fff;
  color: #33404d;
}

.evaluation-spec-live-indicator {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(0, 95, 149, 0.2);
  border-radius: 8px;
  background: #eef7ff;
  color: #005f95;
  font-size: 0.76rem;
  font-weight: 950;
  padding: 7px 9px;
}

.evaluation-spec-test-shell {
  grid-column: 2;
  border-color: rgba(0, 114, 178, 0.14);
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.96)),
    #fff;
  color: #18212f;
}

.evaluation-spec-test-shell .evaluation-spec-section-head small {
  border: 1px solid rgba(0, 114, 178, 0.16);
  border-radius: 999px;
  background: #eef6ff;
  color: #005f95;
  padding: 4px 8px;
}

.evaluation-spec-test-shell .admin-field-note {
  color: #697586;
}

.evaluation-spec-test-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.evaluation-spec-test-presets button {
  min-height: 34px;
  border: 1px solid rgba(0, 114, 178, 0.18);
  border-radius: 999px;
  background: #fff;
  color: #005f95;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 6px 9px;
}

.evaluation-spec-test-form textarea {
  min-block-size: 9rem;
  max-block-size: min(28rem, calc(100dvb - 220px));
  border-color: rgba(0, 114, 178, 0.18);
  background: #fff;
  color: #111827;
}

.evaluation-spec-test-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.evaluation-spec-test-inline-status {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  margin: 0;
  border: 1px solid rgba(0, 114, 178, 0.13);
  border-radius: 8px;
  background: #f8fbff;
  color: #005f95;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.25;
  padding: 8px 10px;
}

.evaluation-spec-test-inline-status[hidden] {
  display: none;
}

.evaluation-spec-test-inline-status::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(0, 95, 149, 0.22);
  border-top-color: #005f95;
  border-radius: 999px;
  animation: admin-spin 780ms linear infinite;
}

@keyframes admin-spin {
  to {
    transform: rotate(360deg);
  }
}

.evaluation-spec-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.evaluation-spec-result-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 12px;
}

.evaluation-spec-result-card h4,
.evaluation-spec-result-card p {
  margin: 0;
}

.evaluation-spec-result-assessment {
  color: #475467;
  font-size: 0.84rem;
  line-height: 1.45;
}

.evaluation-spec-result-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.evaluation-spec-result-metrics span {
  min-width: 0;
  border: 1px solid rgba(0, 114, 178, 0.1);
  border-radius: 8px;
  background: #f8fbff;
  padding: 7px;
}

.evaluation-spec-result-metrics strong,
.evaluation-spec-result-metrics em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evaluation-spec-result-metrics strong {
  color: #18212f;
  font-size: 0.84rem;
  font-weight: 950;
}

.evaluation-spec-result-metrics em {
  color: #697586;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.evaluation-spec-result-flags {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a6500;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 5px 8px;
}

.evaluation-spec-driver-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: #344054;
  font-size: 0.78rem;
  line-height: 1.35;
}

.evaluation-spec-full-response {
  display: grid;
  gap: 8px;
  color: #475467;
  font-size: 0.78rem;
}

.evaluation-spec-full-response summary {
  cursor: pointer;
  color: #005f95;
  font-weight: 900;
}

.evaluation-spec-full-response pre {
  overflow: auto;
  max-height: 360px;
  margin: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #0f172a;
  color: #e5edf7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.45;
  padding: 10px;
  white-space: pre-wrap;
}

.evaluation-spec-readiness-card,
.evaluation-spec-diff-card {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.evaluation-spec-readiness-card {
  border-left: 5px solid #64748b;
}

.evaluation-spec-readiness-card.is-good {
  border-left-color: #148271;
}

.evaluation-spec-readiness-card.is-watch {
  border-left-color: #d85a35;
}

.evaluation-spec-readiness-card.is-risk {
  border-left-color: #b84427;
}

.evaluation-spec-readiness-card span,
.evaluation-spec-diff-card .request-kicker {
  color: #697586;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.evaluation-spec-readiness-card strong {
  color: #18212f;
  font-size: 1rem;
}

.evaluation-spec-readiness-card p,
.evaluation-spec-readiness-card em {
  margin: 0;
  color: #475467;
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 760;
  line-height: 1.4;
}

.evaluation-spec-diff-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.evaluation-spec-diff-card th,
.evaluation-spec-diff-card td {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding: 7px 6px;
  text-align: left;
  vertical-align: top;
}

.evaluation-spec-diff-card thead th {
  border-top: 0;
  color: #697586;
  font-size: 0.66rem;
  text-transform: uppercase;
}

.evaluation-spec-infographic-launcher {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  border: 1px solid rgba(0, 114, 178, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(238, 246, 255, 0.92), rgba(255, 255, 255, 0.96)),
    #fff;
  padding: 10px;
}

.evaluation-spec-infographic-launcher p {
  margin: 3px 0 0;
  color: #475467;
  font-size: 0.78rem;
  font-weight: 760;
}

.evaluation-spec-infographic-launcher button {
  appearance: none;
  min-height: 36px;
  border: 1px solid rgba(0, 95, 149, 0.22);
  border-radius: 8px;
  background: #005f95;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 950;
  padding: 8px 11px;
  white-space: nowrap;
}

.evaluation-spec-infographic-dialog {
  width: min(1100px, calc(100vw - 28px));
  max-height: min(880px, calc(100dvh - 28px));
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  background: #fff;
  color: #18212f;
  padding: 0;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
}

.evaluation-spec-infographic-dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
}

.evaluation-spec-infographic-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: inherit;
}

.evaluation-spec-infographic-head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.96)),
    #fff;
  padding: 14px 16px;
}

.evaluation-spec-infographic-head span,
.evaluation-spec-infographic-hero .request-kicker,
.evaluation-spec-infographic-report .request-kicker,
.evaluation-spec-infographic-lists .request-kicker {
  color: #697586;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.evaluation-spec-infographic-head h2 {
  margin: 2px 0 0;
  color: #18212f;
  font-size: 1.16rem;
  letter-spacing: 0;
}

.evaluation-spec-infographic-close {
  appearance: none;
  display: grid;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  place-items: center;
}

.evaluation-spec-infographic-close span,
.evaluation-spec-infographic-close span::before {
  display: block;
  width: 15px;
  height: 2px;
  border-radius: 999px;
  background: #334155;
  content: "";
  transform: rotate(45deg);
}

.evaluation-spec-infographic-close span {
  position: relative;
}

.evaluation-spec-infographic-close span::before {
  position: absolute;
  inset: 0;
  transform: rotate(90deg);
}

.evaluation-spec-infographic-body {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 14px;
}

.evaluation-spec-infographic-hero {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
  border: 1px solid rgba(0, 114, 178, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(238, 246, 255, 0.92), rgba(255, 255, 255, 0.98) 62%),
    #fff;
  padding: 12px;
}

.evaluation-spec-infographic-hero h3,
.evaluation-spec-infographic-hero p {
  margin: 0;
}

.evaluation-spec-infographic-hero h3 {
  margin-top: 3px;
  font-size: 1.08rem;
  text-wrap: balance;
}

.evaluation-spec-infographic-hero p {
  max-width: 720px;
  color: #475467;
  font-size: 0.84rem;
  font-weight: 760;
  line-height: 1.4;
  text-wrap: pretty;
}

.evaluation-spec-infographic-hero strong {
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 950;
  padding: 6px 9px;
  white-space: nowrap;
}

.evaluation-spec-infographic-scores,
.evaluation-spec-infographic-classification,
.evaluation-spec-infographic-flags,
.evaluation-spec-infographic-lists,
.evaluation-spec-infographic-guidance,
.evaluation-spec-infographic-reports {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.evaluation-spec-infographic-score,
.evaluation-spec-infographic-classification div,
.evaluation-spec-infographic-flags div,
.evaluation-spec-infographic-lists section,
.evaluation-spec-infographic-guidance div,
.evaluation-spec-infographic-report {
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 8px;
  background: #fff;
  padding: 11px;
}

.evaluation-spec-infographic-score {
  display: grid;
  gap: 8px;
}

.evaluation-spec-infographic-score > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.evaluation-spec-infographic-score span,
.evaluation-spec-infographic-classification span,
.evaluation-spec-infographic-flags span,
.evaluation-spec-infographic-guidance span,
.evaluation-spec-infographic-improvements span {
  color: #697586;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.evaluation-spec-infographic-score strong {
  border-radius: 999px;
  background: #eef2f6;
  color: #334155;
  font-size: 0.74rem;
  padding: 4px 7px;
}

.evaluation-spec-infographic-score.is-positive strong {
  background: #e8f8f4;
  color: #126c5f;
}

.evaluation-spec-infographic-score.is-negative strong {
  background: #fff1ed;
  color: #b84427;
}

.evaluation-spec-score-track {
  position: relative;
  height: 34px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px) 0 0 / 20% 100%,
    #f8fafc;
  overflow: hidden;
}

.evaluation-spec-score-track i {
  position: absolute;
  left: 0;
  display: block;
  height: 10px;
  border-radius: 999px;
}

.evaluation-spec-score-track .is-selected {
  top: 7px;
  width: calc(var(--selected-score) * 1%);
  background: #005f95;
}

.evaluation-spec-score-track .is-active {
  bottom: 7px;
  width: calc(var(--active-score) * 1%);
  background: #32c6a6;
}

.evaluation-spec-infographic-score p,
.evaluation-spec-infographic-guidance p,
.evaluation-spec-infographic-report p,
.evaluation-spec-infographic-report dd {
  margin: 0;
  color: #475467;
  font-size: 0.8rem;
  font-weight: 740;
  line-height: 1.42;
  text-wrap: pretty;
}

.evaluation-spec-infographic-score p b {
  color: #18212f;
}

.evaluation-spec-infographic-classification strong,
.evaluation-spec-infographic-flags strong {
  display: block;
  margin-top: 4px;
  color: #18212f;
  font-size: 0.96rem;
}

.evaluation-spec-infographic-classification em,
.evaluation-spec-infographic-flags em {
  display: block;
  margin-top: 3px;
  color: #697586;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 820;
}

.evaluation-spec-infographic-flags {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.evaluation-spec-infographic-flags div.is-changed {
  border-color: rgba(216, 90, 53, 0.3);
  background: #fff8f5;
}

.evaluation-spec-infographic-lists ul,
.evaluation-spec-infographic-improvements ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 17px;
  color: #344054;
  font-size: 0.8rem;
  font-weight: 740;
  line-height: 1.35;
  text-wrap: pretty;
}

.evaluation-spec-infographic-report h3 {
  margin: 3px 0 5px;
  color: #18212f;
  font-size: 0.96rem;
}

.evaluation-spec-infographic-report dl {
  display: grid;
  gap: 7px;
  margin: 9px 0 0;
}

.evaluation-spec-infographic-report dt {
  color: #697586;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.evaluation-spec-infographic-improvements {
  margin-top: 10px;
}

@media (max-width: 760px) {
  .evaluation-spec-result-grid {
    grid-template-columns: 1fr;
  }

  .evaluation-spec-diff-card {
    overflow-x: auto;
  }

  .evaluation-spec-infographic-launcher,
  .evaluation-spec-infographic-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .evaluation-spec-test-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .evaluation-spec-infographic-scores,
  .evaluation-spec-infographic-classification,
  .evaluation-spec-infographic-flags,
  .evaluation-spec-infographic-lists,
  .evaluation-spec-infographic-guidance,
  .evaluation-spec-infographic-reports {
    grid-template-columns: 1fr;
  }
}

.loading-state {
  display: grid;
  min-height: 120px;
  place-items: center;
  border: 1px dashed rgba(31, 38, 48, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--muted);
  font-weight: 800;
}

.empty-state {
  border: 1px dashed rgba(31, 38, 48, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  margin: 0;
  padding: 16px;
  font-weight: 760;
}

.empty-state.is-error {
  border-color: rgba(184, 68, 39, 0.28);
  background: #fff0ec;
  color: var(--red);
}

.admin-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(31, 38, 48, 0.1);
  border-radius: 8px;
  background: var(--white);
  padding: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
}

.admin-card:hover,
.user-list-button:hover {
  border-color: rgba(216, 90, 53, 0.24);
  box-shadow: var(--shadow-soft);
}

.admin-card-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.admin-card h4 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.request-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.request-overview article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
  border: 1px solid rgba(31, 38, 48, 0.1);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 8px 9px;
}

.request-overview span,
.request-overview em,
.request-kicker,
.request-credit-badge span,
.request-account-strip em,
.request-decision-copy p,
.request-note.is-muted {
  color: var(--muted);
}

.request-overview span,
.request-kicker,
.request-credit-badge span,
.request-account-strip em {
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.request-overview strong {
  grid-row: span 2;
  font-size: 1.08rem;
  line-height: 1;
}

.request-overview em {
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 760;
}

.request-queue {
  display: grid;
  gap: 8px;
}

.request-card {
  gap: 10px;
  padding: 12px;
}

.request-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.request-card-head > div {
  min-width: 0;
}

.request-kicker {
  display: block;
  margin-bottom: 2px;
}

.request-card h4 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-credit-badge {
  display: grid;
  min-width: 118px;
  justify-items: end;
  border: 1px solid rgba(216, 90, 53, 0.18);
  border-radius: 8px;
  background: #fff7ed;
  padding: 8px 9px;
}

.request-credit-badge strong {
  color: var(--orange-strong);
  font-size: 1.18rem;
  line-height: 1;
}

.request-account-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.request-account-strip span {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid rgba(31, 38, 48, 0.08);
  border-radius: 7px;
  background: #fbfcfd;
  padding: 7px;
}

.request-account-strip strong {
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-account-strip em {
  font-style: normal;
}

.request-note,
.request-admin-note {
  margin: 0;
  border-radius: 8px;
  font-size: 0.84rem;
}

.request-note {
  border: 1px solid rgba(31, 38, 48, 0.08);
  background: #fbfcfd;
  color: #334155;
  padding: 9px;
}

.request-admin-note {
  border: 1px solid rgba(23, 79, 134, 0.12);
  background: #f8fbff;
  color: var(--blue-strong);
  padding: 8px 9px;
}

.request-decision-panel {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(31, 38, 48, 0.1);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.request-decision-copy h5 {
  margin: 0;
  font-size: 0.88rem;
}

.request-decision-copy p {
  margin: 2px 0 0;
  font-size: 0.72rem;
}

.request-decision-panel .admin-action-row {
  border-top: 0;
  padding-top: 0;
}

.audit-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.audit-overview article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
  border: 1px solid rgba(31, 38, 48, 0.1);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 8px 9px;
}

.audit-overview span,
.audit-overview em,
.audit-action-group,
.audit-reason.is-muted,
.audit-meta-grid dt {
  color: var(--muted);
}

.audit-overview span,
.audit-action-group,
.audit-meta-grid dt {
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.audit-overview strong {
  grid-row: span 2;
  font-size: 1.08rem;
  line-height: 1;
}

.audit-overview em {
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 760;
}

.audit-timeline {
  display: grid;
  gap: 0;
}

.audit-event {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
}

.audit-rail {
  position: relative;
  display: grid;
  justify-items: center;
}

.audit-rail::before {
  content: "";
  position: absolute;
  inset-block: 0;
  width: 2px;
  background: #d8dee7;
}

.audit-event:first-child .audit-rail::before {
  inset-block-start: 14px;
}

.audit-event:last-child .audit-rail::before {
  inset-block-end: calc(100% - 14px);
}

.audit-rail span {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  margin-top: 13px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #64748b;
  box-shadow: 0 0 0 2px #d8dee7;
}

.audit-event-body {
  display: grid;
  gap: 7px;
  margin-bottom: 8px;
  border: 1px solid rgba(31, 38, 48, 0.1);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.audit-event-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.audit-event-head > div {
  min-width: 0;
}

.audit-event h4 {
  margin: 1px 0 0;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
}

.audit-target {
  flex: 0 0 auto;
  border: 1px solid rgba(31, 38, 48, 0.1);
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 850;
  padding: 4px 7px;
}

.audit-reason {
  margin: 0;
  color: #334155;
  font-size: 0.82rem;
}

.audit-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 6px;
  margin: 0;
}

.audit-meta-grid div {
  min-width: 0;
  border: 1px solid rgba(31, 38, 48, 0.08);
  border-radius: 7px;
  background: #fbfcfd;
  padding: 6px 7px;
}

.audit-meta-grid dt,
.audit-meta-grid dd {
  margin: 0;
}

.audit-meta-grid dd {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-credit .audit-rail span {
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(20, 130, 113, 0.2);
}

.audit-access .audit-rail span,
.audit-role .audit-rail span {
  background: var(--blue);
  box-shadow: 0 0 0 2px rgba(23, 79, 134, 0.2);
}

.audit-danger .audit-rail span,
.audit-warning .audit-rail span {
  background: var(--orange);
  box-shadow: 0 0 0 2px rgba(216, 90, 53, 0.2);
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 0;
  font-size: 0.82rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #eef1f3;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 850;
  padding: 4px 8px;
}

.pill.pending {
  background: #fff6d7;
  color: var(--amber);
}

.pill.approved,
.pill.active,
.pill.admin,
.pill.superadmin,
.pill.super_admin {
  background: #e9f8f4;
  color: var(--green);
}

.pill.declined,
.pill.disabled {
  background: #fff0ec;
  color: var(--red);
}

.request-actions,
.admin-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-action-row {
  align-items: end;
  border-top: 1px solid rgba(31, 38, 48, 0.1);
  padding-top: 12px;
}

.user-action-panel .admin-action-row {
  border-top: 0;
  padding-top: 0;
}

.admin-action-row label {
  display: grid;
  gap: 4px;
  min-width: 120px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.admin-action-row input,
.admin-action-row select {
  width: 132px;
}

.admin-action-row textarea,
.admin-card textarea {
  width: min(360px, 100%);
  min-height: 40px;
  resize: vertical;
}

.admin-action-row button.secondary-action {
  border-color: rgba(23, 79, 134, 0.22);
  background: #fff;
  color: var(--blue-strong);
  box-shadow: none;
}

.admin-action-row button.danger-action {
  border-color: rgba(184, 68, 39, 0.28);
  background: #fff0ec;
  color: var(--red);
  box-shadow: none;
}

.user-layout {
  display: grid;
  grid-template-columns: minmax(310px, 0.78fr) minmax(430px, 1.22fr);
  gap: 12px;
  align-items: start;
}

.user-list-button {
  position: relative;
  display: grid;
  gap: 9px;
  width: 100%;
  border: 1px solid rgba(31, 38, 48, 0.1);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfcfd);
  color: var(--ink);
  padding: 11px 12px;
  text-align: left;
}

.user-list-button[aria-current="true"] {
  border-color: #18212f;
  box-shadow:
    0 0 0 3px rgba(24, 33, 47, 0.1),
    var(--shadow-soft);
}

.user-list-button[aria-current="true"]::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--orange);
}

.user-row-top,
.user-row-foot,
.user-detail-title-row,
.user-history-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.user-row-identity,
.ledger-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.user-row-identity,
.user-detail-title-row > div {
  min-width: 0;
}

.user-row-identity strong,
.user-detail-head h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row-identity em,
.user-row-foot,
.detail-grid em,
.user-detail-head p,
.user-action-copy p,
.mini-request-item,
.ledger-copy em,
.ledger-balance {
  color: var(--muted);
}

.user-row-identity em,
.user-row-foot,
.detail-grid em,
.user-action-copy p,
.mini-request-item,
.llm-user-metrics span,
.ledger-copy em,
.ledger-balance {
  font-size: 0.72rem;
  font-style: normal;
}

.user-row-pills {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.user-row-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.user-row-metrics span {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(31, 38, 48, 0.08);
  border-radius: 7px;
  background: #fff;
  padding: 6px;
}

.user-row-metrics strong {
  font-size: 0.92rem;
  line-height: 1;
}

.user-row-metrics em {
  color: var(--muted);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.user-row-foot {
  align-items: center;
  font-weight: 760;
}

.user-detail {
  position: sticky;
  top: 138px;
  display: grid;
  gap: 10px;
  padding: 12px;
  background: var(--white);
}

.user-detail-head {
  display: grid;
  gap: 5px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(31, 38, 48, 0.09);
}

.user-detail-kicker {
  display: block;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.user-detail-head h3 {
  margin: 1px 0 0;
  font-size: 1.04rem;
}

.user-detail-head p {
  margin: 1px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.detail-grid div {
  border: 1px solid rgba(31, 38, 48, 0.1);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 8px;
}

.detail-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.detail-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 1.06rem;
  line-height: 1;
}

.detail-grid em {
  display: block;
  margin-top: 3px;
}

.user-action-panel {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(31, 38, 48, 0.1);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.user-action-copy h4,
.user-history-heading h4 {
  margin: 0;
  font-size: 0.9rem;
}

.user-action-copy p {
  margin: 2px 0 0;
}

.user-history-section {
  display: grid;
  gap: 7px;
}

.llm-user-section {
  border: 1px solid rgba(31, 38, 48, 0.1);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 9px;
}

.user-history-heading {
  align-items: center;
}

.user-history-heading span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.llm-user-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.llm-user-metrics div {
  border: 1px solid rgba(31, 38, 48, 0.09);
  border-radius: 7px;
  background: #fff;
  padding: 7px;
}

.llm-user-metrics span,
.llm-user-metrics strong {
  display: block;
}

.llm-user-metrics span {
  color: var(--muted);
  font-weight: 850;
}

.llm-user-metrics strong {
  margin-top: 4px;
  font-size: 0.92rem;
  line-height: 1;
}

.mini-request-list {
  display: grid;
  gap: 6px;
}

.mini-request-item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 6px 8px;
  align-items: center;
  border-top: 1px solid rgba(31, 38, 48, 0.08);
  padding-top: 7px;
}

.mini-request-item strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.mini-request-item > span:not(.pill) {
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-request-item em {
  grid-column: 1 / -1;
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-list {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
  padding-right: 2px;
  scrollbar-gutter: stable;
}

.ledger-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border-top: 1px solid rgba(31, 38, 48, 0.09);
  padding-top: 7px;
  font-size: 0.84rem;
}

.ledger-item > strong {
  display: inline-grid;
  min-height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #eef1f3;
  color: #334155;
  font-size: 0.78rem;
}

.ledger-item > strong.positive {
  background: #e9f8f4;
  color: var(--green);
}

.ledger-item > strong.negative {
  background: #fff0ec;
  color: var(--red);
}

.ledger-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-copy em {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 7px;
  align-items: center;
}

.ledger-source {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  border: 1px solid rgba(31, 38, 48, 0.1);
  border-radius: 999px;
  background: #f8fafc;
  color: #52606d;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  overflow: visible;
  padding: 4px 7px;
  text-overflow: clip;
  white-space: nowrap;
}

.ledger-source-evaluation {
  border-color: rgba(34, 102, 168, 0.16);
  background: #e9f2fb;
  color: var(--blue-strong);
}

.ledger-source-counterargument {
  border-color: rgba(241, 100, 63, 0.18);
  background: rgba(241, 100, 63, 0.09);
  color: var(--accent-deep);
}

.ledger-source-strengthen {
  border-color: rgba(20, 130, 113, 0.18);
  background: rgba(20, 130, 113, 0.1);
  color: var(--green);
}

.ledger-source-admin,
.ledger-source-request,
.ledger-source-grant {
  border-color: rgba(213, 142, 21, 0.18);
  background: rgba(213, 142, 21, 0.1);
  color: #9a6500;
}

.llm-metrics {
  display: grid;
  gap: 6px;
}

.llm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.llm-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 168px), 1fr));
  gap: 6px;
}

.llm-metric-tile {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template:
    "label value" auto
    "detail value" auto / minmax(0, 1fr) auto;
  min-height: 42px;
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fff, #fbfcfd);
  padding: 6px 8px 6px 10px;
  box-shadow: var(--shadow-soft);
}

.llm-metric-tile::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 8px 0 0 8px;
  background: linear-gradient(180deg, var(--orange), var(--blue));
}

.llm-metric-tile span,
.llm-section-heading p,
.llm-pricing-note span,
.llm-pricing-note p,
.admin-table caption,
.admin-table th span,
.llm-activity-card dt {
  color: var(--muted);
}

.llm-metric-tile span,
.llm-activity-card dt {
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.llm-metric-tile span {
  grid-area: label;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.llm-metric-tile strong {
  display: block;
  grid-area: value;
  margin-top: 0;
  font-size: clamp(0.98rem, 1.4vw, 1.14rem);
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.llm-metric-tile em {
  display: block;
  grid-area: detail;
  min-width: 0;
  margin-top: 0;
  color: #4d5966;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 780;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.llm-pricing-note {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
  gap: 5px 7px;
  border: 1px solid rgba(23, 79, 134, 0.14);
  border-radius: 8px;
  background: #f8fbff;
  padding: 5px 8px;
}

.llm-pricing-item {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.llm-pricing-note strong {
  color: var(--blue-strong);
}

.llm-pricing-note span {
  border-radius: 999px;
  background: #fff;
  font-size: 0.68rem;
  font-weight: 850;
  padding: 3px 6px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.llm-pricing-note p {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: normal;
  grid-column: 1 / -1;
}

.llm-section {
  display: grid;
  gap: 7px;
}

.llm-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.llm-section-heading h4 {
  margin: 0;
  font-size: 0.9rem;
}

.llm-section-heading p {
  margin: 0;
  font-size: 0.76rem;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.admin-rate-card-table tbody tr {
  background: #ffffff !important;
}

.admin-rate-card-table tbody tr:nth-child(odd) {
  background: #ffffff !important;
}

.admin-rate-card-table tbody tr:nth-child(even) {
  background: #dfeaff !important;
}

.admin-rate-card-table tbody tr:nth-of-type(odd) {
  background: #ffffff !important;
}

.admin-rate-card-table tbody tr:nth-of-type(even) {
  background: #dfeaff !important;
}

.admin-rate-card-table tbody tr:nth-child(even) td,
.admin-rate-card-table tbody tr:nth-child(even) th {
  background: #dfeaff !important;
}

.admin-rate-card-table-wrap {
  width: min(100%, 980px);
}

.admin-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid rgba(31, 38, 48, 0.08);
  padding: 7px 9px;
  text-align: right;
  white-space: nowrap;
}

.admin-table th:first-child,
.admin-table td:first-child {
  text-align: left;
}

.admin-table thead th {
  background: #f8fafc;
  color: #475467;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-table tbody tr:last-child th,
.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table th strong,
.admin-table th span {
  display: block;
}

.admin-table th span {
  margin-top: 3px;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.llm-activity-list {
  display: grid;
  gap: 7px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 3px;
  container-type: scroll-state;
}

.llm-activity-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}

.llm-activity-card > div {
  min-width: 0;
}

.llm-activity-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.llm-activity-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(80px, auto));
  gap: 7px;
  margin: 0;
}

.llm-activity-card dl div {
  border-left: 1px solid rgba(31, 38, 48, 0.1);
  padding-left: 8px;
}

.llm-activity-card dd {
  margin: 2px 0 0;
  font-weight: 900;
}

.llm-more-button {
  min-height: 38px;
  border: 1px solid rgba(216, 90, 53, 0.24);
  border-radius: 8px;
  background: #fff7ed;
  color: var(--orange-strong);
  cursor: pointer;
  font-weight: 900;
}

.llm-more-button:hover {
  border-color: rgba(216, 90, 53, 0.42);
  box-shadow: var(--shadow-soft);
}

.llm-more-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 860px) {
  .admin-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .llm-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-heading,
  .evaluation-spec-hero,
  .user-layout,
  .policy-layout,
  .evaluation-spec-layout,
  .llm-activity-card {
    grid-template-columns: 1fr;
  }

  .policy-rule-form,
  .evaluation-spec-list-shell,
  .evaluation-spec-test-shell {
    position: static;
    grid-column: auto;
  }

  .admin-status {
    min-width: 0;
    text-align: right;
  }

  .user-search {
    flex-wrap: wrap;
  }

  .user-search input {
    width: min(100%, 360px);
  }

  .admin-tabs-shell {
    top: 59px;
  }

  .user-detail {
    position: static;
  }

  .llm-activity-card dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .audit-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .request-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ledger-item {
    grid-template-columns: 72px minmax(0, 1fr) auto;
  }

  .ledger-item .ledger-balance {
    display: none;
  }
}

@media (max-width: 520px) {
  .admin-header {
    gap: 10px;
    padding-inline: 12px;
  }

  .admin-brand {
    gap: 9px;
  }

  .admin-brand h1 {
    font-size: 1rem;
  }

  .admin-brand span {
    font-size: 0.66rem;
  }

  .admin-header-actions a,
  .admin-header-actions button {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 0.86rem;
  }

  .admin-logout-button {
    width: 34px;
    min-width: 34px;
    padding: 0;
  }

  .admin-logout-button span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .admin-main {
    padding: 8px 10px 32px;
  }

  .admin-panel {
    padding: 14px;
  }

  .admin-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-event {
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 6px;
  }

  .audit-event-head {
    display: grid;
  }

  .audit-target {
    width: fit-content;
  }

  .request-card-head {
    display: grid;
  }

  .request-credit-badge {
    min-width: 0;
    justify-items: start;
  }

  .request-account-strip {
    grid-template-columns: 1fr;
  }

  .user-row-top,
  .user-row-foot,
  .user-detail-title-row {
    display: grid;
    justify-content: stretch;
  }

  .user-row-pills {
    justify-content: flex-start;
  }

  .user-row-metrics,
  .llm-user-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .llm-pricing-note {
    grid-template-columns: 1fr 1fr;
  }

  .llm-pricing-note strong,
  .llm-pricing-note p {
    grid-column: 1 / -1;
  }

  .llm-pricing-note p {
    display: none;
  }

  .llm-activity-card dl {
    grid-template-columns: 1fr;
  }

  .admin-card-row,
  .detail-grid,
  .ledger-item {
    grid-template-columns: 1fr;
  }

  .mini-request-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .mini-request-item > span:not(.pill),
  .ledger-item > span:last-child {
    text-align: left;
  }

  .admin-tabs-shell {
    top: 57px;
    margin-inline: -10px;
    padding-inline: 10px;
  }

  .admin-tabs {
    width: 100%;
    border-radius: 8px;
  }

  .admin-tabs button {
    flex: 1 1 0;
    gap: 3px;
    padding-inline: 4px;
    font-size: 0.76rem;
  }

  .tab-count {
    min-width: 20px;
    min-height: 20px;
    font-size: 0.66rem;
  }

  .llm-section-heading {
    display: grid;
    align-items: start;
  }

  .llm-activity-card strong {
    white-space: normal;
  }

  .llm-activity-card dl div {
    border-left: 0;
    border-top: 1px solid rgba(31, 38, 48, 0.1);
    padding: 8px 0 0;
  }

  .admin-action-row label,
  .admin-action-row input,
  .admin-action-row select,
  .admin-action-row button,
  .policy-form-grid,
  .policy-actions button,
  .request-actions button {
    width: 100%;
  }

  .policy-form-grid {
    grid-template-columns: 1fr;
  }
}

/* === Studio-aligned admin surface === */
:root {
  --paper: #f5efe5;
  --paper-deep: #eadbc5;
  --ink: #1f2630;
  --muted: #66707d;
  --accent: #f1643f;
  --accent-deep: #d34f2c;
  --orange: var(--accent);
  --orange-strong: var(--accent-deep);
  --blue: #2266a8;
  --blue-strong: #174f86;
  --green: #148271;
  --red: #ce362a;
  --amber: #d58e15;
  --line: rgba(31, 38, 48, 0.12);
  --paper-panel: #fffdf8;
  --surface: #f6f7f5;
  --soft: #fff9f1;
  --white: #ffffff;
  --focus: rgba(241, 100, 63, 0.36);
  --shadow: 0 12px 28px rgba(31, 38, 48, 0.08);
  --shadow-soft: 0 8px 18px rgba(31, 38, 48, 0.06);
  --shadow-tight: 0 10px 24px rgba(31, 38, 48, 0.1);
  --admin-radius: 8px;
}

html,
body {
  background:
    radial-gradient(circle at top right, rgba(241, 100, 63, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(32, 153, 137, 0.1), transparent 22%),
    var(--surface);
  color: var(--ink);
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
}

::selection {
  background: rgba(241, 100, 63, 0.24);
  color: var(--ink);
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  border-radius: var(--admin-radius);
  background: var(--ink);
  box-shadow: var(--shadow-tight);
}

.admin-header {
  min-height: 61px;
  border-bottom: 1px solid rgba(31, 38, 48, 0.1);
  background: #fffdf8;
  padding: 12px max(20px, env(safe-area-inset-right)) 10px max(20px, env(safe-area-inset-left));
  box-shadow: none;
  backdrop-filter: none;
}

.admin-brand {
  gap: 12px;
}

.admin-brand img {
  width: 42px;
  height: 38px;
}

.admin-brand span {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.admin-brand h1 {
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.admin-status {
  min-height: 34px;
  border: 1px solid rgba(31, 38, 48, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 11px;
  box-shadow: none;
}

.admin-status.is-error {
  border-color: rgba(206, 54, 42, 0.2);
  background: rgba(206, 54, 42, 0.08);
  color: var(--red);
}

.admin-header-actions {
  gap: 8px;
}

.admin-header-actions a,
.admin-header-actions button {
  min-height: 36px;
  border: 1px solid rgba(31, 38, 48, 0.14);
  border-radius: var(--admin-radius);
  background: #fff;
  color: #33404d;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 8px 12px;
  box-shadow: none;
}

.admin-header-actions a::after {
  color: var(--accent-deep);
}

.admin-header-actions a:hover,
.admin-header-actions button:hover:not(:disabled),
.admin-header-actions a:focus-visible,
.admin-header-actions button:focus-visible {
  border-color: rgba(34, 102, 168, 0.52);
  background: #e9f2fb;
  color: var(--blue-strong);
  transform: none;
  box-shadow: none;
}

.admin-main {
  width: 100%;
  max-width: 100%;
  gap: 14px;
  padding: 14px 20px 24px;
  scroll-margin-top: 76px;
}

.admin-summary {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.admin-summary-cards {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 10px;
}

.admin-panel,
.admin-summary-card,
.admin-analytics-panel,
.admin-analytics-stat,
.user-detail,
.admin-card,
.user-list-button,
.policy-rule-form,
.policy-rule-list-shell,
.request-decision-panel,
.user-action-panel,
.audit-event-body,
.admin-table-wrap,
.llm-activity-card,
.llm-pricing-note,
.llm-metric-tile {
  border: 1px solid rgba(31, 38, 48, 0.12);
  border-radius: var(--admin-radius);
  background: var(--paper-panel);
  box-shadow: var(--shadow);
}

.admin-summary-card {
  display: grid;
  min-height: 86px;
  gap: 6px;
  align-content: start;
  padding: 13px 14px;
  overflow: hidden;
}

.admin-summary-card::before {
  inset: 0 auto 0 0;
  width: 3px;
  height: auto;
  background: var(--blue);
}

.admin-summary-card.metric-requests::before,
.admin-summary-card.metric-evaluations::before {
  background: var(--accent);
}

.admin-summary-card.metric-admins::before {
  background: var(--green);
}

.admin-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-summary-card strong {
  order: initial;
  color: var(--ink);
  font-size: clamp(1.55rem, 1.25rem + 0.9vw, 2.1rem);
  font-weight: 900;
  letter-spacing: 0;
}

.admin-summary-card em {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.admin-analytics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-analytics-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 252, 0.96)),
    var(--paper-panel);
}

.admin-analytics-panel-wide {
  grid-column: span 2;
}

.admin-analytics-heading {
  display: grid;
  gap: 3px;
}

.admin-analytics-heading span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-analytics-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.15;
}

.admin-feature-mix {
  display: grid;
  gap: 8px;
}

.admin-feature-row {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  border: 1px solid rgba(31, 38, 48, 0.1);
  border-radius: 12px;
  background: #fff;
  padding: 9px 10px;
}

.admin-feature-row div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-feature-row strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-feature-row span {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.admin-feature-row > span {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
}

.admin-feature-row i {
  position: absolute;
  inset: auto auto 0 0;
  width: var(--feature-width, 0%);
  height: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--blue);
}

.admin-feature-row.feature-custom i {
  background: var(--accent);
}

.admin-feature-row.feature-counterargument i {
  background: var(--blue);
}

.admin-feature-row.feature-strengthen i {
  background: var(--green);
}

.admin-feature-row.feature-evaluation-spec-test i {
  background: #6a4c93;
}

.admin-feature-row.feature-counterargument_lens_evaluation i {
  background: #005f95;
}

.admin-feature-row.feature-strengthen_rewrite_evaluation i {
  background: #3d5a80;
}

.admin-feature-row.feature-follow_up_reevaluation i {
  background: #e07a5f;
}

.admin-daily-chart {
  position: relative;
  overflow-x: hidden;
  overflow-y: visible;
  min-height: 156px;
  border: 1px solid rgba(31, 38, 48, 0.1);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(20, 130, 113, 0.05), rgba(34, 102, 168, 0.04)),
    #fff;
  padding: 12px 10px 9px;
}

.admin-daily-area-chart {
  position: absolute;
  inset: 13px 10px 35px 10px;
  width: calc(100% - 20px);
  height: calc(100% - 47px);
  z-index: 0;
  pointer-events: none;
}

.admin-daily-area-grid-line {
  stroke: rgba(15, 23, 42, 0.28);
  stroke-width: 0.35;
  fill: none;
  shape-rendering: crispEdges;
}

.admin-daily-area-grid-line-horizontal {
  stroke-dasharray: none;
  stroke-width: 0.35;
}

.admin-daily-area-grid-line-vertical {
  stroke-dasharray: none;
  stroke-width: 0.18;
}

.admin-daily-area-fill {
  opacity: 0.94;
}

.admin-daily-area-fill-custom {
  fill: #d55e00;
}

.admin-daily-area-fill-counterargument {
  fill: #0072b2;
}

.admin-daily-area-fill-strengthen {
  fill: #cc79a7;
}

.admin-daily-area-fill-followup {
  fill: #2f9e44;
}

.admin-daily-area-fill-eval-spec-test {
  fill: #6a4c93;
}

.admin-daily-area-fill-counterargument-eval {
  fill: #005f95;
}

.admin-daily-area-fill-strengthen-eval {
  fill: #3d5a80;
}

.admin-daily-area-fill-followup-reeval {
  fill: #e07a5f;
}

.admin-daily-area-track {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--day-count), minmax(var(--bucket-min, 12px), 1fr));
  gap: 6px;
  align-items: end;
  min-width: 0;
  height: 100%;
  padding-block-end: 22px;
}

.admin-daily-bar {
  margin: 0;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  position: relative;
  display: block;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease;
}

.admin-daily-bar em {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}

.admin-analytics-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-analytics-stat {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  box-shadow: none;
}

.admin-analytics-stat span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-analytics-stat strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-analytics-stat em {
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 760;
}

.admin-tabs-shell {
  top: 61px;
  margin-inline: -20px;
  overflow-x: auto;
  padding: 0 20px 8px;
  background: linear-gradient(180deg, rgba(246, 247, 245, 0.96), rgba(246, 247, 245, 0));
  backdrop-filter: blur(10px);
  scrollbar-width: none;
}

.admin-tabs-shell::-webkit-scrollbar {
  display: none;
}

.admin-tabs {
  width: fit-content;
  min-width: min(100%, 640px);
  gap: 3px;
  border: 1px solid rgba(31, 38, 48, 0.14);
  border-radius: var(--admin-radius);
  background: #f8fafc;
  padding: 3px;
  box-shadow: none;
}

.admin-tabs button {
  min-height: 38px;
  border-radius: 6px;
  background: transparent;
  color: #52606d;
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0 12px;
  white-space: nowrap;
}

.admin-tabs button:hover:not([aria-selected="true"]) {
  border-color: transparent;
  background: #fff;
  color: var(--blue-strong);
  transform: none;
}

.admin-tabs button[aria-selected="true"],
.admin-tabs button[aria-selected="true"]:hover {
  border-color: transparent;
  background: #fff;
  color: var(--blue-strong);
  box-shadow: 0 1px 3px rgba(31, 38, 48, 0.12);
}

.tab-count {
  min-width: 22px;
  min-height: 22px;
  background: #e9f2fb;
  color: var(--blue-strong);
  font-size: 0.7rem;
}

.admin-tabs button[aria-selected="true"] .tab-count {
  background: var(--blue);
  color: #fff;
}

.admin-panel {
  gap: 14px;
  padding: 16px;
}

.panel-heading {
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(31, 38, 48, 0.1);
}

.panel-heading h3 {
  color: #26313c;
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: 0;
}

.panel-heading p {
  max-width: 760px;
  margin-top: 4px;
  color: #667481;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
}

.panel-heading select,
.user-search input,
.user-search button,
.admin-action-row input,
.admin-action-row select,
.admin-action-row button,
.policy-rule-form input,
.policy-rule-form select,
.policy-rule-form textarea,
.policy-rule-form button,
.admin-card button,
.admin-card textarea {
  min-height: 42px;
  border: 1px solid rgba(31, 38, 48, 0.16);
  border-radius: var(--admin-radius);
  font-size: 0.88rem;
  padding: 8px 10px;
}

.panel-heading select,
.user-search input,
.admin-action-row input,
.admin-action-row select,
.admin-action-row textarea,
.policy-rule-form input,
.policy-rule-form select,
.policy-rule-form textarea,
.admin-card textarea {
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

.panel-heading select:focus,
.user-search input:focus,
.admin-action-row input:focus,
.admin-action-row select:focus,
.admin-action-row textarea:focus,
.policy-rule-form input:focus,
.policy-rule-form select:focus,
.policy-rule-form textarea:focus,
.admin-card textarea:focus {
  border-color: rgba(34, 102, 168, 0.52);
  box-shadow: 0 0 0 3px rgba(34, 102, 168, 0.12);
  outline: 0;
}

.user-search button,
.admin-action-row button,
.policy-rule-form button,
.admin-card button {
  border-color: rgba(34, 102, 168, 0.2);
  background: var(--blue);
  color: #fff;
  box-shadow: none;
  font-weight: 900;
}

.user-search button:hover,
.admin-action-row button:hover,
.policy-rule-form button:hover,
.admin-card button:hover {
  border-color: rgba(34, 102, 168, 0.4);
  background: var(--blue-strong);
  filter: none;
  transform: none;
  box-shadow: none;
}

.admin-action-row button.secondary-action,
.policy-rule-card .secondary-action,
.policy-rule-form .secondary-action {
  border-color: rgba(31, 38, 48, 0.14);
  background: #fff;
  color: #33404d;
}

.admin-action-row button.danger-action {
  border-color: rgba(206, 54, 42, 0.22);
  background: rgba(206, 54, 42, 0.08);
  color: var(--red);
}

.loading-state,
.empty-state {
  border: 1px dashed rgba(31, 38, 48, 0.16);
  border-radius: var(--admin-radius);
  background: rgba(255, 253, 248, 0.76);
}

.empty-state {
  color: var(--muted);
}

.empty-state.is-error {
  border-color: rgba(206, 54, 42, 0.28);
  background: rgba(206, 54, 42, 0.08);
  color: var(--red);
}

.admin-card,
.user-list-button,
.llm-activity-card {
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.admin-card:hover,
.user-list-button:hover,
.llm-activity-card:hover {
  border-color: rgba(34, 102, 168, 0.28);
  box-shadow: var(--shadow-tight);
}

.request-overview article,
.audit-overview article,
.request-account-strip span,
.audit-meta-grid div,
.detail-grid div,
.llm-user-metrics div,
.user-row-metrics span {
  border-color: rgba(31, 38, 48, 0.1);
  border-radius: var(--admin-radius);
  background: #fff;
}

.detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.request-account-strip {
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
}

.user-row-metrics {
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
}

.llm-user-metrics {
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.request-kicker,
.audit-action-group,
.user-detail-kicker,
.request-overview span,
.audit-overview span,
.audit-meta-grid dt,
.llm-user-metrics span,
.llm-metric-tile span {
  color: #697782;
  letter-spacing: 0.12em;
}

.admin-card h4,
.policy-card-title h4,
.audit-event h4,
.user-detail-head h3,
.user-action-copy h4,
.user-history-heading h4,
.llm-section-heading h4 {
  color: #1f2630;
  font-weight: 900;
  letter-spacing: 0;
}

.item-meta,
.request-overview em,
.audit-overview em,
.request-account-strip em,
.request-decision-copy p,
.request-note.is-muted,
.audit-reason.is-muted,
.user-row-identity em,
.user-row-foot,
.detail-grid em,
.user-detail-head p,
.user-action-copy p,
.mini-request-item,
.ledger-copy em,
.ledger-balance,
.llm-section-heading p,
.llm-pricing-note span,
.llm-pricing-note p,
.admin-table th span,
.llm-activity-card dt {
  color: var(--muted);
}

.pill {
  min-height: 24px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  padding: 4px 8px;
}

.pill.pending {
  background: rgba(213, 142, 21, 0.12);
  color: #9a6500;
}

.pill.approved,
.pill.active,
.pill.admin,
.pill.superadmin,
.pill.super_admin {
  background: rgba(20, 130, 113, 0.12);
  color: var(--green);
}

.pill.declined,
.pill.disabled {
  background: rgba(206, 54, 42, 0.1);
  color: var(--red);
}

.user-list-button {
  background: #fffdf8;
}

.user-list-button[aria-current="true"] {
  border-color: rgba(34, 102, 168, 0.52);
  background: #e9f2fb;
  box-shadow: 0 0 0 3px rgba(34, 102, 168, 0.12);
}

.user-list-button[aria-current="true"]::before {
  background: var(--blue);
}

.request-credit-badge {
  border-color: rgba(241, 100, 63, 0.18);
  background: rgba(241, 100, 63, 0.09);
}

.request-credit-badge strong {
  color: var(--accent-deep);
}

.request-note,
.request-admin-note,
.policy-guidance {
  color: #33404d;
  line-height: 1.52;
}

.request-note {
  border-color: rgba(31, 38, 48, 0.09);
  background: #fff;
}

.request-admin-note,
.llm-pricing-note {
  border-color: rgba(34, 102, 168, 0.14);
  background: #e9f2fb;
  color: var(--blue-strong);
}

.policy-trigger-list li {
  border-color: rgba(34, 102, 168, 0.16);
  background: #e9f2fb;
  color: var(--blue-strong);
}

.admin-form-status {
  border: 1px solid rgba(20, 130, 113, 0.18);
  background: rgba(20, 130, 113, 0.1);
  color: var(--green);
}

.admin-form-status.is-error {
  border-color: rgba(206, 54, 42, 0.2);
  background: rgba(206, 54, 42, 0.08);
  color: var(--red);
}

.audit-rail::before {
  background: rgba(31, 38, 48, 0.14);
}

.audit-rail span {
  border-color: var(--paper-panel);
}

.admin-table-wrap {
  background: #fff;
  box-shadow: none;
}

.admin-table thead th {
  background: #f8fafb;
  color: #52606d;
}

.admin-table th,
.admin-table td {
  border-bottom-color: rgba(31, 38, 48, 0.08);
}

.admin-table tbody tr:hover {
  background: #f8fafc;
}

.llm-metric-tile::after {
  background: linear-gradient(180deg, var(--accent), var(--blue));
}

.llm-more-button {
  min-height: 42px;
  border-color: rgba(31, 38, 48, 0.14);
  border-radius: var(--admin-radius);
  background: #fff;
  color: var(--blue-strong);
  font-weight: 900;
}

.llm-more-button:hover {
  border-color: rgba(34, 102, 168, 0.52);
  background: #e9f2fb;
  box-shadow: none;
}

@media (max-width: 980px) {
  .admin-main {
    padding: 12px 14px 24px;
  }

  .admin-tabs-shell {
    margin-inline: -14px;
    padding-inline: 14px;
  }

  .admin-summary-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-analytics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-layout,
  .policy-layout,
  .evaluation-spec-layout {
    grid-template-columns: 1fr;
  }

  .policy-rule-form,
  .evaluation-spec-list-shell,
  .user-detail {
    position: static;
  }
}

@media (max-width: 620px) {
  .admin-header {
    flex-wrap: wrap;
    gap: 10px;
    padding-inline: 14px;
  }

  .admin-header-tools {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .admin-status {
    max-width: min(100%, 58vw);
  }

  .admin-tabs-shell {
    top: 105px;
  }

  .admin-tabs {
    min-width: max-content;
  }

  .admin-tabs button {
    min-width: 82px;
  }

  .admin-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-analytics,
  .admin-analytics-stats {
    grid-template-columns: 1fr;
  }

  .admin-analytics-panel-wide {
    grid-column: span 1;
  }

  .admin-daily-chart {
    grid-template-columns: repeat(7, minmax(18px, 1fr));
  }

  .panel-heading,
  .request-card-head,
  .audit-event-head {
    grid-template-columns: 1fr;
  }

  .request-account-strip,
  .detail-grid,
  .llm-user-metrics,
  .ledger-item {
    grid-template-columns: 1fr;
  }

  .user-search,
  .request-actions,
  .admin-action-row,
  .policy-actions,
  .user-search input,
  .user-search button,
  .admin-action-row label,
  .admin-action-row input,
  .admin-action-row select,
  .admin-action-row textarea,
  .admin-action-row button,
  .policy-actions button,
  .request-actions button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .admin-summary-cards {
    grid-template-columns: 1fr;
  }

  .admin-header-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  :where(a, button, input, select, textarea, .admin-card, .user-list-button, .llm-activity-card) {
    transition-duration: 1ms !important;
  }
}

@media (forced-colors: active) {
  .admin-header,
  .admin-panel,
  .admin-summary-card,
  .admin-card,
  .user-detail,
  .user-list-button,
  .policy-rule-form,
  .policy-rule-list-shell,
  .admin-table-wrap,
  .llm-activity-card,
  .loading-state,
  .empty-state,
  .request-decision-panel,
  .user-action-panel,
  .audit-event-body {
    border: 1px solid CanvasText;
    background: Canvas;
    box-shadow: none;
  }

  .admin-tabs button[aria-selected="true"] {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
}
/* === End studio-aligned admin surface === */

/* === 2026 admin polish pass === */
:root {
  --admin-bg: #f5f8fb;
  --admin-bg-deep: #e8eef5;
  --admin-surface: #ffffff;
  --admin-surface-raised: #fbfdff;
  --admin-surface-muted: #f1f5f9;
  --admin-ink: #101827;
  --admin-ink-soft: #334155;
  --admin-muted: #64748b;
  --admin-line: rgba(15, 23, 42, 0.105);
  --admin-line-strong: rgba(15, 23, 42, 0.16);
  --admin-blue: #1d6fd6;
  --admin-blue-deep: #164f96;
  --admin-green: #148271;
  --admin-green-deep: #0f665b;
  --admin-amber: #a5761d;
  --admin-red: #b84427;
  --admin-focus: rgba(29, 111, 214, 0.28);
  --admin-shadow-soft: 0 14px 36px rgba(15, 23, 42, 0.075);
  --admin-shadow-lift: 0 22px 60px rgba(15, 23, 42, 0.12);
  --admin-radius: 8px;
  --orange: #d85a35;
  --orange-strong: #b84427;
  --blue: var(--admin-blue);
  --blue-strong: var(--admin-blue-deep);
  --green: var(--admin-green);
  --red: var(--admin-red);
  --amber: var(--admin-amber);
  --ink: var(--admin-ink);
  --muted: var(--admin-muted);
  --line: var(--admin-line);
  --paper-panel: var(--admin-surface);
  --surface: var(--admin-bg);
  --focus: var(--admin-focus);
  --shadow: var(--admin-shadow-soft);
  --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.055);
  --shadow-tight: 0 10px 24px rgba(15, 23, 42, 0.085);
}

html,
body {
  min-height: 100%;
  overflow-x: clip;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(245, 248, 251, 0.94)),
    linear-gradient(90deg, rgba(15, 23, 42, 0.028) 1px, transparent 1px),
    linear-gradient(180deg, rgba(15, 23, 42, 0.024) 1px, transparent 1px),
    var(--admin-bg);
  background-size: auto, 44px 44px, 44px 44px, auto;
  color: var(--admin-ink);
  color-scheme: light;
  scrollbar-color: rgba(71, 85, 105, 0.42) transparent;
}

body {
  line-height: 1.45;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--admin-focus);
  outline-offset: 2px;
}

:where(button, a) {
  touch-action: manipulation;
}

.admin-shell {
  min-block-size: 100vh;
  min-block-size: 100dvh;
}

.skip-link {
  background: var(--admin-ink);
}

.admin-header {
  min-height: 76px;
  border-bottom: 1px solid var(--admin-line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 12px 30px rgba(15, 23, 42, 0.055);
  padding: calc(12px + env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right)) 12px max(24px, env(safe-area-inset-left));
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .admin-header {
    -webkit-backdrop-filter: blur(20px) saturate(1.16);
    backdrop-filter: blur(20px) saturate(1.16);
  }
}

.admin-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
}

.admin-brand img {
  width: 42px;
  height: 38px;
}

.admin-brand span {
  color: var(--admin-muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.admin-brand h1 {
  color: var(--admin-ink);
  font-size: 1.1rem;
  letter-spacing: 0;
}

.admin-header-tools {
  gap: 12px;
}

.admin-status {
  min-height: 34px;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius);
  background: rgba(248, 250, 252, 0.86);
  color: var(--admin-muted);
  padding: 8px 10px;
  box-shadow: none;
}

.admin-status:empty,
.admin-status[hidden] {
  display: none;
}

.admin-status.is-error {
  border-color: rgba(184, 68, 39, 0.22);
  background: #fff5f0;
  color: var(--admin-red);
}

.admin-header-actions {
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(15, 23, 42, 0.085);
  border-radius: var(--admin-radius);
  background: rgba(248, 250, 252, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 24px rgba(15, 23, 42, 0.055);
}

.admin-header-actions a,
.admin-header-actions button {
  min-height: 38px;
  border-color: transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--admin-ink-soft);
  font-size: 0.84rem;
  font-weight: 880;
  padding: 8px 10px;
}

.admin-header-actions a::after {
  color: var(--admin-blue-deep);
}

.admin-header-actions a:hover,
.admin-header-actions button:hover:not(:disabled),
.admin-header-actions a:focus-visible,
.admin-header-actions button:focus-visible {
  border-color: rgba(29, 111, 214, 0.16);
  background: var(--admin-surface);
  color: var(--admin-blue-deep);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

.admin-header-actions button:active,
.admin-header-actions a:active {
  transform: translateY(1px);
}

.admin-main {
  width: min(100%, 1440px);
  max-width: 1440px;
  gap: 16px;
  padding: 18px 24px 28px;
  scroll-margin-top: 92px;
}

.admin-summary,
.admin-analytics-shell,
.admin-panel,
.admin-analytics-panel,
.user-detail,
.admin-card,
.user-list-button,
.policy-rule-form,
.policy-rule-list-shell,
.request-decision-panel,
.user-action-panel,
.audit-event-body,
.llm-section,
.llm-activity-card {
  container-type: inline-size;
}

.admin-summary {
  gap: 12px;
}

.admin-analytics-shell {
  display: grid;
  gap: 10px;
  scroll-margin-top: 148px;
}

.admin-summary-cards {
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 10px;
}

.admin-panel,
.admin-summary-card,
.admin-analytics-panel,
.admin-analytics-stat,
.user-detail,
.admin-card,
.user-list-button,
.policy-rule-form,
.policy-rule-list-shell,
.request-decision-panel,
.user-action-panel,
.audit-event-body,
.admin-table-wrap,
.llm-activity-card,
.llm-pricing-note,
.llm-metric-tile,
.loading-state,
.empty-state {
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 253, 255, 0.98)),
    var(--admin-surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    var(--admin-shadow-soft);
}

.admin-summary-card {
  --metric-color: var(--admin-blue);
  min-height: 92px;
  gap: 7px;
  align-content: start;
  padding: 13px 14px 12px;
  background: #fff;
}

.admin-summary-card::before {
  inset: 0 auto 0 0;
  width: 3px;
  height: auto;
  background: var(--metric-color);
}

.admin-summary-card.metric-requests,
.admin-summary-card.metric-evaluations {
  --metric-color: #d85a35;
}

.admin-summary-card.metric-users,
.admin-summary-card.metric-credits,
.admin-summary-card.metric-counterarguments {
  --metric-color: var(--admin-blue);
}

.admin-summary-card.metric-admins,
.admin-summary-card.metric-strengthen {
  --metric-color: var(--admin-green);
}

.admin-summary-card span {
  color: var(--admin-muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.admin-summary-card strong {
  color: var(--admin-ink);
  font-size: 1.72rem;
  line-height: 1;
}

.admin-summary-card em {
  color: var(--admin-ink-soft);
  font-size: 0.78rem;
}

.admin-analytics {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
}

.admin-analytics-panel {
  grid-column: span 4;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.admin-analytics-panel-wide {
  grid-column: span 8;
}

.admin-analytics-stats {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
}

.admin-analytics-heading span,
.request-kicker,
.audit-action-group,
.user-detail-kicker,
.request-overview span,
.audit-overview span,
.audit-meta-grid dt,
.llm-user-metrics span,
.llm-metric-tile span,
.admin-analytics-stat span {
  color: var(--admin-muted);
  letter-spacing: 0.08em;
}

.admin-analytics-heading h2,
.panel-heading :is(h2, h3),
.admin-card h4,
.policy-card-title h4,
.audit-event h4,
.user-detail-head h3,
.user-action-copy h4,
.user-history-heading h4,
.llm-section-heading h4 {
  color: var(--admin-ink);
  font-weight: 900;
  letter-spacing: 0;
}

.panel-heading :is(h2, h3) {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.16;
}

.admin-feature-row,
.admin-daily-chart,
.admin-analytics-stat,
.request-overview article,
.audit-overview article,
.request-account-strip span,
.audit-meta-grid div,
.detail-grid div,
.llm-user-metrics div,
.user-row-metrics span {
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: var(--admin-radius);
  background: #fff;
  box-shadow: none;
}

.admin-feature-row {
  min-height: 54px;
}

.admin-feature-row i {
  height: 4px;
  background: var(--admin-blue);
}

.admin-feature-row.feature-custom i,
.admin-feature-row.feature-evaluation i {
  background: #d85a35;
}

.admin-feature-row.feature-counterargument i {
  background: var(--admin-blue);
}

.admin-feature-row.feature-strengthen i {
  background: var(--admin-green);
}

.admin-feature-row.feature-evaluation-spec-test i {
  background: #6a4c93;
}

.admin-feature-row.feature-counterargument_lens_evaluation i {
  background: #005f95;
}

.admin-feature-row.feature-strengthen_rewrite_evaluation i {
  background: #3d5a80;
}

.admin-feature-row.feature-follow_up_reevaluation i {
  background: #e07a5f;
}

.admin-daily-chart {
  min-height: 168px;
  background:
    linear-gradient(180deg, rgba(20, 130, 113, 0.045), rgba(29, 111, 214, 0.04)),
    linear-gradient(rgba(15, 23, 42, 0.065) 1px, transparent 1px) 0 13px / 100% calc((100% - 42px) / 2) no-repeat,
    linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px) 0 calc(50% - 7px) / 100% calc((100% - 42px) / 2) no-repeat,
    #fff;
}

.admin-daily-bar {
  height: 140px;
}

.admin-volume-widget {
  display: grid;
  gap: 10px;
}

.admin-volume-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: start;
  justify-content: space-between;
}

.admin-volume-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-volume-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  flex: 1 1 360px;
  gap: 8px;
}

.admin-volume-kpis span,
.admin-volume-detail,
.admin-volume-legend {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--admin-radius);
  background: rgba(255, 255, 255, 0.78);
}

.admin-volume-kpis span {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 9px 10px;
}

.admin-volume-kpis strong {
  color: var(--admin-ink);
  font-size: 1.04rem;
  line-height: 1;
}

.admin-volume-kpis em,
.admin-volume-detail span,
.admin-volume-legend span {
  color: var(--admin-muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 850;
}

.admin-chart-fullscreen {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(2, 132, 199, 0.22);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 252, 0.94));
  color: var(--admin-ink);
  box-shadow: 0 14px 26px rgba(8, 15, 22, 0.12);
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.admin-chart-fullscreen:hover {
  transform: translateY(-1px);
  border-color: rgba(2, 132, 199, 0.45);
  box-shadow: 0 16px 28px rgba(8, 15, 22, 0.16);
}

.admin-chart-fullscreen:focus-visible {
  outline: 2px solid rgba(2, 132, 199, 0.34);
  outline-offset: 2px;
}

.admin-chart-fullscreen svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-chart-fullscreen svg path {
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
}

.admin-chart-fullscreen-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: currentColor;
  position: relative;
  z-index: 1;
}

.admin-chart-fullscreen-fallback svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-chart-fullscreen-fallback-exit {
  display: none;
}

.admin-chart-fullscreen[data-fullscreen-state="open"] .admin-chart-fullscreen-fallback-enter {
  display: none;
}

.admin-chart-fullscreen[data-fullscreen-state="open"] .admin-chart-fullscreen-fallback-exit {
  display: inline-flex;
}

.admin-chart-fullscreen-icon-exit {
  display: none;
}

.admin-chart-fullscreen[data-fullscreen-state="open"] .admin-chart-fullscreen-icon-enter {
  display: none;
}

.admin-chart-fullscreen[data-fullscreen-state="open"] .admin-chart-fullscreen-icon-exit {
  display: block;
}

.admin-range-control {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--admin-radius);
  background: rgba(234, 240, 246, 0.88);
  padding: 3px;
}

.admin-range-control button {
  min-width: 42px;
  min-height: 32px;
  border: 0;
  border-radius: calc(var(--admin-radius) - 2px);
  background: transparent;
  color: var(--admin-ink-soft);
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
}

.admin-range-control button[aria-pressed="true"] {
  background: #fff;
  color: var(--admin-blue);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.admin-daily-chart-shell {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
  min-height: 218px;
}

.admin-y-axis {
  position: relative;
  padding: 12px 0 33px 2px;
  min-height: 0;
  min-width: 0;
}

.admin-y-axis-label {
  position: absolute;
  right: 0;
  top: calc(13px + (100% - 48px) * var(--admin-axis-y));
  transform: translate(0, -50%);
  color: var(--admin-muted);
  font-size: 0.85rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
}

.admin-daily-scroll {
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

.admin-daily-chart {
  position: relative;
  min-inline-size: max(100%, calc(var(--day-count) * var(--bucket-min, 18px)));
  min-height: 218px;
  padding: 13px 10px 10px;
  overflow-x: hidden;
  overflow-y: visible;
}

.admin-daily-area-chart {
  inset: 13px 10px 35px;
}

.admin-daily-bar {
  height: 188px;
  min-width: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1;
  margin: 0;
  display: block;
  min-height: 0;
}

.admin-daily-area-track {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--day-count), minmax(var(--bucket-min, 14px), 1fr));
  gap: 6px;
  align-items: end;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding-block-end: 22px;
}

.admin-daily-bar em {
  visibility: hidden;
  color: var(--admin-muted);
}

.admin-daily-bar.is-major-tick em,
.admin-daily-bar.is-selected em {
  visibility: visible;
}

.admin-volume-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.admin-volume-legend,
.admin-volume-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 7px 9px;
}

.admin-volume-legend span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.admin-volume-legend span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.admin-volume-legend .legend-custom {
  color: #a84800;
}

.admin-volume-legend .legend-counterargument {
  color: #005f95;
}

.admin-volume-legend .legend-strengthen {
  color: #a95485;
}

.admin-volume-legend .legend-followup {
  color: #2f9e44;
}

.admin-volume-legend .legend-eval-spec-test {
  color: #6a4c93;
}

.admin-volume-legend .legend-counterargument-eval {
  color: #005f95;
}

.admin-volume-legend .legend-strengthen-eval {
  color: #3d5a80;
}

.admin-volume-legend .legend-followup-reeval {
  color: #e07a5f;
}

.admin-volume-detail strong {
  color: var(--admin-ink);
  font-size: 0.8rem;
}

.admin-analytics-stat strong,
.llm-metric-tile strong,
.request-overview strong,
.audit-overview strong,
.detail-grid strong {
  color: var(--admin-ink);
  font-size: 1.08rem;
}

.admin-tabs-shell {
  top: 76px;
  margin-inline: -24px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 0 24px 10px;
  background: linear-gradient(180deg, rgba(245, 248, 251, 0.98), rgba(245, 248, 251, 0));
  scrollbar-width: none;
}

.admin-tabs-shell::-webkit-scrollbar {
  display: none;
}

.admin-tabs {
  width: fit-content;
  min-width: min(100%, 680px);
  gap: 3px;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 12px;
  background: rgba(238, 243, 248, 0.9);
  padding: 5px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 12px 28px rgba(15, 23, 42, 0.06);
}

.admin-tabs button {
  position: relative;
  flex: 0 0 auto;
  overflow: visible;
  white-space: nowrap;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #52606d;
  font-size: 0.82rem;
  font-weight: 900;
  padding-inline: 14px;
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.admin-tabs button span {
  white-space: nowrap;
  text-decoration: none;
}

.admin-tabs button::before {
  content: none;
}

.admin-tabs button:hover:not([aria-selected="true"]) {
  border-color: rgba(0, 95, 149, 0.1);
  background: rgba(255, 255, 255, 0.74);
  color: var(--admin-blue-deep);
}

.admin-tabs button[aria-selected="true"],
.admin-tabs button[aria-selected="true"]:hover {
  border-color: rgba(5, 84, 130, 0.92);
  background:
    linear-gradient(180deg, #0b7fbd 0%, #075f94 100%),
    #075f94;
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(2, 49, 74, 0.28),
    0 1px 2px rgba(15, 23, 42, 0.08),
    0 10px 22px rgba(0, 95, 149, 0.22);
  text-decoration: none;
}

.admin-tabs button[aria-selected="true"] span {
  color: #fff;
  text-decoration: none;
}

.tab-count {
  background: #e9f2fb;
  color: var(--admin-blue-deep);
}

.admin-tabs button[aria-selected="true"] .tab-count {
  background: rgba(255, 255, 255, 0.94);
  color: #075f94;
}

.admin-panel {
  gap: 14px;
  padding: 16px;
}

.evaluation-spec-panel {
  background: #f7f9fc;
}

.evaluation-spec-hero {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  align-items: center;
  min-height: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 253, 0.98)),
    #fff;
  color: var(--admin-ink, #18212f);
  padding: 12px 14px;
}

.evaluation-spec-hero h2 {
  color: var(--admin-ink, #18212f);
  font-size: 1.18rem;
  line-height: 1.05;
}

.evaluation-spec-hero p {
  max-width: 640px;
  margin-top: 4px;
  color: var(--admin-muted, #667085);
  font-size: 0.82rem;
}

.evaluation-spec-runtime {
  border-color: rgba(15, 23, 42, 0.1);
  background: #fff;
  color: var(--admin-ink, #18212f);
  padding: 9px 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  margin-top: 0;
}

.evaluation-spec-runtime strong {
  color: var(--admin-ink, #18212f);
}

.evaluation-spec-runtime em {
  color: var(--admin-muted, #667085);
}

.evaluation-spec-commandbar {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 9px 12px;
}

.evaluation-spec-delete-dialog {
  width: min(480px, calc(100vw - 32px));
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-ink, #18212f);
  padding: 0;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.evaluation-spec-delete-dialog::backdrop {
  background: rgba(15, 23, 42, 0.46);
}

.evaluation-spec-delete-dialog-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.evaluation-spec-delete-dialog h2,
.evaluation-spec-delete-dialog p,
.evaluation-spec-delete-summary {
  margin: 0;
}

.evaluation-spec-delete-dialog p {
  color: var(--admin-muted, #667085);
  font-size: 0.9rem;
  font-weight: 720;
  line-height: 1.45;
}

.evaluation-spec-delete-summary {
  display: grid;
  gap: 8px;
}

.evaluation-spec-delete-summary div {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #f7f9fc;
  padding: 9px 10px;
}

.evaluation-spec-delete-summary dt {
  color: var(--admin-muted, #667085);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.evaluation-spec-delete-summary dd {
  margin: 0;
  color: var(--admin-ink, #18212f);
  font-weight: 900;
}

.evaluation-spec-delete-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.evaluation-spec-delete-actions button {
  min-height: 38px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-ink, #18212f);
  font-weight: 900;
  padding: 8px 12px;
}

.evaluation-spec-delete-actions .danger-action {
  border-color: rgba(184, 68, 39, 0.28);
  background: #fff0ec;
  color: var(--red);
}

.evaluation-spec-delete-actions .danger-action:hover,
.evaluation-spec-delete-actions .danger-action:focus-visible {
  background: var(--red);
  color: #fff;
}

.panel-heading {
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.085);
}

.panel-heading p,
.empty-state,
.item-meta,
.request-overview em,
.audit-overview em,
.request-account-strip em,
.request-decision-copy p,
.request-note.is-muted,
.audit-reason.is-muted,
.user-row-identity em,
.user-row-foot,
.detail-grid em,
.user-detail-head p,
.user-action-copy p,
.mini-request-item,
.ledger-copy em,
.ledger-balance,
.llm-section-heading p,
.llm-pricing-note span,
.llm-pricing-note p,
.admin-table th span,
.llm-activity-card dt {
  color: var(--admin-muted);
}

.panel-heading p {
  max-width: 78ch;
  line-height: 1.42;
}

.panel-heading select,
.user-search input,
.user-search button,
.admin-action-row input,
.admin-action-row select,
.admin-action-row button,
.policy-rule-form input,
.policy-rule-form select,
.policy-rule-form textarea,
.policy-rule-form button,
.admin-card button,
.admin-card textarea,
.llm-more-button {
  min-height: 42px;
  border: 1px solid var(--admin-line-strong);
  border-radius: var(--admin-radius);
}

.panel-heading select,
.user-search input,
.admin-action-row input,
.admin-action-row select,
.admin-action-row textarea,
.policy-rule-form input,
.policy-rule-form select,
.policy-rule-form textarea,
.admin-card textarea {
  background: #fff;
  color: var(--admin-ink);
}

.panel-heading select:focus,
.user-search input:focus,
.admin-action-row input:focus,
.admin-action-row select:focus,
.admin-action-row textarea:focus,
.policy-rule-form input:focus,
.policy-rule-form select:focus,
.policy-rule-form textarea:focus,
.admin-card textarea:focus {
  border-color: rgba(29, 111, 214, 0.52);
  box-shadow: 0 0 0 4px rgba(29, 111, 214, 0.11);
}

.user-search {
  display: grid;
  grid-template-columns: minmax(180px, 280px) auto;
  gap: 8px;
}

.user-search input {
  width: 100%;
}

.user-search button,
.admin-action-row button,
.policy-rule-form button,
.admin-card button {
  border-color: rgba(29, 111, 214, 0.22);
  background: linear-gradient(135deg, var(--admin-blue-deep), var(--admin-blue));
  color: #fff;
  box-shadow:
    0 10px 22px rgba(29, 111, 214, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.user-search button:hover,
.admin-action-row button:hover,
.policy-rule-form button:hover,
.admin-card button:hover {
  border-color: rgba(29, 111, 214, 0.42);
  background: linear-gradient(135deg, #123f7e, #1a63c4);
  box-shadow:
    0 12px 26px rgba(29, 111, 214, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.admin-action-row button.secondary-action,
.policy-rule-card .secondary-action,
.policy-rule-form .secondary-action,
.llm-more-button {
  border-color: var(--admin-line);
  background: #fff;
  color: var(--admin-blue-deep);
  box-shadow: none;
}

.admin-action-row button.danger-action {
  border-color: rgba(184, 68, 39, 0.24);
  background: #fff4ef;
  color: var(--admin-red);
  box-shadow: none;
}

.loading-state,
.empty-state {
  background: rgba(255, 255, 255, 0.68);
  box-shadow: none;
}

.empty-state.is-error {
  border-color: rgba(184, 68, 39, 0.3);
  background: #fff5f0;
  color: var(--admin-red);
}

.admin-card,
.user-list-button,
.llm-activity-card {
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.admin-card:hover,
.user-list-button:hover,
.llm-activity-card:hover {
  border-color: rgba(29, 111, 214, 0.28);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.admin-card:focus-within,
.user-list-button:focus-visible,
.llm-activity-card:focus-within {
  border-color: rgba(29, 111, 214, 0.42);
  box-shadow: 0 0 0 4px rgba(29, 111, 214, 0.1);
}

.request-overview,
.audit-overview {
  grid-template-columns: repeat(auto-fit, minmax(152px, 1fr));
  gap: 8px;
}

.request-account-strip,
.user-row-metrics,
.llm-user-metrics {
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 7px;
}

.detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.user-layout {
  grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.18fr);
  gap: 14px;
}

.user-detail {
  top: 146px;
  max-height: calc(100dvh - 166px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.user-list-button {
  background: #fff;
}

.user-list-button[aria-current="true"] {
  border-color: rgba(29, 111, 214, 0.54);
  background: #eef6ff;
  box-shadow: 0 0 0 4px rgba(29, 111, 214, 0.11);
}

.user-list-button[aria-current="true"]::before {
  background: var(--admin-blue);
}

.pill {
  min-height: 24px;
  font-size: 0.74rem;
}

.pill.pending {
  background: #fff6d8;
  color: var(--admin-amber);
}

.pill.approved,
.pill.active,
.pill.admin,
.pill.superadmin,
.pill.super_admin {
  background: #e7f5ef;
  color: var(--admin-green-deep);
}

.pill.declined,
.pill.disabled {
  background: #fff0ea;
  color: var(--admin-red);
}

.request-credit-badge {
  border-color: rgba(216, 90, 53, 0.2);
  background: #fff5ed;
}

.request-credit-badge strong {
  color: #b84427;
}

.request-note,
.request-admin-note,
.policy-guidance,
.audit-reason {
  color: var(--admin-ink-soft);
  line-height: 1.52;
}

.request-admin-note,
.llm-pricing-note {
  border-color: rgba(29, 111, 214, 0.14);
  background: #eef6ff;
  color: var(--admin-blue-deep);
}

.policy-layout {
  grid-template-columns: minmax(320px, 0.74fr) minmax(0, 1.26fr);
  gap: 14px;
}

.policy-rule-form {
  top: 146px;
}

.policy-rule-form textarea:disabled {
  background: #f3f7fb;
  color: var(--admin-muted);
  cursor: not-allowed;
}

.policy-always-toggle {
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(29, 111, 214, 0.14);
  border-radius: var(--admin-radius);
  background: #eef6ff;
  color: var(--admin-blue-deep);
  padding: 8px 10px;
}

.policy-trigger-list li,
.ledger-source,
.audit-target {
  border-radius: 999px;
}

.policy-trigger-list li {
  border-color: rgba(29, 111, 214, 0.16);
  background: #eef6ff;
  color: var(--admin-blue-deep);
}

.policy-trigger-list .policy-trigger-always {
  border-color: rgba(20, 130, 113, 0.2);
  background: #e7f5ef;
  color: var(--admin-green-deep);
}

.audit-timeline {
  gap: 0;
}

.audit-rail::before {
  background: rgba(15, 23, 42, 0.13);
}

.audit-rail span {
  border-color: #fff;
}

.admin-table-wrap {
  overflow: auto;
  scrollbar-gutter: stable;
  background:
    linear-gradient(90deg, #fff, #fff) left / 16px 100% local,
    linear-gradient(90deg, #fff, #fff) right / 16px 100% local,
    linear-gradient(90deg, rgba(15, 23, 42, 0.1), transparent) left / 16px 100% scroll,
    linear-gradient(270deg, rgba(15, 23, 42, 0.1), transparent) right / 16px 100% scroll,
    #fff;
  background-repeat: no-repeat;
  box-shadow: none;
}

.admin-table {
  font-size: 0.8rem;
}

.admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f9fc;
  color: var(--admin-muted);
}

.admin-table th,
.admin-table td {
  border-bottom-color: rgba(15, 23, 42, 0.075);
  padding: 9px 10px;
}

.admin-table tbody tr:hover {
  background: #f8fbff;
}

.llm-metrics {
  gap: 16px;
  grid-column: 1 / -1;
}

.llm-config-form {
  grid-column: 1 / -1;
}

.llm-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: start;
}

.llm-panel-grid > .llm-config-form,
.llm-panel-grid > .llm-metrics {
  align-self: start;
  margin: 0;
}


.llm-toolbar,
.llm-pricing-note,
.llm-section {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--admin-radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--admin-shadow-soft);
}

.llm-hero {
  position: relative;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(237, 250, 255, 0.95), rgba(255, 243, 235, 0.96));
  box-shadow: var(--admin-shadow-soft);
  padding: 18px;
  margin-bottom: 14px;
  overflow: hidden;
}

.llm-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 40%, rgba(37, 99, 235, 0.08), transparent 72%);
  transform: translateX(100%);
  animation: llm-hero-sweep 12s linear infinite;
}

@keyframes llm-hero-sweep {
  0% {
    transform: translateX(-110%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  55% {
    opacity: 1;
  }
  70% {
    opacity: 0;
  }
  100% {
    transform: translateX(110%);
    opacity: 0;
  }
}

.llm-kicker {
  margin: 0 0 4px;
  color: var(--admin-blue-deep);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 850;
  font-size: 0.64rem;
}

.llm-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
}

.llm-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 820;
  letter-spacing: 0.02em;
  color: var(--ink);
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.82);
}

.llm-badge--bright {
  border-color: rgba(16, 185, 129, 0.34);
  color: #0f5737;
  background: rgba(16, 185, 129, 0.1);
}

.llm-badge--muted {
  border-color: rgba(96, 165, 250, 0.34);
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.1);
}

.llm-badge--calm {
  border-color: rgba(168, 85, 247, 0.25);
  color: #6d28d9;
  background: rgba(167, 139, 250, 0.08);
}

.llm-toolbar {
  padding: 12px 14px;
}

.llm-config-form {
  display: grid;
  gap: 12px;
  position: relative;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.72), rgba(246, 250, 255, 0.7) 40%, rgba(255, 255, 255, 0.84)),
    linear-gradient(130deg, rgba(241, 245, 255, 0.98), rgba(245, 248, 252, 0.94));
  box-shadow: 0 22px 45px rgba(9, 15, 24, 0.12);
  padding: 0 14px 14px;
}

.llm-config-form::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.66);
  opacity: 0.7;
}

.llm-subheading {
  margin: 0;
}

.llm-config-grid {
  gap: 12px;
}

.llm-config-field {
  display: grid;
  gap: 6px;
}

.llm-field-note,
.llm-config-field small {
  margin: 0;
  color: var(--admin-muted);
  font-size: 0.68rem;
  line-height: 1.2;
}

.llm-config-field small {
  padding-left: 2px;
}

.llm-config-current-key {
  margin: 0;
  display: grid;
  gap: 2px;
  color: var(--admin-muted);
  font-size: 0.72rem;
  font-weight: 820;
  padding: 0 4px 3px;
}

.llm-config-current-key strong {
  display: block;
  color: var(--admin-ink);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.llm-config-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
}

.llm-config-grid label {
  display: grid;
  gap: 5px;
  color: var(--admin-muted);
  font-size: 0.74rem;
  font-weight: 820;
}

.llm-config-grid label > span {
  line-height: 1;
}

.llm-model-select-field {
  margin-top: 0;
  padding-top: 0;
}

.llm-config-grid select,
.llm-config-grid input {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(31, 38, 48, 0.14);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
  padding: 8px 10px;
  font-size: 0.9rem;
}

.llm-config-current-key {
  margin: 0;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
}

.llm-config-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.llm-config-current-key span {
  display: block;
}

.llm-config-current-key strong {
  display: block;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.llm-config-current-key {
  margin: 0;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
}

.llm-config-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
}

.llm-config-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
}

.llm-config-grid label > span {
  line-height: 1;
}

.llm-config-grid select,
.llm-config-grid input {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(31, 38, 48, 0.14);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
  padding: 8px 10px;
}

.llm-config-grid select:focus,
.llm-config-grid input:focus {
  border-color: rgba(216, 90, 53, 0.48);
  box-shadow: 0 0 0 3px rgba(241, 100, 63, 0.12);
  outline: 0;
}

.llm-config-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 860px) {
  .llm-panel-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .llm-config-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .llm-config-actions {
    justify-content: stretch;
  }

  .llm-config-actions button {
    width: 100%;
  }

  .llm-config-stats {
    grid-template-columns: minmax(0, 1fr);
  }
}

.llm-overview {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 10px;
}

.llm-metric-tile {
  display: grid;
  min-height: 80px;
  padding: 12px 12px 11px 14px;
  gap: 3px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 255, 0.94));
}

.llm-metric-tile::after {
  background: linear-gradient(180deg, var(--admin-blue), var(--admin-green));
}

.llm-metric-tile--warn::before,
.llm-metric-tile--warn::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
}

.llm-metric-tile--warn::before {
  border: 1px solid rgba(220, 38, 38, 0.16);
}

.llm-metric-tile--muted::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px dashed rgba(100, 116, 139, 0.2);
  pointer-events: none;
}

.llm-metric-label {
  margin: 0;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.llm-metric-value {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1;
}

.llm-metric-detail {
  margin: 0;
  color: var(--admin-muted);
  font-size: 0.68rem;
}

.llm-section {
  gap: 12px;
  padding: 13px;
  position: relative;
  overflow: hidden;
}

.llm-pricing-note {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 10px;
  padding: 11px 13px;
}

.llm-pricing-item {
  gap: 4px;
}

.llm-section {
  gap: 12px;
  padding: 13px;
}

.llm-section + .llm-section {
  margin-top: 2px;
}

.llm-section-heading {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.llm-toolbar-head .llm-kicker,
.llm-toolbar-head p {
  margin: 0;
}

.llm-toolbar-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.llm-model-row {
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.llm-model-row:hover {
  background: #f5f9ff;
  transform: translateX(2px);
}

.llm-model-row td small {
  display: block;
  margin-top: 2px;
  color: var(--admin-muted);
  font-size: 0.66rem;
  line-height: 1.1;
}

.llm-model-row--warn {
  --meter-color: linear-gradient(90deg, #ef4444, #f59e0b);
}

.llm-model-row--cool {
  --meter-color: linear-gradient(90deg, #06b6d4, #3b82f6);
}

.llm-model-row--muted {
  --meter-color: linear-gradient(90deg, #94a3b8, #cbd5f5);
}

.llm-model-meter {
  margin-top: 7px;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.28);
}

.llm-model-meter span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--meter-color, linear-gradient(90deg, #64748b, #64748b));
  transition: width 0.5s ease;
}

.llm-activity-list,
.ledger-list {
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  background:
    linear-gradient(#fff, #fff) top / 100% 16px local,
    linear-gradient(#fff, #fff) bottom / 100% 16px local,
    linear-gradient(rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0)) top / 100% 16px scroll,
    linear-gradient(rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.1)) bottom / 100% 16px scroll;
  background-repeat: no-repeat;
}

.llm-activity-card {
  background: #fff;
}

.llm-more-button:hover {
  background: #eef6ff;
  color: var(--admin-blue-deep);
}

.ledger-source-evaluation {
  border-color: rgba(29, 111, 214, 0.16);
  background: #eef6ff;
  color: var(--admin-blue-deep);
}

.ledger-source-counterargument {
  border-color: rgba(216, 90, 53, 0.18);
  background: #fff5ed;
  color: #b84427;
}

.ledger-source-strengthen {
  border-color: rgba(20, 130, 113, 0.18);
  background: #e7f5ef;
  color: var(--admin-green-deep);
}

.ledger-source-admin,
.ledger-source-request,
.ledger-source-grant {
  border-color: rgba(165, 118, 29, 0.2);
  background: #fff8e5;
  color: var(--admin-amber);
}

@container (max-width: 760px) {
  .panel-heading,
  .request-card-head,
  .audit-event-head,
  .policy-card-head,
  .llm-section-heading {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .request-credit-badge {
    justify-items: start;
  }

  .user-search {
    grid-template-columns: 1fr;
  }

  .user-search input,
  .user-search button {
    width: 100%;
  }
}

@container (max-width: 520px) {
  .admin-action-row,
  .request-actions,
  .policy-actions,
  .user-row-top,
  .user-row-foot,
  .user-detail-title-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-action-row label,
  .admin-action-row input,
  .admin-action-row select,
  .admin-action-row textarea,
  .admin-action-row button,
  .request-actions button,
  .policy-actions button {
    width: 100%;
  }
}

@supports (content-visibility: auto) {
  .admin-card,
  .audit-event-body,
  .llm-section,
  .policy-rule-card,
  .user-action-panel,
  .user-history-section,
  .admin-analytics-panel {
    content-visibility: auto;
    contain-intrinsic-size: 1px 260px;
  }
}

@supports not (content-visibility: auto) {
  .admin-card,
  .audit-event-body,
  .llm-section,
  .policy-rule-card,
  .user-action-panel,
  .user-history-section,
  .admin-analytics-panel {
    contain: layout paint style;
  }
}

@media (max-width: 1100px) {
  .admin-analytics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .admin-analytics-panel {
    grid-column: span 3;
  }

  .admin-analytics-panel-wide {
    grid-column: span 6;
  }

  .user-layout,
  .policy-layout,
  .evaluation-spec-layout {
    grid-template-columns: 1fr;
  }

  .policy-rule-form,
  .evaluation-spec-list-shell,
  .evaluation-spec-test-shell,
  .user-detail {
    position: static;
    max-height: none;
  }
}

@media (max-width: 760px) {
  html,
  body {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(245, 248, 251, 0.96)),
      var(--admin-bg);
  }

  .admin-header {
    min-height: 68px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 9px;
  }

  .admin-main {
    gap: 12px;
    padding: 14px 14px 24px;
  }

  .admin-tabs-shell {
    top: 68px;
    margin-inline: -14px;
    padding-inline: 14px;
  }

  .admin-analytics {
    grid-template-columns: 1fr;
  }

  .admin-analytics-panel,
  .admin-analytics-panel-wide {
    grid-column: auto;
  }

  .admin-analytics-stats,
  .llm-pricing-note {
    grid-template-columns: 1fr;
  }

  .admin-summary-cards {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  .admin-daily-chart {
    grid-template-columns: repeat(7, minmax(18px, 1fr));
  }
}

@media (max-width: 620px) {
  .admin-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .admin-header-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }

  .admin-status {
    max-width: 100%;
    text-align: left;
  }

  .admin-tabs-shell {
    top: 116px;
  }

  .admin-tabs {
    min-width: max-content;
  }

  .admin-tabs button {
    min-width: 82px;
    padding-inline: 10px;
  }

  .admin-panel {
    padding: 14px;
  }

  .admin-summary-card {
    min-height: 82px;
  }

  .admin-summary-card strong {
    font-size: 1.46rem;
  }

  .admin-table {
    min-width: 620px;
  }

  .llm-activity-card,
  .ledger-item,
  .mini-request-item {
    grid-template-columns: 1fr;
  }

  .llm-activity-card strong,
  .user-row-identity strong,
  .user-detail-head h3,
  .ledger-copy span,
  .request-card h4 {
    white-space: normal;
  }

  .llm-activity-card dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .admin-main {
    padding-inline: 10px;
  }

  .admin-tabs-shell {
    margin-inline: -10px;
    padding-inline: 10px;
  }

  .admin-summary-cards {
    grid-template-columns: 1fr;
  }

  .admin-header-tools {
    grid-template-columns: 1fr;
  }

  .admin-header-actions {
    justify-self: start;
  }

  .llm-activity-card dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .admin-header {
    position: static;
    align-items: flex-start;
    gap: 8px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 9px;
  }

  .admin-brand {
    gap: 9px;
  }

  .admin-brand img {
    width: 36px;
    height: 33px;
  }

  .admin-brand span {
    font-size: 0.62rem;
  }

  .admin-brand h1 {
    font-size: 0.98rem;
  }

  .admin-header-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    gap: 8px;
  }

  .admin-status {
    max-width: none;
    min-height: 32px;
    padding: 6px 8px;
    font-size: 0.7rem;
    text-align: left;
  }

  .admin-header-actions {
    justify-self: end;
    min-width: max-content;
    gap: 4px;
    padding: 3px;
  }

  .admin-header-actions a,
  .admin-header-actions button {
    min-height: 34px;
    padding: 7px 8px;
    font-size: 0.8rem;
  }

  .admin-tabs-shell {
    top: 0;
  }

  .admin-panel {
    max-block-size: calc(100dvh - 64px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }

  .admin-summary {
    margin-inline: -14px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-inline: 14px;
    scrollbar-width: none;
  }

  .admin-summary::-webkit-scrollbar {
    display: none;
  }

  .admin-summary-cards {
    display: flex;
    flex-wrap: nowrap;
    grid-template-columns: none;
    min-width: max-content;
    gap: 6px;
  }

  .admin-summary-card {
    flex: 0 0 112px;
    min-height: 48px;
    gap: 4px;
    justify-content: center;
    padding: 8px 9px 7px 11px;
  }

  .admin-summary-card span {
    display: none;
  }

  .admin-summary-card strong {
    font-size: 1.04rem;
  }

  .admin-summary-card em {
    max-width: 100%;
    font-size: 0.66rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .panel-heading {
    align-items: start;
  }

  .panel-heading select {
    width: 100%;
  }

  .request-card-head,
  .audit-event-head,
  .policy-card-head,
  .llm-section-heading {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .request-credit-badge {
    width: 100%;
    min-width: 0;
    justify-items: start;
  }

  .user-row-identity strong,
  .user-row-identity em,
  .user-detail-head h3,
  .user-detail-head p,
  .ledger-copy span {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .admin-action-row {
    align-items: stretch;
  }
}

@media (max-width: 420px) {
  .admin-summary {
    margin-inline: -10px;
    padding-inline: 10px;
  }

  .admin-tabs-shell {
    margin-inline: -10px;
    padding-inline: 10px;
  }

  .admin-header-tools {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (forced-colors: active) {
  .admin-header,
  .admin-header-actions,
  .admin-tabs,
  .admin-panel,
  .admin-summary-card,
  .admin-analytics-panel,
  .admin-card,
  .user-detail,
  .user-list-button,
  .policy-rule-form,
  .policy-rule-list-shell,
  .admin-table-wrap,
  .llm-activity-card,
  .loading-state,
  .empty-state,
  .request-decision-panel,
  .user-action-panel,
  .audit-event-body {
    border-color: CanvasText;
    background: Canvas;
    box-shadow: none;
    color: CanvasText;
  }

  .admin-tabs button[aria-selected="true"] {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }

  .user-search button,
  .admin-action-row button,
  .policy-rule-form button,
  .admin-card button {
    border: 1px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
  }
}
/* === End 2026 admin polish pass === */

/* === User editor sheet === */
html,
body {
  overscroll-behavior-x: none;
  overscroll-behavior-y: auto;
}

#usersPanel {
  max-block-size: none;
  overflow: visible;
  overscroll-behavior: auto;
  scroll-padding-block: 16px;
}

.user-layout {
  grid-template-columns: minmax(0, 1fr);
  min-block-size: 0;
}

.user-list {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  align-items: start;
}

.user-editor-dialog {
  position: fixed;
  inset-block: 16px;
  inset-inline: auto 16px;
  width: min(760px, calc(100dvw - 32px));
  max-width: none;
  height: calc(100dvh - 32px);
  max-height: none;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--admin-line-strong);
  border-radius: var(--admin-radius);
  background: transparent;
  color: var(--admin-ink);
  box-shadow: var(--admin-shadow-lift);
  opacity: 0;
  transform: translateX(18px) scale(0.985);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.user-editor-dialog[open] {
  opacity: 1;
  transform: translateX(0) scale(1);
}

@supports (transition-behavior: allow-discrete) {
  .user-editor-dialog {
    transition:
      opacity 180ms ease,
      transform 180ms ease,
      overlay 180ms ease allow-discrete,
      display 180ms ease allow-discrete;
  }
}

@starting-style {
  .user-editor-dialog[open] {
    opacity: 0;
    transform: translateX(18px) scale(0.985);
  }
}

.user-editor-dialog::backdrop {
  background: rgba(15, 23, 42, 0.38);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .user-editor-dialog::backdrop {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}

.user-editor-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  block-size: 100%;
  overflow: hidden;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98)),
    var(--admin-surface);
}

.user-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.94);
  padding: 14px 16px;
}

.user-editor-toolbar div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.user-editor-toolbar span {
  color: var(--admin-muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.user-editor-toolbar h2 {
  margin: 0;
  overflow: hidden;
  color: var(--admin-ink);
  font-size: 1.06rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-editor-close {
  position: relative;
  flex: 0 0 auto;
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius);
  background: #fff;
  color: var(--admin-ink-soft);
  box-shadow: none;
}

.user-editor-close:hover {
  border-color: rgba(29, 111, 214, 0.3);
  background: #eef6ff;
  color: var(--admin-blue-deep);
}

.user-editor-close span,
.user-editor-close span::before,
.user-editor-close span::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.user-editor-close span {
  background: transparent;
}

.user-editor-close span::before,
.user-editor-close span::after {
  content: "";
  position: absolute;
  inset-block-start: 18px;
  inset-inline-start: 10px;
}

.user-editor-close span::before {
  transform: rotate(45deg);
}

.user-editor-close span::after {
  transform: rotate(-45deg);
}

.user-editor-dialog .user-detail {
  position: static;
  display: grid;
  align-content: start;
  gap: 12px;
  min-block-size: 0;
  max-block-size: none;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 16px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.user-editor-dialog .ledger-list {
  max-height: none;
  overflow: visible;
  padding-right: 0;
  background: none;
}

.user-editor-dialog .user-detail-head {
  position: sticky;
  top: -16px;
  z-index: 1;
  margin: -16px -16px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.09);
  background: rgba(255, 255, 255, 0.96);
  padding: 16px;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .user-editor-dialog .user-detail-head {
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
}

@media (max-width: 760px) {
  #usersPanel {
    max-block-size: none;
  }

  .user-list {
    grid-template-columns: 1fr;
  }

  .user-editor-dialog {
    inset: 0;
    width: 100dvw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .user-editor-toolbar {
    padding:
      calc(12px + env(safe-area-inset-top, 0px))
      max(12px, env(safe-area-inset-right))
      12px
      max(12px, env(safe-area-inset-left));
  }

  .user-editor-dialog .user-detail {
    padding:
      14px
      max(12px, env(safe-area-inset-right))
      calc(18px + env(safe-area-inset-bottom, 0px))
      max(12px, env(safe-area-inset-left));
  }
}

@media (forced-colors: active) {
  .user-editor-dialog,
  .user-editor-shell,
  .user-editor-toolbar,
  .user-editor-close {
    border-color: CanvasText;
    background: Canvas;
    box-shadow: none;
    color: CanvasText;
  }
}

.admin-tabs-shell {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.admin-tabs-shell + .admin-panel {
  margin-top: 0 !important;
}

.admin-tabs-shell + section[role="tabpanel"] {
  margin-top: 0 !important;
}

.admin-tabs-shell + section[role="tabpanel"] > :first-child,
.admin-tabs-shell + .admin-panel > :first-child {
  margin-top: 0 !important;
}

.admin-panel .panel-heading h2,
.admin-panel .panel-heading h3,
.admin-panel .panel-heading h4,
.admin-panel > h2,
.admin-panel > h3,
.admin-panel > h4 {
  margin-top: 0 !important;
}

.admin-main {
  padding-top: 0;
  gap: 0;
}

.evaluation-spec-commandbar {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.evaluation-spec-viewlike-btn {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.evaluation-spec-layout {
  align-items: start !important;
}

.evaluation-spec-layout > .evaluation-spec-form {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.evaluation-spec-form {
  align-self: start !important;
}

.evaluation-spec-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start !important;
  gap: 10px;
}

.evaluation-spec-commandbar {
  width: max-content;
  margin: 0 !important;
  align-self: start !important;
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  backdrop-filter: none !important;
}

.evaluation-spec-layout {
  padding-top: 0 !important;
}

.evaluation-spec-panel {
  overflow: visible;
}

.evaluation-spec-layout {
  --evaluation-spec-rail-top: 0px;
  --evaluation-spec-rail-viewport-top: 0px;
  grid-template-columns: minmax(286px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
}

.evaluation-spec-editor-rail {
  display: grid;
  gap: 14px;
  min-width: 0;
  align-self: start;
  background: transparent;
}

.evaluation-spec-editor-rail > .evaluation-spec-form,
.evaluation-spec-editor-rail > .evaluation-spec-test-shell {
  margin-top: 0 !important;
}

.evaluation-spec-editor-rail > .evaluation-spec-test-shell {
  grid-column: auto !important;
}

.evaluation-spec-list-shell {
  --evaluation-spec-rail-top: 0px;
  top: var(--evaluation-spec-rail-top) !important;
  margin-top: 0 !important;
}

@media (min-width: 1101px) {
  .evaluation-spec-list-shell,
  .evaluation-spec-editor-rail {
    position: sticky;
    top: var(--evaluation-spec-rail-top) !important;
    max-height: calc(100dvh - var(--evaluation-spec-rail-viewport-top, 0px) - 12px - env(safe-area-inset-bottom, 0px)) !important;
    max-block-size: calc(100dvb - var(--evaluation-spec-rail-viewport-top, 0px) - 12px - env(safe-area-inset-bottom, 0px)) !important;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    scrollbar-color: rgba(0, 95, 149, 0.42) transparent;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scroll-padding-block: 12px;
  }

  .evaluation-spec-list-shell {
    max-height: calc(100dvh - var(--evaluation-spec-rail-viewport-top, 0px) - 12px - env(safe-area-inset-bottom, 0px)) !important;
    max-block-size: calc(100dvb - var(--evaluation-spec-rail-viewport-top, 0px) - 12px - env(safe-area-inset-bottom, 0px)) !important;
    border-color: rgba(0, 95, 149, 0.14);
    padding: 12px 10px 12px 12px !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      inset -1px 0 0 rgba(0, 95, 149, 0.06),
      0 16px 34px rgba(15, 23, 42, 0.08);
  }

  .evaluation-spec-editor-rail {
    padding: 0 8px 12px 0;
  }

  .evaluation-spec-rail-scroll::-webkit-scrollbar {
    width: 10px;
  }

  .evaluation-spec-rail-scroll::-webkit-scrollbar-track {
    background: transparent;
  }

  .evaluation-spec-rail-scroll::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background: rgba(0, 95, 149, 0.38);
    background-clip: padding-box;
  }

  .evaluation-spec-rail-scroll:hover::-webkit-scrollbar-thumb,
  .evaluation-spec-rail-scroll:focus-visible::-webkit-scrollbar-thumb {
    background: rgba(0, 95, 149, 0.58);
    background-clip: padding-box;
  }

  .evaluation-spec-list-shell:hover,
  .evaluation-spec-list-shell:focus-visible {
    border-color: rgba(0, 95, 149, 0.26);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.94),
      inset -1px 0 0 rgba(0, 95, 149, 0.08),
      0 18px 38px rgba(15, 23, 42, 0.1);
  }

  .evaluation-spec-editor-rail:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
  }
}

.evaluation-spec-list-shell,
.evaluation-spec-form {
  padding-top: 12px !important;
}

@media (max-width: 1100px) {
  .evaluation-spec-layout {
    grid-template-columns: 1fr;
  }

  .evaluation-spec-editor-rail,
  .evaluation-spec-list-shell {
    position: static !important;
    max-height: none !important;
    max-block-size: none !important;
    overflow: visible;
    scrollbar-gutter: auto;
  }

  .evaluation-spec-editor-rail {
    padding: 0;
  }
}

.admin-rate-card-process-tip {
  position: relative;
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  border-radius: 4px;
  cursor: help;
}

.admin-rate-card-process-tip::after {
  content: attr(data-tooltip);
  position: absolute;
  inset-block-end: calc(100% + 9px);
  inset-inline-start: 0;
  z-index: 20;
  width: min(300px, calc(100vw - 48px));
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.35;
  opacity: 0;
  padding: 9px 10px;
  pointer-events: none;
  text-transform: none;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
  visibility: hidden;
  white-space: normal;
}

.admin-rate-card-process-tip:hover::after,
.admin-rate-card-process-tip:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}
/* === End user editor sheet === */

/* === SaaS users tab polish === */
#usersPanel.users-panel {
  display: grid;
  gap: 14px;
}

.users-panel-heading {
  align-items: center;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 252, 0.98)),
    #fff;
  padding: 14px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.users-panel-heading h2 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.1;
}

.users-panel-heading p {
  max-width: 620px;
  color: #536071;
  font-size: 0.82rem;
}

.users-panel .user-search {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto;
  gap: 8px;
}

.users-panel .user-search input,
.users-panel .user-search button,
.user-create-form input,
.user-create-form select,
.user-create-form button {
  min-height: 44px;
  border-radius: 8px;
}

.users-panel .user-search input,
.user-create-form input,
.user-create-form select {
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  color: var(--ink);
  padding: 9px 11px;
}

.users-panel .user-search input {
  width: 100%;
}

.users-panel .user-search button,
.user-create-form button {
  border: 1px solid rgba(216, 90, 53, 0.24);
  background: linear-gradient(145deg, #f1643f, var(--orange));
  color: #fff;
  font-weight: 900;
  padding: 9px 14px;
  box-shadow: 0 14px 24px rgba(211, 79, 44, 0.16);
}

.user-command-center {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.94)),
    #fff;
  padding: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.user-create-form fieldset {
  display: grid;
  grid-template-columns:
    minmax(210px, 1.25fr)
    minmax(180px, 0.9fr)
    minmax(142px, 0.55fr)
    minmax(176px, 0.8fr)
    minmax(176px, 0.8fr)
    auto;
  gap: 10px;
  align-items: end;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.user-create-form legend {
  align-self: center;
  grid-column: 1 / -1;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.user-create-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #536071;
  font-size: 0.74rem;
  font-weight: 900;
}

.user-create-form input,
.user-create-form select,
.user-create-form button {
  width: 100%;
}

.user-create-form input:focus,
.user-create-form select:focus,
.users-panel .user-search input:focus {
  border-color: rgba(29, 111, 214, 0.5);
  box-shadow: 0 0 0 3px rgba(29, 111, 214, 0.13);
  outline: 0;
}

.user-command-center .admin-form-status {
  width: max-content;
  max-width: 100%;
}

.user-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.user-grid-shell {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 382px), 1fr));
  gap: 12px;
  align-items: start;
}

.user-list-button {
  isolation: isolate;
  overflow: hidden;
  min-height: 214px;
  border-color: rgba(15, 23, 42, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98)),
    #fff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.052);
}

.user-list-button::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(29, 111, 214, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent);
  opacity: 0;
  transition: opacity 160ms ease;
}

.user-list-button:hover,
.user-list-button:focus-visible {
  border-color: rgba(29, 111, 214, 0.24);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.user-list-button:hover::after,
.user-list-button:focus-visible::after,
.user-list-button[aria-current="true"]::after {
  opacity: 1;
}

.user-list-button[aria-current="true"] {
  border-color: rgba(29, 111, 214, 0.48);
  box-shadow:
    0 0 0 3px rgba(29, 111, 214, 0.12),
    0 18px 36px rgba(15, 23, 42, 0.1);
}

.user-list-button[aria-current="true"]::before {
  background: linear-gradient(180deg, #1d6fd6, var(--orange));
}

.user-row-top {
  padding-inline-end: 22px;
}

.user-row-identity strong {
  color: #111827;
  font-size: 0.98rem;
}

.user-row-identity em {
  max-width: 100%;
  font-size: 0.75rem;
}

.user-row-pills {
  flex: 0 0 auto;
}

.user-row-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.user-row-metrics span,
.llm-user-metrics div,
.detail-grid div {
  border-color: rgba(15, 23, 42, 0.08);
  background: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.user-row-metrics strong {
  overflow: hidden;
  color: #111827;
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row-metrics em {
  overflow: hidden;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row-foot {
  border-top: 1px solid rgba(15, 23, 42, 0.07);
  padding-top: 8px;
}

.user-card-open {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 12px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #536071;
  font-size: 0.78rem;
  font-weight: 950;
}

.user-list-button.is-disabled {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(251, 244, 242, 0.92)),
    #fff;
}

.user-editor-dialog {
  width: min(900px, calc(100dvw - 32px));
}

.user-editor-shell {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 249, 252, 0.99)),
    #fff;
}

.user-editor-toolbar {
  min-height: 66px;
  background: rgba(255, 255, 255, 0.96);
}

.user-editor-toolbar h2 {
  font-size: 1.12rem;
}

.user-editor-dialog .user-detail {
  gap: 14px;
  padding: 18px;
}

.user-editor-dialog .user-detail-head {
  margin: -18px -18px 0;
  padding: 18px;
}

.user-editor-dialog .detail-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.user-editor-dialog .detail-grid div {
  min-height: 82px;
  padding: 10px;
}

.user-editor-dialog .detail-grid strong {
  overflow: hidden;
  font-size: 1.15rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-editor-dialog .user-action-panel {
  grid-template-columns: minmax(160px, 0.38fr) minmax(0, 1fr);
  align-items: center;
  border-color: rgba(15, 23, 42, 0.09);
  background:
    linear-gradient(180deg, #fff, #f8fafc),
    #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.user-editor-dialog .user-action-copy h4,
.user-editor-dialog .user-history-heading h4 {
  color: #111827;
  font-size: 0.96rem;
}

.user-editor-dialog .admin-action-row {
  justify-content: flex-end;
}

.user-editor-dialog .admin-action-row label {
  flex: 1 1 150px;
}

.user-editor-dialog .admin-action-row textarea,
.user-editor-dialog .admin-action-row input,
.user-editor-dialog .admin-action-row select {
  width: 100%;
}

.user-editor-dialog .llm-user-section,
.user-editor-dialog .user-history-section {
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.035);
}

@media (max-width: 1180px) {
  .user-create-form fieldset {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .user-create-form legend,
  .user-create-form button {
    grid-column: 1 / -1;
  }

  .user-editor-dialog .detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .users-panel-heading,
  .users-panel .user-search,
  .user-create-form fieldset {
    grid-template-columns: 1fr;
  }

  .user-create-form legend,
  .user-create-form button {
    grid-column: auto;
  }

  .users-panel .user-search button,
  .user-create-form button {
    width: 100%;
  }

  .user-list-button {
    min-height: 0;
  }

  .user-row-metrics,
  .llm-user-metrics,
  .user-editor-dialog .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-editor-dialog .user-action-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .user-row-metrics,
  .llm-user-metrics,
  .user-editor-dialog .detail-grid {
    grid-template-columns: 1fr;
  }
}

/* === Compact users tab and create dialog === */
.users-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.user-create-open {
  min-height: 44px;
  border: 1px solid rgba(216, 90, 53, 0.24);
  border-radius: 8px;
  background: linear-gradient(145deg, #f1643f, var(--orange));
  color: #fff;
  font-weight: 900;
  padding: 9px 14px;
  box-shadow: 0 14px 24px rgba(211, 79, 44, 0.16);
}

.user-create-open:hover {
  filter: brightness(1.03) saturate(1.04);
  transform: translateY(-1px);
}

.create-user-dialog {
  width: min(560px, calc(100dvw - 32px));
  max-width: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.2);
}

.delete-user-dialog {
  width: min(520px, calc(100dvw - 32px));
  max-width: none;
  border: 1px solid rgba(184, 68, 39, 0.18);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.22);
}

.create-user-dialog::backdrop,
.delete-user-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .create-user-dialog::backdrop,
  .delete-user-dialog::backdrop {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}

.create-user-dialog-form,
.delete-user-form {
  display: grid;
  gap: 0;
}

.create-user-dialog-head,
.delete-user-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  padding: 14px 16px;
}

.delete-user-dialog-head {
  background: #fff7f4;
}

.create-user-dialog-head div,
.delete-user-dialog-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.create-user-dialog-head span,
.delete-user-dialog-head span {
  color: #697586;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.create-user-dialog-head h2,
.delete-user-dialog-head h2 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.15;
}

.delete-user-dialog-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.delete-user-dialog-body p {
  margin: 0;
  color: #536071;
  font-size: 0.86rem;
  line-height: 1.45;
}

.delete-user-dialog-body strong {
  color: var(--red);
}

.delete-user-dialog-body label {
  display: grid;
  gap: 5px;
  color: #536071;
  font-size: 0.74rem;
  font-weight: 900;
}

.delete-user-dialog-body input {
  min-height: 44px;
  width: 100%;
  border: 1px solid rgba(184, 68, 39, 0.22);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 11px;
}

.delete-user-dialog-body input:focus {
  border-color: rgba(184, 68, 39, 0.5);
  box-shadow: 0 0 0 3px rgba(184, 68, 39, 0.12);
  outline: 0;
}

.create-user-dialog .user-create-form fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.create-user-dialog .user-create-form label:first-child {
  grid-column: 1 / -1;
}

.create-user-dialog .user-editor-close {
  flex: 0 0 auto;
  width: 38px;
  min-height: 38px;
  height: 38px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #fff;
  color: #536071;
  padding: 0;
  box-shadow: none;
}

.delete-user-dialog .user-editor-close {
  flex: 0 0 auto;
  width: 38px;
  min-height: 38px;
  height: 38px;
  border: 1px solid rgba(184, 68, 39, 0.16);
  border-radius: 8px;
  background: #fff;
  color: var(--red);
  padding: 0;
  box-shadow: none;
}

.create-user-dialog .user-editor-close:hover {
  border-color: rgba(29, 111, 214, 0.3);
  background: #eef6ff;
  color: var(--blue-strong);
  filter: none;
  transform: none;
}

.delete-user-dialog .user-editor-close:hover {
  border-color: rgba(184, 68, 39, 0.34);
  background: #fff0ec;
  color: var(--red);
  filter: none;
  transform: none;
}

.create-user-dialog .user-editor-close span,
.create-user-dialog .user-editor-close span::before,
.create-user-dialog .user-editor-close span::after,
.delete-user-dialog .user-editor-close span,
.delete-user-dialog .user-editor-close span::before,
.delete-user-dialog .user-editor-close span::after {
  width: 16px;
  height: 2px;
}

.create-user-dialog-actions,
.delete-user-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  padding: 12px 16px;
}

.create-user-dialog-actions .admin-form-status,
.delete-user-dialog .admin-form-status {
  margin-inline-end: auto;
}

.create-user-dialog-actions button,
.delete-user-dialog-actions button {
  width: auto;
  min-width: 118px;
  min-height: 42px;
  border: 1px solid rgba(216, 90, 53, 0.24);
  border-radius: 8px;
  background: linear-gradient(145deg, #f1643f, var(--orange));
  color: #fff;
  font-weight: 900;
  padding: 8px 12px;
  box-shadow: 0 10px 20px rgba(211, 79, 44, 0.14);
}

.create-user-dialog-actions button.secondary-action,
.delete-user-dialog-actions button.secondary-action {
  border-color: rgba(15, 23, 42, 0.14);
  background: #fff;
  color: #344054;
  box-shadow: none;
}

.delete-user-dialog-actions button.danger-action,
.user-delete-panel .admin-action-row button.danger-action {
  border-color: rgba(184, 68, 39, 0.28);
  background: #fff0ec;
  color: var(--red);
  box-shadow: none;
}

.delete-user-dialog-actions button.danger-action:hover,
.user-delete-panel .admin-action-row button.danger-action:hover {
  border-color: rgba(184, 68, 39, 0.4);
  background: #ffe7df;
}

.user-delete-panel {
  border-color: rgba(184, 68, 39, 0.16) !important;
  background: #fffaf8 !important;
}

.users-list-summary {
  color: #697586;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.user-grid-shell {
  grid-template-columns: 1fr;
  gap: 6px;
}

.user-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: stretch;
}

.user-list-button {
  grid-template-columns: minmax(220px, 1fr) auto minmax(74px, auto) minmax(84px, auto) minmax(156px, auto) 24px;
  align-items: center;
  gap: 10px;
  min-height: 0;
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: none;
}

.user-list-button::after {
  display: none;
}

.user-list-button:hover,
.user-list-button:focus-visible {
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.user-list-button[aria-current="true"] {
  box-shadow: 0 0 0 3px rgba(29, 111, 214, 0.1);
}

.user-list-button[aria-current="true"]::before {
  inset: 6px auto 6px 0;
}

.user-row-identity {
  gap: 1px;
}

.user-row-identity strong {
  font-size: 0.9rem;
}

.user-row-identity em {
  font-size: 0.7rem;
}

.user-row-pills {
  justify-content: flex-end;
  min-width: 0;
}

.user-row-compact-stat,
.user-row-last-seen {
  display: grid;
  gap: 1px;
  min-width: 0;
  text-align: right;
}

.user-row-compact-stat strong,
.user-row-last-seen strong {
  overflow: hidden;
  color: #111827;
  font-size: 0.82rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row-compact-stat em,
.user-row-last-seen em {
  overflow: hidden;
  color: #7b8794;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.user-card-open {
  position: static;
  width: 22px;
  height: 22px;
}

.user-row-logout {
  min-width: 78px;
  min-height: 0;
  border: 1px solid rgba(184, 68, 39, 0.18);
  border-radius: 8px;
  background: #fff;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 900;
  padding: 8px 10px;
  box-shadow: none;
}

.user-row-logout:hover,
.user-row-logout:focus-visible {
  border-color: rgba(184, 68, 39, 0.34);
  background: #fff0ec;
  transform: translateY(-1px);
}

.user-row-logout:disabled {
  border-color: rgba(15, 23, 42, 0.08);
  background: #f8fafc;
  color: #98a2b3;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 920px) {
  .user-list-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .user-list-button {
    grid-template-columns: minmax(0, 1fr) auto 22px;
  }

  .user-row-compact-stat,
  .user-row-last-seen {
    display: none;
  }
}

@media (max-width: 640px) {
  .users-toolbar,
  .users-panel .user-search {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .user-create-open {
    width: 100%;
  }

  .user-list-row {
    grid-template-columns: 1fr;
  }

  .user-row-logout {
    min-height: 40px;
    width: 100%;
  }

  .create-user-dialog,
  .delete-user-dialog {
    width: 100dvw;
    max-height: 100dvh;
    border-radius: 0;
  }

  .create-user-dialog .user-create-form fieldset {
    grid-template-columns: 1fr;
  }

  .create-user-dialog .user-create-form label:first-child,
  .create-user-dialog .user-create-form label:nth-child(5) {
    grid-column: auto;
  }

  .create-user-dialog-actions button,
  .delete-user-dialog-actions button {
    width: 100%;
  }
}
