/* Administration: local navigation and genuine controls, layered over base styles. */
.admin-view {
  background: #f4f3ed;
  color: #23251f;
  --admin-border: #dfe1d7;
  --admin-purple: #694ab4;
  --admin-muted: #62685b;
}
.admin-view .topbar {
  padding: 17px max(24px, 4vw);
}
.admin-view .brand {
  font-size: 1.55rem;
}
.admin-view .brand span {
  font-size: 0.58rem;
}
.admin-view .mode-note {
  padding: 8px max(24px, 4vw);
  font-size: 0.72rem;
}
.admin-view .dashboard-shell.wrap {
  max-width: 1600px;
  padding: 34px max(24px, 4vw) 64px;
}
.admin-view .dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.admin-view .dashboard-header h1 {
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  line-height: 1.15;
  letter-spacing: -0.045em;
}
.admin-view .dashboard-header p {
  color: var(--admin-muted);
  font-size: 0.84rem;
  margin-top: 7px;
}
.admin-view .dashboard-header .eyebrow {
  margin-bottom: 8px;
}
.admin-view .dashboard-header .actions {
  align-items: center;
  justify-content: flex-end;
}
.admin-view .dashboard-header .account {
  padding: 0;
}
.admin-view .dashboard-header .button:not(.secondary) {
  background: var(--lime);
  color: #253213;
  border: 1px solid #bccd8b;
}
.admin-view .dashboard-header .button:not(.secondary):hover {
  background: #d0ee7c;
}
.admin-view .overview-strip {
  background: #fafbf6;
  margin-bottom: 28px;
  border-color: var(--admin-border);
  border-radius: 12px;
}
.admin-view .overview-strip .stat {
  padding: 17px 22px;
  gap: 5px;
}
.admin-view .overview-strip .stat strong {
  font-size: 1.65rem;
}
.admin-view .overview-strip .stat span {
  color: var(--admin-muted);
  font-size: 0.73rem;
  line-height: 1.45;
}
.admin-view .workspace {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.admin-view .library {
  min-width: 0;
}
.admin-view .library-tools {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.admin-view .library-tools input {
  background: #fffefa;
  font-size: 0.82rem;
  min-height: 44px;
  border-color: #c9cdbf;
}
.admin-view .library-tools .field {
  gap: 7px;
  color: var(--admin-muted);
}
.admin-view .library-filters {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.admin-view .library-filters button {
  flex: 1;
  min-height: 36px;
  padding: 8px 9px;
  border: 1px solid #d0d4c6;
  border-radius: 7px;
  background: transparent;
  color: #505747;
  font-size: 0.72rem;
}
.admin-view .library-filters button[aria-pressed="true"] {
  color: #51318d;
  border-color: #b7a5d7;
  background: #ece5f6;
  font-weight: 650;
}
.admin-view .library .experience-list {
  display: flex;
  gap: 9px;
}
.admin-view .library .experience-card {
  width: 100%;
  min-width: 0;
  padding: 17px;
  gap: 8px;
  border-color: #dfe1d6;
  border-radius: 10px;
  background: #fafaf4;
  transition: background-color 0.12s ease;
}
.admin-view .library .experience-card strong {
  font-size: 0.91rem;
  line-height: 1.4;
}
.admin-view .library .experience-card .muted {
  font-size: 0.72rem;
  line-height: 1.55;
}
.admin-view .library .experience-card .eyebrow {
  font-size: 0.59rem;
  letter-spacing: 0.1em;
}
.admin-view .library .experience-card .pill {
  align-self: flex-start;
  font-size: 0.6rem;
  padding: 5px 8px;
}
.admin-view .library .experience-card:hover {
  background: #f0edf7;
  border-color: #c0afd9;
}
.admin-view .library .experience-card[aria-pressed="true"] {
  background: #eee8f6;
  border-color: #9e84c6;
  box-shadow: inset 3px 0 var(--admin-purple);
}
.admin-view .library .experience-card.archived:not([aria-pressed="true"]) {
  background: #eeeee7;
}
.admin-view .library .empty {
  padding: 20px;
  font-size: 0.79rem;
}
.admin-view .event-editor.editor {
  padding: 25px 28px 30px;
  border-color: var(--admin-border);
  background: #fffefa;
  box-shadow: 0 4px 18px #22280d03;
  overflow: hidden;
}
.admin-view .event-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
}
.admin-view .event-header > div {
  min-width: 0;
}
.admin-view .event-header h2 {
  margin: 9px 0 7px;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.admin-view .event-header .actions {
  justify-content: flex-end;
  max-width: 320px;
}
.admin-view .event-header .eyebrow {
  line-height: 1.7;
}
.admin-view .event-header .button {
  white-space: normal;
}
.admin-view .event-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--admin-border);
  margin-bottom: 26px;
  padding-bottom: 0;
}
.admin-view .event-tab {
  flex: 1;
  min-height: 46px;
  border-radius: 6px 6px 0 0;
  padding: 12px 10px;
  background: transparent;
  color: #626958;
  font-size: 0.82rem;
  font-weight: 650;
  border-bottom: 3px solid transparent;
}
.admin-view .event-tab:hover {
  background: #f2f0f7;
  color: #553a90;
}
.admin-view .event-tab[aria-selected="true"] {
  border-bottom-color: var(--admin-purple);
  color: #593997;
  background: #f1ecf8;
}
.admin-view .event-panel {
  min-width: 0;
}
.admin-view .event-panel > h3,
.admin-view .event-panel > h2 {
  margin-bottom: 12px;
}
.admin-view .event-panel > p {
  margin: 0 0 20px;
  color: var(--admin-muted);
  font-size: 0.85rem;
}
.admin-view .setup-script,
.admin-view .live-script {
  margin-top: 19px;
}
.admin-view .run-heading {
  font-size: 1rem;
  margin: 22px 0 12px;
}
.admin-view .activity {
  padding: 21px 0;
}
.admin-view .activity h3 {
  font-size: 1.02rem;
  line-height: 1.5;
}
.admin-view .activity-top {
  gap: 8px;
  margin-bottom: 11px;
}
.admin-view .run-number {
  font-size: 0.86rem;
  min-width: 25px;
}
.admin-view .activity .pill {
  font-size: 0.61rem;
  padding: 6px 9px;
}
.admin-view .setup-script .activity {
  padding: 18px 0;
}
.admin-view .setup-script .activity details {
  margin: 12px 0 0;
  padding: 12px 15px;
  border-radius: 7px;
  background: #f8f9f3;
}
.admin-view .setup-script .activity summary {
  font-weight: 500;
  font-size: 0.76rem;
  color: #5b6450;
}
.admin-view .setup-script .activity ol {
  margin: 10px 0 0;
  font-size: 0.8rem;
}
.admin-view .setup-script .activity .actions {
  margin-top: 13px;
}
.admin-view .panel-prepare > details {
  margin-top: 25px;
  background: #f8f9f3;
  border-color: #d6dccb;
}
.admin-view .panel-prepare > details[open] {
  background: #fdfdf8;
}
.admin-view .production-panels {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin: 0 0 26px;
}
.admin-view .production-panels > section {
  min-width: 0;
  padding: 20px;
  border-color: #d9dece;
  border-radius: 10px;
}
.admin-view .cue-control {
  background: #f2f6e9;
}
.admin-view .screen-control {
  background: #f0ebf8;
}
.admin-view .production-panels .eyebrow {
  font-size: 0.61rem;
  letter-spacing: 0.12em;
}
.admin-view .production-panels h3 {
  font-size: 1rem;
  margin: 12px 0;
}
.admin-view .production-panels p {
  font-size: 0.77rem;
  line-height: 1.65;
}
.admin-view .production-panels .button {
  min-height: 42px;
}
.admin-view .cue-control .button:not(.secondary) {
  background: var(--lime);
  color: #28321a;
  border: 1px solid #c3d58d;
}
.admin-view .live-script .activity {
  border: 1px solid var(--admin-border);
  padding: 18px;
  border-radius: 10px;
  margin-top: 12px;
  background: #fcfcf6;
}
.admin-view .live-script .activity ol {
  margin-bottom: 16px;
}
.admin-view .live-script .actions {
  margin-top: 14px;
}
.admin-view .live-script .projection-actions {
  border-top: 1px solid #e1e1d8;
  padding-top: 9px;
  margin-top: 14px;
}
.admin-view .panel-share .sharing-card {
  border: 1px solid var(--admin-border);
  background: #fafbf5;
  margin: 16px 0 22px;
}
.admin-view .panel-share .sharing-actions {
  gap: 10px;
}
.admin-view .panel-share .sharing-actions input {
  font-size: 0.8rem;
}
.admin-view .panel-share .share-code {
  font-size: 1.25rem;
  margin-top: 14px;
  color: #51358a;
}
.admin-view .panel-results .metrics {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}
.admin-view .panel-results .stats {
  border-radius: 10px;
  border-color: var(--admin-border);
}
.admin-view .panel-results .stat {
  min-width: 0;
}
.admin-view .panel-results .stat span {
  line-height: 1.5;
  color: var(--admin-muted);
}
.admin-view .panel-results .metric-row {
  padding: 17px 0;
  align-items: center;
  line-height: 1.6;
}
.admin-view .panel-results .metric-row > span {
  flex: 1 1 180px;
}
.admin-view .panel-results .metric-row strong {
  color: #4d3a6b;
  font-weight: 600;
  font-size: 0.75rem;
}
.admin-view .panel-results details {
  background: #f7f7f0;
  font-size: 0.78rem;
  line-height: 1.7;
}
.admin-view .panel-results details p {
  margin-top: 13px;
  color: #5d6454;
}
.admin-view .event-panel .empty {
  margin: 14px 0;
}
.admin-view .event-panel .button.small {
  min-height: 38px;
}
.admin-view button:focus-visible,
.admin-view a:focus-visible,
.admin-view input:focus-visible,
.admin-view select:focus-visible,
.admin-view textarea:focus-visible,
.admin-view summary:focus-visible {
  outline: 3px solid #7854bb;
  outline-offset: 3px;
}
.admin-view button:disabled {
  cursor: default;
  opacity: 0.55;
}
.admin-view footer {
  font-size: 0.61rem;
}
.admin-view .dialog h2 {
  line-height: 1.3;
}
@media (min-width: 1500px) {
  .admin-view .workspace {
    gap: 28px;
  }
}
@media (max-width: 1100px) {
  .admin-view .workspace {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
  }
  .admin-view .event-editor.editor {
    padding: 22px;
  }
  .admin-view .event-header {
    flex-direction: column;
    gap: 12px;
  }
  .admin-view .event-header .actions {
    max-width: none;
    justify-content: flex-start;
  }
  .admin-view .production-panels {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .admin-view .dashboard-shell.wrap {
    padding: 26px 20px 48px;
  }
  .admin-view .dashboard-header {
    flex-wrap: wrap;
    gap: 18px;
    align-items: start;
  }
  .admin-view .dashboard-header .actions {
    justify-content: flex-start;
  }
  .admin-view .dashboard-header .account {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .admin-view .overview-strip .stat {
    padding: 15px 13px;
  }
  .admin-view .overview-strip .stat strong {
    font-size: 1.4rem;
  }
  .admin-view .overview-strip .stat span {
    font-size: 0.67rem;
  }
  .admin-view .workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .admin-view .library-tools {
    margin-bottom: 12px;
  }
  .admin-view .library-filters button {
    min-height: 44px;
  }
  .admin-view .library .experience-list {
    display: flex;
    flex-direction: column;
    max-height: 330px;
    overflow: auto;
    padding: 4px;
    margin: -4px;
  }
  .admin-view .library .experience-card {
    padding: 15px;
    gap: 7px;
  }
  .admin-view .event-editor.editor {
    padding: 20px 17px 24px;
    border-radius: 12px;
    overflow: visible;
  }
  .admin-view .event-header {
    padding-bottom: 19px;
  }
  .admin-view .event-header h2 {
    font-size: 1.55rem;
  }
  .admin-view .event-tabs {
    gap: 0;
    margin-bottom: 22px;
  }
  .admin-view .event-tab {
    min-width: 0;
    min-height: 48px;
    padding: 10px 3px;
    font-size: 0.73rem;
  }
  .admin-view .event-panel .button,
  .admin-view .event-panel .button.small,
  .admin-view .event-header .button,
  .admin-view .event-panel .text-button {
    min-height: 44px;
  }
  .admin-view .event-panel .actions {
    gap: 9px;
  }
  .admin-view .activity-top {
    row-gap: 9px;
  }
  .admin-view .activity-top .button {
    min-width: 44px;
  }
  .admin-view .production-panels > section {
    padding: 18px;
  }
  .admin-view .live-script .activity {
    padding: 17px 14px;
  }
  .admin-view .live-script .activity > .actions:not(.projection-actions) {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-view .panel-share .sharing-card {
    padding: 17px 14px;
    gap: 18px;
  }
  .admin-view .panel-share .sharing-actions > .button {
    flex: 1 1 100%;
  }
  .admin-view .panel-results .stats {
    grid-template-columns: 1fr;
  }
  .admin-view .panel-results .stat {
    padding: 15px 17px;
  }
  .admin-view .panel-results .stat + .stat {
    border-left: 0;
    border-top: 1px solid var(--admin-border);
  }
  .admin-view .panel-results .stat strong {
    font-size: 1.6rem;
  }
  .admin-view .panel-results .stat span {
    font-size: 0.75rem;
  }
}
@media (max-width: 390px) {
  .admin-view .dashboard-shell.wrap {
    padding-left: 15px;
    padding-right: 15px;
  }
  .admin-view .event-editor.editor {
    padding-left: 14px;
    padding-right: 14px;
  }
  .admin-view .event-tab {
    font-size: 0.69rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .admin-view .experience-card {
    transition: none;
  }
}

.admin-view .stage-note {
  margin: 0 0 24px;
  max-width: 720px;
}
.admin-view .stage-note h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}
.admin-view .stage-note p {
  font-size: 0.84rem;
  color: var(--admin-muted);
}
.admin-view .overview-strip {
  margin-bottom: 8px;
}
.admin-view .overview-caption {
  margin-bottom: 26px;
  font-size: 0.68rem;
}
.admin-view .library-tools h2 {
  font-size: 0.9rem;
  letter-spacing: 0;
}
.admin-view .onboarding-empty {
  padding: 48px 24px;
  display: grid;
  gap: 20px;
  max-width: 680px;
  margin: 24px auto;
}
.admin-view .archive-note {
  background: #eeeaf6;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.82rem;
  margin-bottom: 16px;
}

.admin-view .auth-description {
  margin: 12px 0 24px;
  font-size: 0.88rem;
}
.admin-view .auth-panel h2 {
  margin: 12px 0;
}
.admin-view .auth-steps {
  padding-left: 22px;
  margin: 28px 0;
  line-height: 2.3;
  color: var(--admin-muted);
  font-size: 0.9rem;
}
.admin-view .auth-switch {
  margin-top: 20px;
  font-size: 0.85rem;
}

/* Read-only monitors reuse the operator snapshot; no participant sessions or exposures. */
.admin-view .live-monitor {
  margin: 16px 0;
}
.admin-view .monitor-viewport {
  border: 1px solid #43413f;
  background: #24232d;
  color: #faf9f5;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.admin-view .monitor-screen {
  aspect-ratio: 16 / 9;
  max-height: 220px;
  border-radius: 7px;
}
.admin-view .monitor-phone {
  width: 190px;
  height: 245px;
  max-width: 100%;
  margin: auto;
  border: 5px solid #343339;
  border-radius: 20px;
  background: linear-gradient(145deg, #352c50, #22252b);
}
.admin-view .monitor-content {
  padding: 14px;
  overflow-wrap: anywhere;
}
.admin-view .monitor-brand {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #dfff82;
}
.admin-view .monitor-content h4 {
  color: #fff;
  font-size: 15px;
  line-height: 1.2;
  margin: 7px 0 12px;
}
.admin-view .monitor-content h5 {
  color: #282b25;
  font-size: 12px;
  line-height: 1.35;
  margin: 6px 0 10px;
}
.admin-view .monitor-question {
  background: #fffef8;
  color: #282b25;
  border-radius: 9px;
  padding: 10px;
  margin: 8px 0;
}
.admin-view .monitor-state {
  font-size: 8px;
  color: #654896;
  font-weight: 750;
}
.admin-view .monitor-options {
  display: grid;
  gap: 5px;
}
.admin-view .monitor-option {
  display: flex;
  gap: 7px;
  border: 1px solid #dedbe5;
  padding: 6px;
  border-radius: 5px;
  font-size: 10px;
  line-height: 1.3;
}
.admin-view .monitor-option > span:first-child {
  color: #7651a0;
  font-size: 8px;
}
.admin-view .monitor-confirm {
  background: #dfff82;
  color: #282b25;
  font-size: 9px;
  padding: 7px;
  margin-top: 8px;
  border-radius: 5px;
  text-align: center;
  font-weight: 700;
}
.admin-view .monitor-message {
  color: #f2edf8;
  font-size: 12px;
  line-height: 1.5;
}
.admin-view .monitor-room {
  color: #dfff82;
  font-size: 10px;
  letter-spacing: 0.12em;
}
.admin-view .monitor-question p {
  color: #514c59;
  font-size: 10px;
  line-height: 1.4;
}
.admin-view .monitor-result {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 6px;
  margin: 7px 0;
  font-size: 10px;
}
.admin-view .monitor-result progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 5px;
  accent-color: #7957b4;
}
.admin-view .live-monitor figcaption {
  color: #5c6056;
  font-size: 10px;
  line-height: 1.45;
  margin-top: 7px;
}

.admin-view .monitor-viewport::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
.admin-view .monitor-viewport::-webkit-scrollbar-thumb {
  background: #77717f;
  border-radius: 4px;
}
.admin-view .sync-badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--muted);
}
.admin-view .sync-badge[data-state="live"] {
  color: #2f7d32;
}

.lead-settings,
.lead-results {
  margin-top: 24px;
}
.lead-settings fieldset,
.lead-settings label {
  display: grid;
  gap: 12px;
}
.lead-settings fieldset {
  padding: 20px;
  border: 1px solid var(--border, #ddd);
  border-radius: 12px;
}
.lead-settings textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
}
.lead-settings .lead-consent {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lead-settings input[type="checkbox"] {
  width: 20px;
  height: 20px;
}
