:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #1f2937;
  --line: #334155;
  --text: #e2e8f0;
  --accent: #f59e0b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, #1e293b, var(--bg));
}

.requester {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.65);
  display: grid;
  place-items: center;
  z-index: 9999;
}

.requester.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.requester-card {
  background: #0b1220;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  min-width: 260px;
  display: grid;
  gap: 0.25rem;
}

.requester-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.requester-wide {
  min-width: min(640px, 92vw);
}

.requester-message {
  display: block;
  white-space: normal;
  line-height: 1.4;
}

.requester-message p {
  display: block;
  margin: 0.25rem 0;
}

.requester-wide pre {
  margin: 0.35rem 0 0.55rem 0;
  max-height: 220px;
  overflow: auto;
  background: #020617;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem;
}

.conf-form {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  min-height: 100%;
  align-content: start;
  align-items: start;
}

.config-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.config-tabs .tab-btn {
  height: 32px;
  min-height: 32px;
  padding: 0 0.6rem;
  line-height: 1;
}

.conf-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem;
  background: rgba(11, 18, 32, 0.65);
  overflow: auto;
}

.conf-tab-panel {
  max-height: calc(100vh - 280px);
}

.conf-section h3 {
  margin: 0 0 0.4rem 0;
  font-size: 0.8rem;
  color: #e2e8f0;
}

.conf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.conf-table th,
.conf-table td {
  border: 1px solid #243244;
  padding: 0.25rem;
  vertical-align: middle;
}

.conf-table td:first-child,
.conf-table th:first-child {
  text-align: center;
}

.conf-table th {
  background: #0f172a;
  color: #cbd5e1;
  position: sticky;
  top: 0;
  z-index: 2;
}

.conf-key {
  font-family: "IBM Plex Mono", monospace;
  color: #e2e8f0;
}

.table-input {
  width: 100%;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b1220;
  color: var(--text);
}

.table-remove-btn,
.table-add-btn {
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #111827;
  color: #e2e8f0;
  font-weight: 700;
}

.table-add-btn {
  margin-top: 0.35rem;
}

.conf-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.conf-actions button {
  height: 34px;
  min-height: 34px;
  padding: 0 0.8rem;
  line-height: 1;
}

.login-body {
  min-height: 100vh;
  margin: 0;
  color: #ffffff;
  font-family: "Anonymous Pro", "IBM Plex Sans", monospace;
  background-attachment: scroll, scroll, scroll, fixed;
  background-color: #645862;
  background-image:
    url("https://www.winstonsmith.org/images/light-bl.svg"),
    url("https://www.winstonsmith.org/images/light-br.svg"),
    url("https://www.winstonsmith.org/images/overlay.png"),
    url("https://www.winstonsmith.org/images/background.jpg");
  background-position: bottom left, bottom right, top left, top center;
  background-repeat: no-repeat, no-repeat, repeat, no-repeat;
  background-size: 25em, 25em, auto, cover;
}

.login-body #banner {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-body #banner .inner {
  width: min(520px, 92vw);
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.2rem;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.login-body #banner .inner header img {
  width: min(300px, 64vw);
  height: auto;
}

.login-body #banner .inner header h2 {
  margin: 0.1rem 0 0 0;
  font-size: clamp(2.2rem, 6vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.login-body #banner .inner p {
  margin: 0;
  font-size: 1rem;
  color: #f1f5f9;
}

.login-body #banner .inner p strong {
  font-size: clamp(1.45rem, 3.8vw, 1.95rem);
  font-weight: 700;
}

.login-footer {
  width: 100%;
  margin-top: 0.65rem;
  padding: 0.95rem;
  background: rgba(17, 24, 39, 0.4);
  border: 1px solid rgba(203, 213, 225, 0.35);
  border-radius: 10px;
}

.login-copy {
  margin: 0 0 0.55rem 0;
  color: #f1f5f9;
}

.login-footer form {
  display: grid;
  gap: 0.55rem;
}

.login-footer label {
  font-size: 0.88rem;
  color: #e2e8f0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

.login-body input,
.login-body button {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

.login-body input {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #94a3b8;
  color: #0f172a;
}

.login-body button {
  background: #111827;
  color: #f8fafc;
}

.login-body .message {
  margin-top: 0.4rem;
  color: #fca5a5;
}

input,
select,
button,
textarea {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
}

button {
  cursor: pointer;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  border: none;
  color: #111827;
  font-weight: 700;
}

.dashboard-grid {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px 1fr;
  grid-template-rows: 56px 1fr 180px;
  grid-template-areas:
    "top top"
    "left center"
    "bottom bottom";
}

.status-bar {
  grid-area: top;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.95);
  padding: 0.8rem 1rem;
  display: grid;
  grid-template-columns: 300px 1fr;
  align-items: center;
  gap: 0.6rem;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.status-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.edition-label {
  font-size: 0.85rem;
  color: #cbd5e1;
}

#edition-select {
  min-width: 180px;
  max-width: 260px;
}

#status-text {
  margin-left: 2rem;
  margin-right: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.test-site-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.7);
}

.test-site-indicator.on {
  background: #22c55e;
}

.test-site-indicator.off {
  background: #ef4444;
}

#test-site-indicator {
  margin-left: 2rem;
}

.main-tabs {
  display: flex;
  gap: 0.35rem;
}

.logout-btn {
  margin-left: 1.6rem;
}

.left-panel {
  grid-area: left;
  overflow: auto;
  border-right: 1px solid var(--line);
  padding: 1rem;
  background: rgba(2, 6, 23, 0.5);
}

.editor-panel {
  grid-area: center;
  padding: 1rem;
  min-height: 0;
}

.editor-toolbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 0.5rem;
  gap: 0.6rem;
}

#current-file {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  color: #cbd5e1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

#editor {
  width: 100%;
  height: calc(100% - 5rem);
  resize: none;
  font-family: "IBM Plex Mono", "Fira Code", monospace;
}

#editor-view,
#program-view,
#config-view,
#publish-view,
#archive-view,
#help-view {
  height: 100%;
}

#program-view {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.6rem;
  min-height: 0;
}

.program-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.program-lock-spacer {
  width: 0.9rem;
  display: inline-block;
}

.program-lock-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.program-status-field select {
  min-width: 140px;
}

.program-test-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.45);
  pointer-events: none;
  opacity: 0.45;
  transition: all 120ms ease;
}

.program-test-link.active {
  color: #bef264;
  border-color: rgba(190, 242, 100, 0.75);
  box-shadow: 0 0 10px rgba(190, 242, 100, 0.45);
  background: rgba(53, 83, 20, 0.55);
  pointer-events: auto;
  opacity: 1;
}

.program-lock-label {
  font-size: 0.76rem;
  color: #cbd5e1;
}

.program-toolbar .pwser-consent-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 999px;
  overflow: hidden;
}

.program-toolbar .pwser-toggle-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.program-toolbar .pwser-toggle-label {
  margin: 0;
  padding: 0.2rem 0.62rem;
  font-size: 0.74rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(148, 163, 184, 0.35);
  user-select: none;
}

.program-toolbar .pwser-consent-toggle .pwser-toggle-label:last-of-type {
  border-right: 0;
}

.program-toolbar .pwser-toggle-input:checked + .pwser-toggle-label {
  background: #f59e0b;
  color: #111827;
}

.program-publish-btn {
  background: #b91c1c;
  color: #fee2e2;
  border: 1px solid #7f1d1d;
}

.program-field {
  display: grid;
  gap: 0.18rem;
  font-size: 0.72rem;
  color: #cbd5e1;
}

.program-field select,
.program-field input {
  min-width: 160px;
}

.program-start-field input {
  min-width: 13.5rem;
  width: 13.5rem;
  max-width: 13.5rem;
  font-family: "IBM Plex Mono", monospace;
}

.program-version {
  margin-left: 0.25rem;
  color: #94a3b8;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
}

.program-grid {
  display: grid;
  grid-template-columns: minmax(300px, 42%) 1fr;
  gap: 0.7rem;
  min-height: 0;
}

.program-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.4);
  padding: 0.45rem;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
}

.program-panel h3 {
  margin: 0 0 0.35rem 0;
  font-size: 0.84rem;
  color: #e2e8f0;
}

.program-cards-list {
  overflow: auto;
  min-height: 0;
  display: grid;
  gap: 0.45rem;
  align-content: start;
  padding-right: 0.2rem;
}

.program-card {
  border: 1px solid #334155;
  background: #0b1220;
  border-radius: 8px;
  padding: 0.42rem 0.48rem;
  font-size: 0.76rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.3rem 0.45rem;
  align-items: start;
  cursor: pointer;
}

.program-card.compat-yes {
  border-color: #16a34a;
}

.program-card.compat-no {
  border-color: #dc2626;
}

.program-card.compat-special {
  border-color: #facc15;
}

.program-card .drag-handle {
  font-weight: 700;
  color: #94a3b8;
  cursor: grab;
  user-select: none;
}

.program-card .card-main {
  min-width: 0;
}

.program-card .card-title {
  font-weight: 700;
  color: #f8fafc;
  display: block;
}

.program-card .card-sub {
  color: #cbd5e1;
  font-size: 0.72rem;
}

.program-card .card-time {
  font-family: "IBM Plex Mono", monospace;
  color: #fde68a;
  font-size: 0.74rem;
  white-space: nowrap;
}

.program-card .card-right {
  display: grid;
  justify-items: end;
  align-items: start;
  gap: 0.2rem;
  min-width: 4.5rem;
}

.program-card .card-meta {
  font-size: 0.74rem;
  color: #e2e8f0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.program-card .card-participation {
  font-size: 0.78rem;
  line-height: 1;
  display: inline-block;
  min-width: 1rem;
  margin-right: 0.28rem;
  font-weight: 800;
}

.program-card .card-participation-yes {
  color: #22ff66;
}

.program-card .card-participation-no {
  color: #ff4d5a;
}

.program-card .card-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.program-card .card-live-dot.live-yes-strong {
  background: #22ff66;
}

.program-card .card-live-dot.live-yes-soft {
  background: #65b979;
}

.program-card .card-live-dot.live-no-soft {
  background: #b86969;
}

.program-card .card-live-dot.live-no-strong {
  background: #ff3030;
}

.program-card.drop-before {
  box-shadow: inset 0 3px 0 #38bdf8;
}

.program-card.drop-after {
  box-shadow: inset 0 -3px 0 #38bdf8;
}

.program-candidate-card label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: #cbd5e1;
}

.program-candidate-card {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  max-height: 86vh;
  overflow: auto;
}

#program-assets-requester .requester-card {
  width: min(96vw, 1680px);
  max-height: 92vh;
}

.program-candidate-card > strong,
.program-candidate-card .requester-actions,
.program-candidate-card label.full-row {
  grid-column: 1 / -1;
}

.program-candidate-card > .full-row {
  grid-column: 1 / -1;
}

.program-candidate-card textarea,
.program-candidate-card input {
  width: 100%;
}

.program-candidate-card select {
  width: 100%;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.range-row input[type="range"] {
  flex: 1 1 auto;
}

.range-row span {
  min-width: 2ch;
  text-align: right;
  font-family: "IBM Plex Mono", monospace;
}

#program-candidate-participants-list {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0.375rem;
  padding: 0.5rem;
  background: rgba(148, 163, 184, 0.05);
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 0.5rem;
}

.program-participant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  gap: 0.5rem;
}

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

.program-participant-row .participant-info {
  flex: 1;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-participant-row .participant-remove {
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  border: none;
  background: none;
  cursor: pointer;
  color: #ef4444;
  min-width: 2rem;
}

.program-participant-row .participant-remove:hover {
  background: rgba(239, 68, 68, 0.1);
  border-radius: 0.25rem;
}

#program-candidate-moderator-adhoc-display {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(59, 130, 246, 0.05);
  border-left: 2px solid rgb(59, 130, 246);
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

#program-candidate-moderator-adhoc-display small {
  color: rgb(100, 116, 139);
  font-weight: 500;
}

#program-candidate-moderator-adhoc-name {
  font-weight: 600;
  color: rgb(30, 58, 138);
}

.program-candidate-card .pwser-consent-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.1rem;
}

.program-candidate-card .pwser-toggle-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.program-candidate-card .pwser-toggle-label {
  margin: 0;
  padding: 0.18rem 0.58rem;
  font-size: 0.74rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(148, 163, 184, 0.35);
  user-select: none;
}

.program-candidate-card .pwser-consent-toggle .pwser-toggle-label:last-of-type {
  border-right: 0;
}

.program-candidate-card .pwser-toggle-input:checked + .pwser-toggle-label {
  background: #f59e0b;
  color: #111827;
}

.program-candidate-card #program-candidate-consents-wrap {
  grid-column: span 1;
}

.consent-inline {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.18rem;
}

.consent-inline-label {
  font-size: 0.72rem;
  color: #94a3b8;
  min-width: 6.4rem;
}

.program-candidate-actions {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.program-candidate-actions-left,
.program-candidate-actions-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.program-candidate-inline-flags {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.25rem;
  font-size: 0.74rem;
  color: #cbd5e1;
}

.program-candidate-assets-inline {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.program-assets-count {
  min-width: 2.1rem;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  background: rgba(15, 23, 42, 0.65);
  color: #e2e8f0;
}

.program-assets-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.75);
  max-height: 210px;
}

.program-assets-filters {
  display: grid;
  grid-template-columns: 170px 180px 1fr auto;
  gap: 0.35rem;
  padding: 0.4rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.82);
}

.program-assets-filters input,
.program-assets-filters select {
  width: 100%;
  min-height: 34px;
  height: 34px;
  line-height: 1.2;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}

.program-assets-top-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.program-assets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.program-assets-table th,
.program-assets-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0.35rem 0.45rem;
  white-space: normal;
  color: #cbd5e1;
  vertical-align: top;
}

.program-assets-table thead th {
  background: rgba(15, 23, 42, 0.9);
}

.program-assets-table th:nth-child(1),
.program-assets-table td:nth-child(1) {
  width: 110px;
}

.program-assets-table th:nth-child(4),
.program-assets-table td:nth-child(4) {
  width: 70px;
  text-align: center;
}

.program-assets-table th:nth-child(5),
.program-assets-table td:nth-child(5) {
  width: 120px;
}

.program-assets-table th:nth-child(6),
.program-assets-table td:nth-child(6) {
  width: 230px;
  white-space: nowrap;
}

.program-assets-table a {
  color: #93c5fd;
  word-break: break-all;
}

.program-assets-table th:nth-child(3),
.program-assets-table td:nth-child(3) {
  max-width: 380px;
}

.program-assets-table td:nth-child(3) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.program-assets-actions button {
  font-size: 0.74rem;
  padding: 0.14rem 0.42rem;
}

.program-assets-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}

.program-assets-top {
  display: grid;
  gap: 0.45rem;
}

.program-assets-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem;
  background: rgba(15, 23, 42, 0.6);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem 0.65rem;
  align-items: start;
}

.program-assets-editor label {
  display: grid;
  gap: 0.28rem;
  font-size: 0.75rem;
  color: #cbd5e1;
}

#program-assets-kind-wrap {
  grid-column: span 1;
}

#program-assets-public-wrap {
  grid-column: span 1;
}

#program-assets-url-wrap {
  grid-column: span 2;
}

#program-assets-kind-input {
  font-size: 0.78rem;
}

#program-assets-file-wrap {
  grid-column: span 2;
}

#program-assets-public-wrap .pwser-consent-toggle {
  margin-top: 0;
  width: fit-content;
  display: grid;
  grid-template-columns: auto auto;
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.5);
  overflow: hidden;
  height: 24px;
}

#program-assets-public-wrap .pwser-toggle-label {
  padding: 0 0.5rem;
  font-size: 0.7rem;
  line-height: 24px;
  min-width: 36px;
  text-align: center;
}

.program-assets-table tbody tr {
  height: 42px;
}

.program-assets-empty-pad td {
  color: transparent;
}

.program-assets-editor input,
.program-assets-editor select,
.program-assets-editor textarea {
  width: 100%;
}

#program-assets-title-wrap {
  grid-column: span 2;
}

#program-assets-description-wrap {
  grid-column: span 3;
  grid-row: span 2;
}

#program-assets-notes-wrap {
  grid-column: span 2;
  grid-row: span 2;
}

#program-assets-title-input,
#program-assets-description-input,
#program-assets-notes-input {
  min-height: 38px;
  height: 38px;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

#program-assets-description-input,
#program-assets-notes-input {
  resize: none;
  min-height: 94px;
  height: 94px;
}

.program-assets-editor .requester-actions {
  grid-column: 6 / 7;
  grid-row: span 2;
  margin-top: 0;
  display: grid;
  align-content: end;
  gap: 0.35rem;
  justify-content: stretch;
  align-self: end;
}

.program-assets-editor .requester-actions button {
  width: 100%;
}

.program-assets-editor.is-focused {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 1px;
}

.program-assets-status {
  margin-right: 0.25rem;
  font-size: 0.78rem;
  color: #93c5fd;
  min-height: 1.1rem;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.program-assets-row-active {
  background: rgba(14, 116, 144, 0.22);
}

.program-assets-tree-card {
  width: min(1180px, 95vw);
  max-height: 88vh;
}

.program-assets-tree-body {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.78);
  padding: 0.55rem 0.65rem;
  max-height: 68vh;
  overflow: auto;
  font-size: 0.84rem;
}

.program-assets-tree-published-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.program-assets-tree-published-indicator.off {
  background: #ef4444;
}

.program-assets-tree-published-indicator.on {
  background: #22c55e;
}

.program-assets-tree-root,
.program-assets-tree-assets {
  list-style: none;
  margin: 0;
  padding: 0;
}

.program-assets-tree-session {
  margin-bottom: 0.6rem;
}

.program-assets-tree-session > .program-assets-tree-session-title {
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 0.25rem;
}

.program-assets-tree-candidate {
  margin: 0.28rem 0;
  padding: 0.28rem 0.4rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.5);
}

.program-assets-tree-candidate-title {
  font-weight: 600;
  color: #e2e8f0;
}

.program-assets-tree-asset {
  margin-left: 0.4rem;
  color: #cbd5e1;
}

.program-assets-tree-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.program-assets-tree-dot.ok {
  background: #22c55e;
}

.program-assets-tree-dot.ko {
  background: #ef4444;
}

.program-assets-tree-empty {
  color: #94a3b8;
  font-style: italic;
}

@media (max-width: 1100px) {
  .program-assets-filters {
    grid-template-columns: 1fr 1fr;
  }

  .program-assets-filters input {
    grid-column: 1 / -1;
  }

  .program-assets-top-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .program-assets-editor {
    grid-template-columns: 1fr;
  }

  #program-assets-kind-wrap,
  #program-assets-public-wrap,
  #program-assets-url-wrap,
  #program-assets-file-wrap,
  #program-assets-title-wrap,
  #program-assets-description-wrap,
  #program-assets-notes-wrap {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .program-assets-editor .requester-actions {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

#config-view {
  overflow: auto;
  padding-right: 0.35rem;
}

#publish-view {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.55rem;
  min-height: 0;
}

#archive-view {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.55rem;
  min-height: 0;
}

#help-view {
  min-height: 0;
}

.archive-toolbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.archive-toolbar-field {
  display: grid;
  gap: 0.2rem;
  font-size: 0.74rem;
  color: #cbd5e1;
}

.archive-toolbar-field select {
  min-width: 120px;
}

.archive-status {
  color: #93c5fd;
  font-size: 0.78rem;
}

.archive-grid {
  display: grid;
  grid-template-columns: minmax(420px, 58%) 1fr;
  gap: 0.7rem;
  min-height: 0;
}

.archive-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.4);
  padding: 0.45rem;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
}

.archive-panel h3 {
  margin: 0 0 0.35rem 0;
  font-size: 0.84rem;
  color: #e2e8f0;
}

.archive-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.archive-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.archive-table th,
.archive-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0.34rem 0.42rem;
  text-align: left;
}

.archive-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(15, 23, 42, 0.95);
}

.archive-table tbody tr {
  cursor: pointer;
}

.archive-table tbody tr:hover {
  background: rgba(30, 64, 175, 0.16);
}

.archive-table tbody tr.active {
  background: rgba(14, 116, 144, 0.28);
}

.archive-detail-body {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem;
  background: rgba(2, 6, 23, 0.55);
  font-size: 0.8rem;
}

.archive-kv {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0.2rem 0.6rem;
  margin-bottom: 0.55rem;
}

.archive-kv b {
  color: #93c5fd;
}

.archive-subtitle {
  margin: 0.45rem 0 0.25rem 0;
  color: #cbd5e1;
  font-size: 0.78rem;
}

.archive-list {
  margin: 0;
  padding-left: 1rem;
}

.archive-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem 0.55rem;
}

.archive-edit-grid label {
  display: grid;
  gap: 0.18rem;
  font-size: 0.72rem;
  color: #cbd5e1;
}

.archive-edit-grid input,
.archive-edit-grid textarea,
.archive-edit-grid select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 6px;
  background: #020617;
  color: #e2e8f0;
  padding: 0.3rem 0.42rem;
  font-size: 0.76rem;
}

.archive-edit-grid textarea {
  resize: vertical;
  min-height: 2.8rem;
}

.archive-edit-grid .archive-edit-wide {
  grid-column: 1 / -1;
}

.archive-asset-grid {
  margin-top: 0.35rem;
}

.archive-actions {
  margin-top: 0.4rem;
  display: flex;
  justify-content: flex-end;
}

.archive-audit-toolbar {
  display: flex;
  align-items: end;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.archive-audit-toolbar label {
  display: grid;
  gap: 0.18rem;
  font-size: 0.72rem;
  color: #cbd5e1;
}

.archive-audit-toolbar select {
  min-width: 120px;
}

.archive-audit-body {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.5);
  min-height: 120px;
  max-height: 210px;
  overflow: auto;
  padding: 0.34rem 0.4rem;
  display: grid;
  gap: 0.33rem;
}

.archive-audit-row {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.45);
  padding: 0.32rem 0.4rem;
  display: grid;
  gap: 0.14rem;
}

.archive-audit-main {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.73rem;
}

.archive-audit-when {
  color: #93c5fd;
}

.archive-audit-entity {
  color: #f8fafc;
}

.archive-audit-action {
  color: #fcd34d;
}

.archive-audit-actor {
  color: #cbd5e1;
}

.archive-audit-diff {
  color: #94a3b8;
  font-size: 0.7rem;
}

.archive-audit-empty {
  color: #94a3b8;
  font-size: 0.76rem;
}

.help-frame {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #020617;
}

.publish-toolbar {
  display: flex;
  gap: 0.5rem;
}

.publish-output {
  margin: 0;
  background: #020617;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem;
  overflow: auto;
  white-space: pre-wrap;
}

.publish-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.8rem;
}

.new-edition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.new-edition-grid label {
  display: grid;
  gap: 0.25rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.new-edition-grid input,
.new-edition-grid textarea {
  box-sizing: border-box;
  width: 100%;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.45rem;
}

.new-edition-vars {
  grid-column: 1 / -1;
}

.new-edition-files {
  margin: 0.8rem 0 0;
  padding: 0.7rem;
  white-space: pre-wrap;
  color: var(--text-muted);
  background: var(--bg-code);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.new-edition-warning-card p {
  margin: 0.35rem 0 0.7rem;
  color: #fca5a5;
  line-height: 1.4;
}

.new-edition-existing-warning {
  margin-top: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  background: rgba(120, 53, 15, 0.35);
  color: #fde68a;
  font-size: 0.82rem;
  line-height: 1.35;
}

.new-edition-session-choice {
  display: grid;
  gap: 0.25rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 0.35rem;
}

@media (max-width: 800px) {
  .new-edition-grid { grid-template-columns: 1fr; }
  .new-edition-vars { grid-column: auto; }
}

.bottom-panel {
  grid-area: bottom;
  border-top: 1px solid var(--line);
  padding: 0.8rem 1rem;
  background: rgba(15, 23, 42, 0.95);
  display: grid;
  gap: 0.6rem;
}

#command-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: center;
}

#command-input {
  width: 100%;
}

.messages {
  margin: 0;
  background: #020617;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem;
  height: 110px;
  overflow: auto;
}

.repo-info {
  display: grid;
  gap: 0.45rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
}

.repo-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem;
  background: rgba(15, 23, 42, 0.5);
}

.repo-good {
  border-color: #14532d;
}

.repo-warn {
  border-color: #854d0e;
}

.repo-bad {
  border-color: #7f1d1d;
}

.repo-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
}

.repo-title {
  color: #e2e8f0;
  font-weight: 600;
}

.repo-actions {
  display: flex;
  gap: 0.25rem;
}

.repo-badges {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.repo-badge {
  font-size: 0.7rem;
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--line);
}

.repo-badge.good {
  background: rgba(22, 163, 74, 0.2);
  border-color: #166534;
}

.repo-badge.warn {
  background: rgba(245, 158, 11, 0.2);
  border-color: #92400e;
}

.repo-badge.bad {
  background: rgba(239, 68, 68, 0.2);
  border-color: #991b1b;
}

.repo-badge.neutral {
  background: rgba(51, 65, 85, 0.35);
}

.repo-last {
  margin-top: 0.35rem;
  font-size: 0.72rem;
}

.repo-last pre {
  margin: 0.35rem 0 0 0;
  max-height: 120px;
  overflow: auto;
  background: #020617;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.4rem;
}

.repo-btn {
  background: #0b1220;
  color: #cbd5e1;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  line-height: 1.1;
  font-size: 0.78rem;
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.2rem;
}

.file-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

#open-vars-org {
  margin-left: auto;
}

.status-legend {
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  color: #94a3b8;
}

.tab-btn {
  background: #0b1220;
  color: #cbd5e1;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
}

.tab-btn.active {
  background: #f59e0b;
  color: #111827;
}

#logout-button {
  background: #b91c1c;
  color: #fee2e2;
  border: 1px solid #7f1d1d;
  font-weight: 700;
  width: 34px;
  min-width: 34px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  line-height: 1;
}

#logout-button:hover {
  background: #dc2626;
}

.file-list li {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.file-btn {
  all: unset;
  cursor: pointer;
  color: #cbd5e1;
}

.file-btn:hover {
  color: #f59e0b;
}

.org-icon {
  margin-right: 0.18rem;
}

.org-path {
  margin-left: 0.25rem;
}

.message {
  min-height: 1.25rem;
  color: #fda4af;
}

.file-context-menu {
  position: fixed;
  z-index: 10000;
  background: #0b1220;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.25rem;
  display: grid;
  gap: 0.2rem;
  min-width: 150px;
}

.file-context-menu.hidden {
  display: none;
}

.file-context-menu button {
  background: #111827;
  color: #cbd5e1;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.3rem 0.45rem;
  font-size: 0.78rem;
  text-align: left;
}

.moderator-selector-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 0.5rem 0;
}

.moderator-selector-item {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.moderator-selector-item:hover {
  background-color: var(--bg-subtle);
}

.moderator-selector-item input[type="radio"] {
  margin: 0;
}

.moderator-selector-item.selected {
  background-color: var(--accent-light);
  font-weight: 600;
}

.moderator-adhoc-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 1rem 0;
}

.moderator-adhoc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.8rem;
}

.moderator-adhoc-grid label {
  display: flex;
  flex-direction: column;
}

.moderator-adhoc-grid input {
  width: 100%;
  margin-top: 0.3rem;
}

.moderator-adhoc-full {
  display: flex;
  flex-direction: column;
}

.moderator-adhoc-full textarea {
  margin-top: 0.3rem;
  width: 100%;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 56px 260px 1fr 180px;
    grid-template-areas:
      "top"
      "left"
      "center"
      "bottom";
  }

  .status-bar {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .status-left,
  .status-right {
    flex-wrap: wrap;
  }

  #status-text {
    margin-left: 0;
  }

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

/* Session configuration modal */
.program-config-card {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
}

.program-config-card .config-header {
  margin-bottom: 0.5rem;
}

.program-config-card .config-header h2 {
  margin: 0 0 0.25rem 0;
  font-size: 1.3rem;
  color: #f1f5f9;
}

.program-config-card .config-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

.config-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.2rem !important;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #e2e8f0;
  font-weight: 500;
  cursor: pointer;
}

.field-icon {
  font-size: 1.1rem;
}

.field-label {
  flex: 1;
}

.field-hint {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  margin-left: 1.6rem;
}

.form-group input[type="url"],
.form-group textarea {
  background: #020617;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input[type="url"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1);
}

.checkbox-group {
  gap: 0.6rem;
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 0.6rem;
  margin: 0 !important;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #0ea5e9;
}

.checkbox-text {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #e2e8f0;
}

.config-status {
  min-height: 1.5rem;
  font-size: 0.9rem;
  color: #cbd5e1;
  margin: 0;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.1);
}

.btn-primary,
.btn-secondary {
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: white;
  flex: 1;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  background: #334155;
  color: #e2e8f0;
}

.program-config-card .requester-actions {
  display: flex !important;
  gap: 0.6rem;
  margin-top: 1rem;
}
