:root {
  --bg: #f4f7fb;
  --bg-2: #e9f0f7;
  --ink: #15212e;
  --muted: #5d6977;
  --accent: #104f8a;
  --accent-2: #2374b8;
  --accent-3: #0c7a73;
  --panel: #ffffff;
  --panel-strong: #f3f8fe;
  --stroke: #d8e2ee;
  --shadow: 0 18px 40px rgba(18, 35, 52, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(35, 116, 184, 0.12), transparent 32%),
    radial-gradient(circle at 90% 10%, rgba(16, 122, 115, 0.12), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.skip-link,
.sr-only {
  position: absolute;
}

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

.skip-link {
  left: 16px;
  top: 16px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  transform: translateY(-140%);
  transition: transform 0.2s ease;
}

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

#app {
  display: none;
}

#users-view {
  display: none;
}

#analysis-view {
  display: none;
}

#help-view {
  display: none;
}

.bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
}

.grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(16, 79, 138, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 79, 138, 0.06) 1px, transparent 1px);
  background-size: 112px 112px;
  opacity: 0.45;
}

.orb {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.35;
}

.orb-a {
  top: -120px;
  left: -140px;
  background: radial-gradient(circle at 30% 30%, rgba(35, 116, 184, 0.55), rgba(35, 116, 184, 0.22) 52%, transparent 72%);
}

.orb-b {
  bottom: -160px;
  right: -120px;
  background: radial-gradient(circle at 30% 30%, rgba(12, 122, 115, 0.5), rgba(12, 122, 115, 0.2) 52%, transparent 72%);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(20px, 5vw, 64px);
  background: linear-gradient(180deg, rgba(11, 20, 30, 0.96) 0%, rgba(17, 31, 45, 0.94) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  color: #f5f8fb;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-logo {
  width: auto;
  height: 34px;
  object-fit: contain;
  background: transparent;
  padding: 0;
  box-shadow: none;
  flex: 0 0 auto;
}

.nav-brand-text {
  display: grid;
  gap: 2px;
}

.nav-title {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  letter-spacing: 0.04em;
  color: #f5f8fb;
}

.nav-sub {
  font-size: 12px;
  color: rgba(245, 248, 251, 0.7);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-link {
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(245, 248, 251, 0.72);
}

.nav-link-active {
  background: linear-gradient(135deg, #ffffff 0%, #dcecff 100%);
  color: #10263d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.nav-user {
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(245, 248, 251, 0.72);
}

.nav-user-name {
  color: #fff;
  font-weight: 600;
}

.nav-user-role {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  color: rgba(245, 248, 251, 0.72);
}

.nav-user.nav-user-auth {
  background: var(--panel-strong);
}

.nav-user.nav-user-auth .nav-user-name {
  color: var(--ink);
}

.nav-user.nav-user-auth .nav-user-role {
  color: var(--accent);
}

.nav-auth {
  border: none;
  background: linear-gradient(135deg, #ffffff 0%, #dcecff 100%);
  color: #10263d;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 12px 20px rgba(10, 18, 28, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-auth:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(10, 18, 28, 0.28);
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding: 32px clamp(24px, 6vw, 72px) 12px;
}

.top-text {
  max-width: 520px;
}

.top-actions {
  display: grid;
  gap: 16px;
  align-items: start;
}

.user-card {
  background: var(--panel);
  border-radius: 16px;
  border: 1px solid var(--stroke);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
}

.security-card {
  background: var(--panel);
  border-radius: 16px;
  border: 1px solid var(--stroke);
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.security-topline {
  display: grid;
  gap: 8px;
}

.security-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e4effa;
  color: #134a7d;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.security-state[data-enabled="true"] {
  background: #d9f0ea;
  color: #0f6a5e;
}

.security-meta {
  font-size: 12px;
  color: var(--muted);
}

.security-actions,
.security-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.security-setup,
.security-disable {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: #fff;
}

.security-message {
  font-size: 13px;
  color: var(--muted);
}

.security-label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.security-label input {
  border-radius: 12px;
  border: 1px solid var(--stroke);
  padding: 10px 12px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

.security-action {
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
}

.security-action-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--stroke);
}

.security-action-muted {
  background: linear-gradient(135deg, #0f6a5e, #0c7a73);
}

.security-cancel {
  border: 1px solid var(--stroke);
  background: #fff;
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
}

.security-status {
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
}

.user-role {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.user-logout {
  border: 1px solid var(--stroke);
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--muted);
}

h1 {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  margin: 8px 0 8px;
  font-size: clamp(32px, 4vw, 48px);
}

h2 {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  font-size: 20px;
}

p {
  max-width: 540px;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 160px));
  gap: 12px;
}

.stat {
  background: var(--panel);
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.stat-value {
  font-size: 22px;
  margin-top: 6px;
}

.upload-card {
  background: var(--panel);
  border-radius: 16px;
  border: 1px solid var(--stroke);
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.upload-title {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
}

.upload-sub {
  color: var(--muted);
  font-size: 12px;
}

#upload-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.upload-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.upload-input {
  width: 100%;
  border: 1px dashed var(--stroke);
  border-radius: 12px;
  padding: 9px 12px;
  background: #fff;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
}

.upload-input::file-selector-button {
  margin-right: 12px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--panel-strong);
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
}

.upload-input:hover,
.upload-input:focus-visible {
  border-color: var(--accent);
}

.upload-submit {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
}

.upload-submit[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.upload-queue-upload {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
}

.upload-queue-upload[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.upload-confirm {
  border: none;
  background: #1f3a56;
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
}

.upload-confirm[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.upload-copy {
  border: 1px solid var(--stroke);
  background: #fff;
  color: var(--ink);
  padding: 9px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
}

.upload-copy[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.upload-status {
  font-size: 12px;
  color: #4a5b72;
  min-height: 18px;
}

.upload-queue {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.upload-queue-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--panel-strong);
  border: 1px solid var(--stroke);
  font-size: 13px;
}

.upload-queue-item-name {
  font-weight: 600;
  word-break: break-word;
}

.upload-queue-item-state {
  white-space: nowrap;
  color: #4a5b72;
}

.upload-queue-item.pending .upload-queue-item-state {
  color: var(--accent);
}

.upload-queue-item.done {
  background: rgba(12, 122, 115, 0.08);
}

.upload-queue-item.done .upload-queue-item-state {
  color: var(--accent-3);
}

.upload-queue-item.failed {
  background: rgba(184, 35, 35, 0.08);
}

.upload-queue-item.failed .upload-queue-item-state {
  color: #b82323;
}

.upload-debug-output {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: #111;
  color: #d8eadf;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  max-height: 280px;
  overflow: auto;
}

.upload-progress {
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  appearance: none;
}

.upload-progress::-webkit-progress-bar {
  background: rgba(29, 26, 22, 0.08);
}

.upload-progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.upload-progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.upload-progress-text {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a5b72;
}

.upload-debug {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #4a5b72;
}

.upload-validation {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--stroke);
  margin-top: 2px;
}

.upload-validation-summary {
  font-size: 12px;
  color: #4a5b72;
}

.upload-validation-grid {
  display: grid;
  gap: 10px;
}

.upload-checklist {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: #fff8f1;
}

.upload-checklist-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #4a5b72;
}

.upload-checklist-items {
  display: grid;
  gap: 8px;
}

.upload-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.upload-check-item input {
  margin: 0;
  accent-color: var(--accent);
}

.upload-check-item-missing {
  color: #8a3f32;
}

.layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(420px, 1fr);
  gap: 24px;
  padding: 24px clamp(24px, 6vw, 72px) 64px;
}

.admin-layout {
  grid-template-columns: minmax(360px, 1fr);
}

.analysis-layout {
  grid-template-columns: minmax(360px, 1fr);
}

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 60vh;
  overflow: hidden;
}

.panel-header {
  padding: 20px 22px 10px;
  border-bottom: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.analysis-panel {
  grid-column: 1 / -1;
}

.analysis-body {
  display: grid;
  gap: 16px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(16, 79, 138, 0.03), transparent 38%),
    #fff;
}

.analysis-form {
  display: grid;
  gap: 12px;
}

.analysis-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f2238 0%, #123d64 54%, #0d6b7a 100%);
  color: #fff;
}

.analysis-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 8px;
}

.analysis-hero h3 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.analysis-hero-note {
  max-width: 320px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.analysis-control-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 16px 18px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--panel-strong);
}

.analysis-label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: #4a5b72;
}

.analysis-label select {
  width: 100%;
  min-width: 320px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.analysis-label select:focus-visible {
  outline: 2px solid rgba(16, 79, 138, 0.25);
  border-color: var(--accent);
}

.analysis-control-bar button {
  border: none;
  border-radius: 12px;
  padding: 14px 18px;
  cursor: pointer;
  font: inherit;
  min-height: 52px;
}

.analysis-control-bar button[type="submit"] {
  background: linear-gradient(135deg, #0f6ca8 0%, #0b8a7d 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(15, 108, 168, 0.22);
  align-self: end;
}

.analysis-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(16, 79, 138, 0.08);
  color: #35506d;
  font-size: 13px;
  min-height: 18px;
}

.analysis-meta {
  font-size: 13px;
  color: #4a5b72;
  white-space: pre-wrap;
  padding: 0 4px;
}

.analysis-results {
  overflow-x: auto;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.analysis-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.analysis-table th,
.analysis-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--stroke);
}

.analysis-table thead th {
  background: var(--panel-strong);
  position: sticky;
  top: 0;
  z-index: 1;
}

.analysis-empty {
  padding: 20px;
  color: #4a5b72;
}

@media (max-width: 720px) {
  .analysis-control-bar {
    grid-template-columns: 1fr;
  }

  .analysis-label select {
    min-width: 0;
  }

  .analysis-control-bar button {
    width: 100%;
  }
}

.panel.list .panel-header {
  flex-wrap: wrap;
  align-items: flex-start;
}

.panel.list .panel-header .search {
  flex: 1 1 100%;
  order: 3;
}

.search input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  padding: 10px 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}

.search input::placeholder {
  color: #4a5b72;
  opacity: 1;
}

.search input:focus-visible {
  outline: 2px solid rgba(16, 79, 138, 0.25);
  outline-offset: 2px;
  border-color: var(--accent);
}

.list-body {
  padding: 16px;
  display: grid;
  gap: 12px;
  overflow-y: auto;
}

.card {
  text-align: left;
  border-radius: 14px;
  border: 1px solid transparent;
  background: #fff;
  padding: 14px 16px;
  cursor: pointer;
  transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 20px rgba(20, 15, 10, 0.08);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 18px 30px rgba(20, 15, 10, 0.12);
}

.card.active {
  border-color: var(--accent);
  background: #eef5fb;
}

.card-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 6px;
}

.card-meta,
.card-sub {
  font-size: 13px;
  color: #4a5b72;
}

.detail-body {
  padding: 18px 22px 28px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.detail-heading {
  min-width: 0;
}

.detail-title {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 26px;
  margin-bottom: 6px;
}

.detail-meta {
  color: #4a5b72;
  font-size: 14px;
  margin-bottom: 0;
}

.detail-delete {
  border: 1px solid #0d5c53;
  background: linear-gradient(135deg, #0f6a5e, #0d7c74);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.detail-delete:hover {
  background: #7a2922;
}

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

.detail-block {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--stroke);
}

.detail-block h3 {
  margin-top: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
}

.detail-text {
  color: #1f3146;
  font-size: 14px;
}

.detail-text p {
  margin: 0 0 10px;
}

.detail-text ul {
  margin: 0 0 10px;
  padding-left: 18px;
}

.detail-text li {
  margin-bottom: 4px;
}

.analyst-feedback-block {
  margin-top: 10px;
}

.analyst-feedback-text {
  color: #173763;
  font-size: 15px;
  line-height: 1.45;
  margin-bottom: 12px;
}

.analyst-feedback-text p {
  margin: 0 0 8px;
}

.analyst-feedback-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--stroke);
  background: #fff;
  font-size: 13px;
}

.analyst-feedback-table th,
.analyst-feedback-table td {
  border: 1px solid var(--stroke);
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}

.analyst-feedback-table thead th {
  background: #d9e5f2;
  color: #173763;
  font-weight: 700;
}

.analyst-feedback-table td:nth-child(2) {
  width: 90px;
  text-align: center;
  font-weight: 700;
}

.analyst-feedback-bar {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: #e8eef5;
  overflow: hidden;
}

.analyst-feedback-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #104f8a, #2374b8);
  border-radius: inherit;
}

.wcag-breakdown-list {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.wcag-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border: 1px solid #111;
  background: #fff;
  color: #173763;
  box-shadow: 0 8px 22px rgba(15, 26, 39, 0.08);
}

.wcag-breakdown-table th,
.wcag-breakdown-table td {
  border: 1px solid #111;
  padding: 10px 14px;
  vertical-align: middle;
}

.wcag-breakdown-level-row th {
  background: #203a68;
  color: #fff;
  text-align: left;
  font-size: 1.7rem;
  line-height: 1;
  padding: 12px 14px 10px;
  font-weight: 700;
}

.wcag-breakdown-header-row th {
  background: #d9d9d9;
  color: #173763;
  font-size: 0.92rem;
  line-height: 1.2;
  font-weight: 700;
  text-align: left;
}

.wcag-breakdown-header-row th:nth-child(2) {
  width: 120px;
  text-align: center;
}

.wcag-breakdown-header-row th:nth-child(3) {
  width: 42%;
}

.wcag-breakdown-data-row td {
  font-size: 0.98rem;
  line-height: 1.25;
}

.wcag-breakdown-data-row td:first-child {
  width: 30%;
  font-size: 0.92rem;
}

.wcag-breakdown-data-row td:nth-child(2) {
  width: 100px;
  text-align: center;
  font-size: 0.98rem;
}

.wcag-breakdown-chart-cell {
  width: 50%;
  padding: 10px;
  background: #fff;
  vertical-align: middle;
  overflow: hidden;
}

.wcag-pie-panel {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.wcag-pie-chart {
  --passed: 29;
  --failed: 50;
  --na: 21;
  position: relative;
  width: 165px;
  max-width: 165px;
  min-width: 165px;
  height: 165px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background:
    conic-gradient(
      #14ad49 0 calc(var(--passed) * 1%),
      #ef120f calc(var(--passed) * 1%) calc((var(--passed) + var(--failed)) * 1%),
      #aeb9ca calc((var(--passed) + var(--failed)) * 1%) 100%
    );
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(17, 34, 51, 0.08),
    0 12px 24px rgba(15, 32, 50, 0.12);
  min-height: 0;
}

.wcag-pie-chart::before {
  content: '';
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(17, 34, 51, 0.08);
}

.wcag-pie-chart::after {
  content: '';
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.35) 22%, transparent 42%);
  pointer-events: none;
}

.wcag-pie-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  color: #3c4b5d;
  font-size: 12px;
  line-height: 1.2;
}

.wcag-pie-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.wcag-pie-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.wcag-pie-legend-pass {
  background: #14ad49;
}

.wcag-pie-legend-fail {
  background: #ef120f;
}

.wcag-pie-legend-na {
  background: #aeb9ca;
}

.wcag-breakdown-level-row th,
.wcag-breakdown-header-row th {
  font-family: inherit;
}

.detail-block-breakdown {
  grid-column: 1 / -1;
}

.detail-block-breakdown [data-field="wcag-breakdown"] {
  width: 100%;
}

.detail-block-breakdown ~ .detail-block {
  grid-column: 1 / -1;
}

.help-layout {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 24px;
}

.help-panel {
  width: 100%;
  min-height: calc(100vh - 220px);
}

.help-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 24px;
  flex: 1 1 auto;
}

.help-block {
  padding: 22px 22px 20px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 8px 20px rgba(18, 35, 52, 0.06);
  min-height: 160px;
}

.help-block h3 {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.help-block p {
  margin: 0;
  color: var(--muted);
  max-width: none;
}

@media (max-width: 980px) {
  .wcag-breakdown-table,
  .wcag-breakdown-table tbody,
  .wcag-breakdown-table tr,
  .wcag-breakdown-table td,
  .wcag-breakdown-table th {
    display: block;
    width: 100%;
  }
  .wcag-breakdown-table tr {
    border-left: 0;
    border-right: 0;
  }
  .wcag-breakdown-level-row th {
    font-size: 2rem;
  }
  .wcag-breakdown-header-row th:nth-child(2),
  .wcag-breakdown-header-row th:nth-child(3),
  .wcag-breakdown-data-row td:nth-child(2),
  .wcag-breakdown-chart-cell {
    width: 100%;
    text-align: left;
  }
  .wcag-breakdown-chart-cell {
    padding: 18px 14px;
  }
  .wcag-breakdown-chart-cell[rowspan] {
    min-height: 360px;
  }
  .wcag-pie-chart {
    width: 165px;
    max-width: 165px;
    min-width: 165px;
    height: 165px;
  }

  .help-body {
    grid-template-columns: 1fr;
    padding: 18px;
  }
}
.issues-block {
  margin-top: 22px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  padding: 16px;
}

.issues-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.issues-heading h3 {
  margin-bottom: 4px;
  color: #10263d;
}

.issues-hint {
  margin: 0;
  font-size: 12px;
  color: #4a5b72;
}

.issues-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 10px;
}

.issues-filters label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #4a5b72;
}

.issues-filters input,
.issues-filters select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  font-family: inherit;
  background: #fff;
}

.issues-table {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.issues-row {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 900px;
  grid-template-columns: minmax(220px, 1.1fr) 58px minmax(180px, 0.9fr) minmax(160px, 0.7fr);
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--stroke);
  align-items: center;
  background: #fff;
}

.issues-row:last-child {
  border-bottom: none;
}

.issues-head {
  background: #eef4fa;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #4a5b72;
}

.issues-body .issues-row {
  font-size: 13px;
}

.issues-cell-muted {
  color: #304357;
}

.issues-row:hover {
  background: #fdf5ec;
}

.issues-category-cell,
.issues-title-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.issue-toggle {
  width: 24px;
  height: 24px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.issue-toggle:hover {
  border-color: var(--accent);
  background: #eef5fb;
}

.issue-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.issue-toggle-icon {
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.2s ease, border-color 0.2s ease;
  margin-top: -1px;
}

.issue-toggle[aria-expanded="true"] {
  border-color: var(--accent);
  background: #eef5fb;
}

.issue-toggle[aria-expanded="true"] .issue-toggle-icon {
  border-color: var(--accent);
  transform: rotate(45deg);
  margin-top: -4px;
}

.issue-details {
  grid-column: 1 / -1;
  padding: 14px 16px 16px;
  background: linear-gradient(180deg, #f7fbff 0%, #f3f7fc 100%);
  border-top: 1px solid var(--stroke);
  display: none;
  gap: 12px;
  line-height: 1.6;
  color: #1f2d3d;
}

.issue-details.active {
  display: grid;
}

.issue-field {
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.issue-field h4 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4a5b72;
}

.issue-field-body {
  font-size: 13px;
  color: #1f2d3d;
}

.issue-field-body p {
  margin: 0 0 10px;
  white-space: pre-wrap;
  max-width: 75ch;
}

.solution-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  color: inherit;
}

.issue-field-body ul {
  margin: 0 0 10px;
  padding-left: 18px;
}

.issue-field-body li {
  margin-bottom: 4px;
}

.issue-details a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.issue-details > div + div {
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.issue-code-refs-wrap {
  margin-top: 14px;
}

.issue-code-refs-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  font-size: 13px;
}

.issue-code-refs-table th,
.issue-code-refs-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--stroke);
  vertical-align: top;
}

.issue-code-refs-table th {
  background: #eef4fb;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.issue-code-refs-table tr:last-child td {
  border-bottom: 0;
}

.issue-details .issue-shots {
  margin-top: 8px;
}

.issue-screenshot-placeholder {
  padding: 12px 14px;
  border: 1px dashed var(--stroke);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
}

.appendix-journey {
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: #f8fbfe;
  margin-bottom: 12px;
  overflow: hidden;
}

.appendix-journey-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 15px;
  color: #10263d;
}

.appendix-journey-summary::-webkit-details-marker {
  display: none;
}

.appendix-journey-title {
  flex: 1 1 auto;
}

.appendix-journey-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 18px;
  line-height: 1;
  color: #4a5b72;
  flex: 0 0 auto;
}

.appendix-journey[open] .appendix-journey-caret {
  color: var(--accent);
}

.appendix-journey-body {
  border-top: 1px solid var(--stroke);
  padding: 14px 16px 16px;
}

.appendix-journey-body pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.65;
  color: #10263d;
}

.appendix-journey-root {
  margin-top: 6px;
}

.appendix-journeys {
  display: grid;
  gap: 10px;
}

.appendix-journeys-header {
  font-weight: 700;
  font-size: 16px;
  color: #10263d;
  margin-bottom: 2px;
}

.appendix-journey-item {
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.appendix-journey-item-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  font-weight: 700;
  color: #174d7a;
  background: #f6faff;
}

.appendix-journey-item-summary::-webkit-details-marker {
  display: none;
}

.appendix-journey-item-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 18px;
  line-height: 1;
  color: #4a5b72;
  flex: 0 0 auto;
}

.appendix-journey-item[open] .appendix-journey-item-caret {
  color: var(--accent);
}

.appendix-journey-item-body {
  border-top: 1px solid var(--stroke);
  padding: 12px 14px 14px;
}

.issue-shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.issue-shots img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  box-shadow: 0 8px 16px rgba(20, 15, 10, 0.12);
  cursor: default;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 50;
}

.lightbox.lightbox-open {
  display: grid;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 12, 8, 0.65);
}

.lightbox-panel {
  position: relative;
  background: #fff;
  padding: 16px;
  border-radius: 16px;
  max-width: min(96vw, 980px);
  max-height: 86vh;
  box-shadow: 0 30px 60px rgba(10, 10, 10, 0.35);
  display: grid;
  gap: 10px;
  z-index: 1;
}

.lightbox-image {
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 12px;
}

.lightbox-close {
  justify-self: end;
  border: 1px solid var(--stroke);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 55;
  padding: 24px;
}

.confirm-modal.confirm-open {
  display: grid;
}

.confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 12, 8, 0.65);
}

.confirm-dialog {
  position: relative;
  width: min(420px, 100%);
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  max-width: min(96vw, 980px);
  box-shadow: 0 30px 60px rgba(10, 10, 10, 0.35);
  display: grid;
  gap: 10px;
  z-index: 1;
}

.confirm-dialog h2 {
  margin: 0;
  font-size: 20px;
}

.confirm-dialog p {
  margin: 0;
  color: var(--muted);
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.confirm-cancel,
.confirm-delete {
  border: 1px solid transparent;
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: inherit;
}

.confirm-cancel {
  border-color: var(--stroke);
  color: var(--ink);
}

.confirm-delete {
  background: linear-gradient(135deg, #a93c32, #7a2922);
  color: #fff;
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.detail-inline {
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-inline strong {
  font-weight: 600;
  background: #f3e8dc;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}

.detail-list span {
  color: #4a5b72;
}

.pill {
  border-radius: 999px;
  padding: 6px 12px;
  background: #e7eff8;
  color: var(--muted);
  font-size: 12px;
}

.placeholder {
  color: #4a5b72;
  font-size: 14px;
}

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 64px 24px 48px;
}

.auth-card {
  width: min(420px, 100%);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 38%),
    linear-gradient(180deg, #0d1721 0%, #13273a 100%);
  color: #f5f8fb;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px;
  box-shadow: 0 28px 60px rgba(10, 18, 28, 0.26);
  display: grid;
  gap: 14px;
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: auto -90px -120px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(35, 116, 184, 0.24), transparent 68%);
  pointer-events: none;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}

.auth-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: contain;
  background: #fff;
  padding: 8px;
  box-shadow: inset 0 0 0 1px rgba(16, 38, 61, 0.12);
  flex: 0 0 auto;
}

.auth-brand-text {
  display: grid;
  gap: 2px;
}

.auth-brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.auth-brand-sub {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 248, 251, 0.68);
}

.auth-card .eyebrow,
.auth-card p,
.auth-status,
.auth-separator,
.auth-form label {
  color: rgba(245, 248, 251, 0.74);
}

.auth-card h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  color: #fff;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.auth-form input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: inherit;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.auth-form input::placeholder {
  color: rgba(245, 248, 251, 0.42);
}

.auth-form input:focus-visible {
  outline: 2px solid rgba(89, 169, 255, 0.5);
  outline-offset: 2px;
}

.auth-submit {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #ffffff 0%, #dcecff 100%);
  color: #10263d;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
}

.auth-submit:hover {
  filter: brightness(1.02);
}

.auth-status {
  font-size: 12px;
}

.auth-separator {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.auth-separator::before,
.auth-separator::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(255, 255, 255, 0.12);
}

.auth-hidden {
  display: none;
}

.admin-panel {
  grid-column: 1 / -1;
}

.admin-body {
  padding: 18px 22px 24px;
  display: grid;
  gap: 18px;
}

.admin-create h3,
.admin-list h3 {
  margin: 0 0 10px;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
}

#user-create-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

#user-create-form input,
#user-create-form select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  font-family: inherit;
  background: #fff;
}

#user-create-form button {
  border: none;
  border-radius: 10px;
  background: var(--accent-2);
  color: #fff;
  cursor: pointer;
  padding: 8px 10px;
}

.admin-status {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.admin-debug {
  padding: 10px 12px;
  border: 1px dashed var(--stroke);
  border-radius: 12px;
  background: #f7fbff;
  color: var(--muted);
  font-size: 12px;
}

.user-table {
  display: grid;
  gap: 10px;
}

.user-twofa {
  margin-top: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.user-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(200px, 1.6fr) minmax(120px, 0.6fr);
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 14px;
  font-size: 13px;
}

.user-row select,
.user-row input {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  font-family: inherit;
  background: #fff;
  font-size: 12px;
}

.user-row select[data-companies],
#user-companies-input {
  width: 100%;
}

.company-dropdown {
  display: block;
  width: 100%;
}

#user-companies-input {
  grid-column: 1 / -1;
}

.company-dropdown-shell {
  position: relative;
  width: 100%;
}

.company-dropdown-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.company-dropdown-summary:hover {
  border-color: var(--accent-2);
}

.company-dropdown-summary:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.company-dropdown-summary-left {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.company-dropdown-summary-hint {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.company-dropdown-summary-text {
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-dropdown-summary-right {
  flex: 0 0 auto;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef5fb;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.company-dropdown-summary::-webkit-details-marker {
  display: none;
}

.company-dropdown-shell[open] .company-dropdown-summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.company-dropdown-summary::after {
  content: "▾";
  font-size: 11px;
  color: var(--muted);
}

.company-dropdown-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 1px);
  z-index: 3;
  max-height: 220px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--stroke);
  border-top: none;
  border-radius: 0 0 10px 10px;
  background: #fff;
  box-shadow: 0 18px 34px rgba(18, 35, 52, 0.14);
}

.company-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.company-dropdown-item input {
  margin: 0;
  accent-color: var(--accent-2);
}

.company-dropdown-item:hover {
  background: #f6f9fd;
}

.company-dropdown.is-disabled {
  opacity: 0.6;
  pointer-events: none;
}

.company-dropdown-row {
  grid-column: 1 / -1;
}

.company-dropdown-empty {
  padding: 8px 0;
}

.user-row-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.user-active {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.user-row-footer button {
  min-width: 96px;
}

.company-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) minmax(120px, 0.5fr) auto;
  gap: 10px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13px;
}

.company-row strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 2px;
}

.company-row div:nth-child(2) {
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.company-id {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.company-id span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.company-row button {
  justify-self: end;
  border: 1px solid var(--stroke);
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  padding: 7px 10px;
  cursor: pointer;
  font: inherit;
}

.company-row button:hover {
  border-color: #b98a7b;
  color: #7a2922;
  background: #fff7f5;
}


button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

button,
input,
select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card,
.panel,
.stat {
  animation: rise 0.5s ease both;
}

@media (max-width: 980px) {
  .site-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .nav-menu {
    width: 100%;
    justify-content: space-between;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
  }

  .top {
    flex-direction: column;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}
