:root {
  --bg: #070505;
  --panel: #100b0b;
  --panel-2: #171010;
  --red: #ff4b32;
  --orange: #ff7846;
  --text: #f7efed;
  --muted: #9d8d89;
  --line: #2b2020;
  --green: #65d39d;
  --gold: #e4a34a;
  --error: #ff8370;
  --copper: #4a302b;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 84% 6%, rgba(255,75,50,.1), transparent 25%),
    var(--bg);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,75,50,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,75,50,.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(#000, transparent 76%);
}
button, select, input { font: inherit; }
button, select, label { touch-action: manipulation; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.dashboard-shell {
  position: relative;
  z-index: 1;
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 44px);
}
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 0 16px rgba(255,75,50,.2)); }
.brand div { display: grid; gap: 2px; }
.brand span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.brand strong { font-size: 14px; letter-spacing: -.01em; }
.header-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.header-actions span { color: var(--muted); font-size: 10px; }
.header-actions button, .btn {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--copper);
  border-radius: 5px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .12s var(--ease), border-color .16s ease, background .16s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.header-actions button:hover, .btn:hover { transform: translateY(-2px); border-color: var(--orange); background: #21110f; }
.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-color: var(--red);
  color: #fff;
}
.btn-primary:hover { background: linear-gradient(135deg, #ff634b, #ff8e61); border-color: var(--orange); }
.btn-danger {
  border-color: rgba(255, 75, 50, 0.4);
  color: var(--error);
  background: #170908;
}
.btn-danger:hover {
  background: #2a0e0c;
  border-color: var(--error);
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px;
  background: #150d0c;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 10px;
}
.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--orange);
  object-fit: cover;
  flex-shrink: 0;
}
.user-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.user-badge strong { color: var(--text); }
.user-badge span { color: var(--orange); font-size: 9px; text-transform: uppercase; font-weight: 800; }

.dashboard-intro {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 430px);
  align-items: end;
  gap: 60px;
  padding: clamp(40px, 6vw, 70px) 0 36px;
}
.eyebrow {
  display: block;
  margin-bottom: 12px;
  color: var(--orange);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.dashboard-intro h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(38px, 5vw, 68px);
  line-height: .96;
  letter-spacing: -.05em;
  font-weight: 900;
}
.dashboard-intro em { font-style: normal; color: var(--red); text-shadow: 0 0 40px rgba(255,75,50,.35); }
.dashboard-intro p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 40px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.summary-item { display: grid; gap: 8px; padding: 22px 24px; border-right: 1px solid var(--line); }
.summary-item:last-child { border-right: 0; }
.summary-item span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.summary-item strong { font-size: clamp(32px, 3.8vw, 52px); line-height: 1; letter-spacing: -.05em; }
.summary-item strong.accent { color: var(--orange); }

.results-workspace {
  display: grid;
  grid-template-columns: minmax(360px, 460px) 1fr;
  gap: 24px;
  align-items: start;
}
.attempts-panel, .result-detail {
  min-height: 600px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.panel-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #0e0909;
}
.panel-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.panel-head strong { font-size: 15px; }
.panel-filters {
  display: flex;
  gap: 10px;
  align-items: center;
}
.search-input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #150d0c;
  color: var(--text);
  font-size: 11px;
}
.search-input:focus { border-color: var(--orange); }
.filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.filter select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #150d0c;
  color: var(--text);
  font-size: 11px;
}
.attempt-list { max-height: 680px; overflow-y: auto; overscroll-behavior: contain; }
.attempt-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background .16s ease;
}
.attempt-row:hover { background: #160d0c; }
.attempt-row.selected { background: linear-gradient(90deg, #25120f, #0d0807); box-shadow: inset 3px 0 var(--red); }
.attempt-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.attempt-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--copper);
  object-fit: cover;
  flex-shrink: 0;
}
.attempt-avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #180d0c;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.attempt-name { display: grid; gap: 4px; min-width: 0; }
.attempt-name strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.attempt-name span { color: var(--muted); font-size: 10px; }
.attempt-indicator { display: grid; justify-items: end; align-content: center; gap: 4px; }
.attempt-indicator strong { font-size: 18px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status-pill.green::before { background: var(--green); box-shadow: 0 0 10px rgba(101,211,157,.5); }
.status-pill.yellow::before { background: var(--gold); }
.status-pill.orange::before { background: var(--orange); }
.status-pill.red::before, .status-pill.invalidated::before { background: var(--error); }
.status-pill.timeout::before { background: var(--gold); }

.result-detail { padding: clamp(22px, 3vw, 36px); }
.empty-state { min-height: 480px; display: grid; place-items: center; text-align: center; }
.empty-state div { max-width: 360px; }
.empty-state strong { display: block; margin-bottom: 10px; font-size: 20px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.detail-candidate-profile {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.detail-avatar-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}
.detail-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--copper);
  object-fit: cover;
  box-shadow: 0 0 20px rgba(255, 75, 50, 0.2);
}
.detail-level {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #110b0a;
  border: 1px solid var(--orange);
  color: var(--orange);
  font-size: 9px;
  font-weight: 850;
  padding: 1px 6px;
  border-radius: 10px;
  letter-spacing: .04em;
}
.detail-head h2 { margin: 5px 0 0; font-size: clamp(24px, 3vw, 38px); line-height: 1.1; letter-spacing: -.05em; }
.detail-head p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.score-disc {
  --score: 0;
  width: 90px;
  height: 90px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--red) calc(var(--score) * 1%), #241818 0);
  box-shadow: 0 0 34px rgba(255,75,50,.1);
}
.score-disc::before {
  content: "";
  grid-area: 1 / 1;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--panel);
}
.score-disc strong { position: relative; font-size: 24px; letter-spacing: -.05em; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.dimension-list { display: grid; gap: 14px; margin-top: 24px; }
.dimension-row { display: grid; grid-template-columns: minmax(150px, 210px) 1fr 38px; align-items: center; gap: 15px; }
.dimension-row span { font-size: 11px; }
.dimension-row strong { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.dimension-track { height: 6px; overflow: hidden; border-radius: 2px; background: #261919; }
.dimension-track i { display: block; width: var(--value); height: 100%; background: linear-gradient(90deg, var(--red), var(--orange)); box-shadow: 0 0 12px rgba(255,75,50,.26); }
.flags { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.flags-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.flags-head strong { font-size: 12px; }
.flags-head span { color: var(--muted); font-size: 9px; }
.flag-list { display: grid; gap: 7px; }
.flag { padding: 10px 12px; border: 1px solid #4a302b; border-radius: 6px; background: #160c0b; color: #d8c7c3; font-size: 11px; }
.flag.clear { border-color: #244c39; background: #0c1712; color: #8ce6b5; }
.detail-actions { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.incomplete-detail { display: grid; gap: 18px; padding-top: 30px; }
.incomplete-detail strong { font-size: 22px; }
.incomplete-detail p { max-width: 520px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

/* Modal for Access */
.modal-overlay:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(7, 5, 5, 0.85);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
  overscroll-behavior: contain;
}
.modal-card {
  width: min(520px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-head h3 { margin: 0; font-size: 20px; }
.close-btn { background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; padding: 4px; }
.access-result { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #160d0c; }
.access-link { display: flex; gap: 8px; margin-top: 10px; }
.access-link input { flex: 1; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; background: #0c0808; color: var(--text); font-size: 11px; }

@media (max-width: 1050px) {
  .results-workspace { grid-template-columns: 1fr; }
  .attempts-panel, .result-detail { min-height: auto; }
}
@media (max-width: 760px) {
  .dashboard-shell { padding: 17px; }
  .dashboard-header, .dashboard-intro { align-items: start; grid-template-columns: 1fr; flex-direction: column; }
  .dashboard-intro { gap: 24px; padding: 40px 0 24px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-item:nth-child(2) { border-right: 0; }
  .summary-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .results-workspace { display: block; }
  .result-detail { margin-top: 16px; }
  .dimension-row { grid-template-columns: 1fr 40px; }
  .dimension-track { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* --- Player Resolver --- */
.resolver-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  margin-bottom: 16px;
  overflow: hidden;
}
.resolver-fields {
  display: flex;
  gap: 10px;
  align-items: center;
}
.resolver-fields .search-input { flex: 1; }
.resolver-fields .filter select { height: 34px; }
.player-card { border-top: 1px solid var(--line); padding: 16px 20px; background: #0e0909; }
.player-card-body {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.player-avatar {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  border: 1px solid var(--copper);
  object-fit: cover;
}
.player-avatar.placeholder {
  display: grid;
  place-items: center;
  background: #241210;
  color: var(--red);
  font-weight: 800;
}
.player-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.player-info strong { font-size: 14px; }
.player-info span { color: var(--muted); font-size: 11px; }
.resolve-error {
  padding: 12px 20px;
  color: var(--error);
  background: #241210;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.integrity-detail {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0e0909;
}
.integrity-detail .flag-list, .integrity-detail .flags-head { margin: 0; }
.integrity-detail .flags { margin: 0; }

/* --- Lucide icons integration --- */
.header-actions button i, .btn i { font-size: 13px; flex-shrink: 0; }
.btn i { display: inline-flex; align-items: center; }
.close-btn i { font-size: 14px; }

.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.search-wrap > i { color: var(--muted); font-size: 13px; flex-shrink: 0; }

.summary-item { position: relative; }
.summary-item > i { position: absolute; top: 18px; right: 18px; font-size: 15px; color: var(--muted); opacity: .8; }

.detail-meta span { display: inline-flex; align-items: center; gap: 6px; }
.detail-meta span i { font-size: 12px; }

.flags-title { display: inline-flex; align-items: center; gap: 8px; }
.flags-title i { font-size: 13px; color: var(--muted); }

.flag { display: flex; align-items: center; gap: 8px; }
.flag i { font-size: 13px; color: var(--gold); flex-shrink: 0; }
.flag.clear i { color: var(--green); }

.player-info span { display: inline-flex; align-items: center; gap: 6px; }
.player-info span i { font-size: 12px; }
.player-avatar.placeholder i { font-size: 20px; }

.empty-state div > i { display: block; font-size: 30px; color: var(--muted); margin-bottom: 12px; }
.filter > i { font-size: 12px; color: var(--muted); }

/* ============ Sidebar layout ============ */
.app-layout { display: flex; align-items: stretch; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; z-index: 6; flex-shrink: 0; width: 252px; height: 100vh;
  display: flex; flex-direction: column;
  padding: 22px 14px 18px;
  background: rgba(10, 11, 11, 0.92); backdrop-filter: blur(10px);
  border-right: 1px solid var(--line);
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 18px; border-bottom: 1px solid var(--line); }
.sidebar-brand img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 0 16px rgba(255, 75, 50, .2)); }
.sidebar-brand div { display: grid; gap: 2px; }
.sidebar-brand span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.sidebar-brand strong { font-size: 13px; letter-spacing: -.01em; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 14px;
  border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted);
  font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; text-align: left;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.nav-item i { font-size: 15px; flex-shrink: 0; }
.nav-item:hover { background: #160d0c; color: var(--text); border-color: var(--line); }
.nav-item.active { background: linear-gradient(90deg, #251310, #0d0807); color: var(--text); border-color: var(--line); box-shadow: inset 3px 0 var(--red); }
.sidebar-footer { display: grid; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.sidebar-user {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 6px; background: #150d0c; text-align: left; cursor: default;
}
.sidebar-user .user-avatar { width: 32px; height: 32px; }
.sidebar-user .user-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sidebar-user .user-info strong { color: var(--text); font-size: 11px; }
.sidebar-user .user-info > span { color: var(--orange); font-size: 9px; text-transform: uppercase; font-weight: 800; }
.sidebar-footer .btn { width: 100%; justify-content: center; white-space: nowrap; }
.app-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-content .resolver-panel { margin: clamp(14px, 2vw, 28px) clamp(16px, 2.5vw, 34px) 0; }

@media (max-width: 900px) {
  .app-layout { flex-direction: column; }
  .sidebar { position: static; width: 100%; height: auto; flex-direction: row; align-items: center; gap: 10px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .sidebar-brand { border-bottom: 0; padding: 0; margin-right: auto; }
  .sidebar-nav { flex-direction: row; margin-top: 0; flex: 0; }
  .sidebar-nav .nav-item span { display: none; }
  .sidebar-nav .nav-item { padding: 10px 11px; }
  .sidebar-footer { flex-direction: row; align-items: center; margin-top: 0; padding-top: 0; border-top: 0; gap: 8px; }
  .sidebar-footer .btn { width: auto; }
  .sidebar-user .user-info span { display: none; }
}

/* --- UX: skeleton loading --- */
.skeleton {
  position: relative;
  overflow: hidden;
  background: #150d0c;
  border-radius: 4px;
  color: transparent;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent);
  animation: skeleton-sweep 1.4s ease-in-out infinite;
}
@keyframes skeleton-sweep { 100% { transform: translateX(100%); } }

/* --- UX: toast --- */
.toast-region {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 200;
  display: grid;
  gap: 8px;
  max-width: min(360px, calc(100vw - 44px));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--orange);
  border-radius: 6px;
  background: #171010;
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 10px 34px rgba(0,0,0,.55);
  animation: toast-in .18s var(--ease);
}
.toast i { font-size: 15px; color: var(--orange); flex-shrink: 0; margin-top: 1px; }
.toast.success { border-left-color: var(--green); }
.toast.success i { color: var(--green); }
.toast.error { border-left-color: var(--error); }
.toast.error i { color: var(--error); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* --- UX: destructive two-step --- */
.btn-danger.confirming {
  background: var(--error);
  border-color: var(--error);
  color: #fff;
}

/* --- Accesses panel --- */
.accesses-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: hidden;
}
.accesses-list { max-height: 400px; overflow-y: auto; }
.accesses-empty {
  display: grid; place-items: center; gap: 8px; padding: 26px; color: var(--muted); font-size: 12px; text-align: center;
}
.accesses-empty i { font-size: 26px; opacity: .7; }
.access-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
}
.access-row:last-child { border-bottom: 0; }
.access-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.access-name { display: grid; gap: 1px; min-width: 0; }
.access-name strong { font-size: 13px; }
.access-name > span { color: var(--muted); font-size: 10px; }
.access-trace { color: var(--muted); font-size: 9px; font-style: italic; }
.access-indicator { display: grid; gap: 2px; justify-items: end; }
.access-expiry { color: var(--gold); font-size: 10px; }
.status-pill.expired { color: var(--muted); }
.status-pill.in_progress { color: var(--gold); }

/* --- Session gate --- */
.session-gate {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--bg);
}
.session-gate[hidden] { display: none; }
.session-gate-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.session-gate-inner i { font-size: 22px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .session-gate-inner i { animation: none; } }

/* --- Access management / traceability --- */
.btn-mini {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-mini i { font-size: 11px; }
.btn-mini:hover { border-color: var(--orange); color: var(--text); background: #21110f; }
.btn-mini.btn-warn { color: var(--gold); border-color: rgba(228,163,74,.4); }
.btn-mini.btn-danger { color: var(--error); border-color: rgba(255,75,50,.4); }
.btn-mini:disabled { opacity: .55; cursor: default; }

.access-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.access-indicator { gap: 4px; }

.access-trace-block {
  margin-top: 4px;
  padding: 10px 18px;
  border-top: 1px dashed var(--line);
  background: #0e0909;
  font-size: 11px;
}
.access-trace-block[hidden] { display: none; }
.trace-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
.trace-row i { font-size: 12px; color: var(--gold); flex-shrink: 0; }
.trace-row span:first-of-type { flex: 1; min-width: 0; }
.trace-row strong { color: var(--text); }

/* --- Result detail actions --- */
.detail-actions-group { display: flex; gap: 10px; }
.report-link-box { display: flex; gap: 8px; margin-top: 6px; }
.report-link-box input {
  flex: 1; height: 38px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 4px;
  background: #0c0808; color: var(--text); font-size: 11px;
}
.report-link-box .btn { min-height: 38px; }
