/* Club Lounge — instructor card + manage overlay */

.cl-instr-card {
  margin-top: 14px;
}

.cl-instr-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.cl-instr-card__head h2 {
  margin: 0;
}

.cl-instr-rule {
  height: 2px;
  margin: 36px 0;
  border: 0;
  border-radius: 2px;
  background: #22c55e;
  opacity: 0.85;
}

.cl-instr-section__title {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rcs-muted, #94a3b8);
}

.cl-instr-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cl-instr-kpi {
  text-align: center;
  padding: 8px 4px;
}

.cl-instr-kpi__val {
  font-size: 1.15rem;
  font-weight: 800;
}

.cl-instr-kpi__lbl {
  font-size: 0.72rem;
  color: var(--rcs-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cl-instr-live-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cl-instr-live {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.cl-instr-live__dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  flex: 0 0 auto;
}

.cl-instr-live__names {
  font-weight: 700;
}

.cl-instr-live__sep {
  color: #22c55e;
  font-weight: 800;
}

.cl-instr-live__ac {
  font-size: 0.85rem;
  color: var(--rcs-muted, #94a3b8);
}

.cl-instr-live--idle {
  margin: 0;
  color: var(--rcs-muted, #94a3b8);
  font-size: 0.9rem;
}

.cl-instr-students {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cl-instr-student {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 0;
  border-top: 1px solid var(--rcs-border, rgba(255, 255, 255, 0.08));
}

.cl-instr-student:first-child {
  border-top: 0;
}

.cl-instr-student--card {
  margin: 8px 0;
  border: 1px solid var(--rcs-border, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  background: color-mix(in srgb, var(--rcs-panel, #111827) 80%, #0b1220);
  overflow: hidden;
}

[data-theme="light"] .cl-instr-student--card {
  background: #fff;
}

.cl-instr-student__hit {
  flex: 1 1 auto;
  display: block;
  text-align: left;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

button.cl-instr-student__hit:hover,
button.cl-instr-student__hit:focus-visible {
  background: rgba(34, 197, 94, 0.08);
}

.cl-instr-student__name {
  font-weight: 700;
}

.cl-instr-student__tag {
  margin-left: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #22c55e;
}

.cl-instr-student__stats {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--rcs-muted, #94a3b8);
}

.cl-instr-student__remove {
  flex: 0 0 auto;
  align-self: center;
  margin-right: 10px;
}

.cl-instr-detail__name {
  margin: 0 0 4px;
  font-size: 1.2rem;
}

.cl-instr-fsp-ops {
  margin: 0 0 12px;
}

.cl-instr-fsp-ops__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  align-items: center;
}

.cl-instr-airframe,
.cl-instr-ailerons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 4px;
}

.cl-instr-airframe__btn,
.cl-instr-ailerons__btn {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  width: 100%;
  font-weight: 800;
  justify-content: flex-start;
  border: 1px solid transparent;
}

.cl-instr-airframe__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 900;
  flex: 0 0 auto;
}

.cl-instr-airframe__btn.is-on {
  background: color-mix(in srgb, #16a34a 22%, var(--rcs-panel, #0f172a));
  border-color: color-mix(in srgb, #22c55e 65%, transparent);
  color: var(--rcs-text, #f8fafc);
  box-shadow: 0 0 0 1px color-mix(in srgb, #22c55e 40%, transparent);
}

.cl-instr-airframe__btn.is-on .cl-instr-airframe__mark {
  background: #16a34a;
  color: #fff;
}

.cl-instr-airframe__btn.is-off {
  background: color-mix(in srgb, #dc2626 18%, var(--rcs-panel, #0f172a));
  border-color: color-mix(in srgb, #ef4444 55%, transparent);
  color: var(--rcs-text, #f8fafc);
}

.cl-instr-airframe__btn.is-off .cl-instr-airframe__mark {
  background: #dc2626;
  color: #fff;
}

[data-theme="light"] .cl-instr-airframe__btn.is-on {
  background: color-mix(in srgb, #16a34a 12%, #fff);
  color: #14532d;
}

[data-theme="light"] .cl-instr-airframe__btn.is-off {
  background: color-mix(in srgb, #dc2626 10%, #fff);
  color: #7f1d1d;
}

.cl-instr-airframe__note {
  margin: 6px 0 0;
}

/* Above student instruction overlay (1200) and FSP picker (1200). */
.cl-instr-airframe-ask,
.cl-instr-ailerons-ask {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.cl-instr-airframe-ask[hidden],
.cl-instr-ailerons-ask[hidden] {
  display: none !important;
}

.cl-instr-airframe-ask__backdrop,
.cl-instr-ailerons-ask__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

[data-theme="light"] .cl-instr-airframe-ask__backdrop,
[data-theme="light"] .cl-instr-ailerons-ask__backdrop {
  background: rgba(15, 23, 42, 0.35);
}

.cl-instr-airframe-ask__panel,
.cl-instr-ailerons-ask__panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 20px 18px 16px;
  border-radius: 14px;
  border: 1px solid var(--rcs-border, rgba(148, 163, 184, 0.28));
  background: var(--rcs-panel, var(--bg-panel, #0f172a));
  color: var(--rcs-text, var(--text, #f8fafc));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .cl-instr-airframe-ask__panel,
[data-theme="light"] .cl-instr-ailerons-ask__panel {
  background: var(--rcs-panel, #ffffff);
  color: var(--rcs-text, #0f172a);
}

.cl-instr-airframe-ask__close,
.cl-instr-ailerons-ask__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--rcs-muted, #94a3b8);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.cl-instr-airframe-ask__title,
.cl-instr-ailerons-ask__title {
  margin: 0 36px 10px 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.cl-instr-airframe-ask__lead,
.cl-instr-ailerons-ask__lead {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: var(--rcs-muted, #94a3b8);
  line-height: 1.4;
}

.cl-instr-airframe-ask__body {
  margin: 0 0 12px;
}

.cl-instr-airframe-ask__acts,
.cl-instr-ailerons-ask__acts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cl-instr-airframe-ask__acts .rcs-btn,
.cl-instr-ailerons-ask__acts .rcs-btn {
  width: 100%;
  min-height: 48px;
  font-weight: 800;
}

.cl-instr-fsp-ops__plan-label {
  flex: 1 0 100%;
  margin: 4px 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--rcs-muted, #94a3b8);
}

.cl-instr-dl {
  margin: 0;
  display: grid;
  gap: 10px;
}

.cl-instr-dl dt {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rcs-muted, #94a3b8);
}

.cl-instr-dl dd {
  margin: 2px 0 0;
  font-weight: 600;
}

.cl-instr-notes {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

.cl-instr-dot {
  margin: 0 6px;
  opacity: 0.5;
}

.cl-instr-empty,
.cl-instr-more,
.cl-instr-claims-hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--rcs-muted, #94a3b8);
}

body.cl-instr-overlay-open {
  overflow: hidden;
  overscroll-behavior: none;
}

/* Overlay covers lounge/instruction toppers (backdrop blur includes them). */
body.cl-instr-overlay-open .rcs-club-lounge-sticky-bar,
body.cl-instr-overlay-open #ci-topper,
body.cl-instr-overlay-open .rcs-club-admin-topper {
  z-index: 1090;
}

body.cl-instr-overlay-open.rcs-footer-member .rcs-footer-page {
  z-index: 1090;
}

.cl-instr-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: calc(8px + env(safe-area-inset-top, 0px)) var(--cl-gutter, 16px) calc(16px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  overscroll-behavior: none;
}

body.rcs-club-lounge-page.rcs-footer-member .cl-instr-overlay {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

.cl-instr-overlay[hidden] {
  display: none !important;
}

.cl-instr-overlay__backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(6, 8, 10, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  touch-action: none;
}

[data-theme="light"] .cl-instr-overlay__backdrop {
  background: rgba(15, 23, 42, 0.35);
}

.cl-instr-overlay__frame {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  max-height: 100%;
  border-radius: 18px;
  border: 1px solid var(--rcs-border);
  background: color-mix(in srgb, var(--rcs-panel, #111827) 94%, transparent);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

[data-theme="light"] .cl-instr-overlay__frame {
  background: rgba(248, 250, 252, 0.98);
}

.cl-instr-overlay__toolbar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--rcs-border);
  flex: 0 0 auto;
}

.cl-instr-overlay__head {
  min-width: 0;
  flex: 1 1 auto;
}

.cl-instr-overlay__title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cl-instr-overlay__who {
  margin: 4px 0 0;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--rcs-text, #e2e8f0);
  word-break: break-word;
}

.cl-instr-overlay__who-email {
  font-weight: 500;
  color: var(--rcs-muted, #94a3b8);
}

.cl-instr-overlay__who[hidden] {
  display: none !important;
}

.cl-instr-overlay__scroll {
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y pinch-zoom;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px 20px;
}

.cl-instr-overlay__sticky {
  flex: 0 0 auto;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--rcs-border);
  background: var(--rcs-panel, #111827);
}

.cl-instr-overlay__sticky .rcs-btn {
  width: 100%;
}

.cl-instr-teaser-hint {
  margin: 12px 0 0;
  font-size: 0.82rem;
  color: var(--rcs-muted, #94a3b8);
}

.cl-instr-pick-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cl-instr-pick-list li {
  padding: 10px 0;
  border-top: 1px solid var(--rcs-border, rgba(255, 255, 255, 0.08));
}

.cl-instr-pick-list li:first-child {
  border-top: 0;
}

.cl-instr-pick-email {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--rcs-muted, #94a3b8);
}

.cl-instr-pick-list__item--blocked {
  opacity: 0.62;
}

.cl-instr-pick-blocked {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--rcs-status, #22c55e);
}

.cl-instr-pick-blocked[hidden] {
  display: none;
}

.cl-instr-field {
  display: block;
  margin: 0 0 10px;
}

/* Direct-child label only — never style spans inside rich body editors */
.cl-instr-field > span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}

.cl-instr-field input,
.cl-instr-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--rcs-border);
  background: var(--rcs-input-bg, #0f172a);
  color: var(--rcs-text);
  font: inherit;
  resize: vertical;
}

.cl-instr-sticky-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cl-instr-sticky-row .rcs-btn {
  width: 100%;
}

.rcs-btn.cl-instr-saved,
.cl-instr-sticky-row .rcs-btn.cl-instr-saved,
.rcs-btn.cl-instr-saved:disabled,
.cl-instr-sticky-row .rcs-btn.cl-instr-saved:disabled {
  background: #22c55e !important;
  border-color: #16a34a !important;
  color: #fff !important;
  opacity: 1 !important;
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.45);
  cursor: default;
  font-weight: 800;
}

.cl-instr-nav-btn-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cl-instr-nav-btn__meta {
  font-size: 0.8rem;
  color: var(--rcs-muted, #94a3b8);
}

.cl-instr-nav-btn {
  width: 100%;
}

.cl-instr-reports {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(48vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cl-instr-report {
  padding: 12px 0;
  border-top: 1px solid var(--rcs-border, rgba(255, 255, 255, 0.08));
}

.cl-instr-report:first-child {
  border-top: 0;
  padding-top: 0;
}

.cl-instr-report__when {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rcs-muted, #94a3b8);
  margin-bottom: 4px;
}

.cl-instr-report__body {
  white-space: pre-wrap;
  line-height: 1.45;
}

.cl-instr-fieldset {
  border: 1px solid var(--rcs-border);
  border-radius: 10px;
  padding: 12px;
  margin: 0 0 12px;
}

.cl-instr-fieldset legend {
  padding: 0 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cl-instr-fieldset .rcs-check {
  display: flex;
  margin: 8px 0;
}

.cl-instr-exam-fields {
  margin-top: 4px;
}

.cl-instr-name-form .rcs-btn {
  margin-top: 4px;
}

.cl-instr-claim {
  padding: 10px 0;
  border-top: 1px solid var(--rcs-border);
}

.cl-instr-claim:first-of-type {
  border-top: 0;
}

.cl-instr-claim__name {
  font-weight: 700;
}

.cl-instr-claim__meta {
  font-size: 0.85rem;
  color: var(--rcs-muted);
}

.cl-instr-claim__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

body.cl-agenda-overlay-open,
body.cl-plans-overlay-open,
body.cl-news-modal-open {
  overscroll-behavior: none;
}

/* FSP attach / replace picker (above student instruction overlay) */
.cl-instr-fsp-pick {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.cl-instr-fsp-pick[hidden] {
  display: none !important;
}

.cl-instr-fsp-pick__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(6, 8, 10, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

[data-theme="light"] .cl-instr-fsp-pick__backdrop {
  background: rgba(15, 23, 42, 0.4);
}

.cl-instr-fsp-pick__panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(72vh, 560px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--rcs-border, rgba(255, 255, 255, 0.12));
  background: var(--rcs-panel, #111827);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  padding: 18px 16px 16px;
  box-sizing: border-box;
}

[data-theme="light"] .cl-instr-fsp-pick__panel {
  background: var(--rcs-panel, #f8fafc);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.cl-instr-fsp-pick__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--rcs-muted, #94a3b8);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.cl-instr-fsp-pick__close:hover {
  color: var(--rcs-text, #f9fafb);
  background: color-mix(in srgb, var(--rcs-border, #334155) 55%, transparent);
}

.cl-instr-fsp-pick__title {
  margin: 0 36px 6px 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rcs-text, #f9fafb);
}

.cl-instr-fsp-pick__lead {
  margin: 0 36px 14px 0;
  font-size: 0.84rem;
  color: var(--rcs-muted, #94a3b8);
}

.cl-instr-fsp-pick__list {
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}

.cl-instr-fsp-pick__row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--rcs-border, rgba(255, 255, 255, 0.12));
  background: color-mix(in srgb, var(--rcs-panel, #111827) 70%, #0b1220);
  color: var(--rcs-text, #f9fafb);
  font: inherit;
  cursor: pointer;
}

[data-theme="light"] .cl-instr-fsp-pick__row {
  background: #fff;
}

.cl-instr-fsp-pick__row:hover,
.cl-instr-fsp-pick__row:focus-visible {
  border-color: color-mix(in srgb, #e10600 55%, var(--rcs-border, #334155));
  outline: none;
}

.cl-instr-fsp-pick__row-title {
  font-size: 0.92rem;
  font-weight: 700;
}

.cl-instr-fsp-pick__row-meta {
  font-size: 0.78rem;
  color: var(--rcs-muted, #94a3b8);
}

.cl-instr-fsp-pick__row-template {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--rcs-text, #f9fafb);
  letter-spacing: 0.01em;
}

.cl-instr-fsp-pick__row-template--muted {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--rcs-muted, #94a3b8);
}

.cl-instr-fsp-pick__row-club-rev {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--rcs-text, #f9fafb);
}

/* FSP step stars (replaces checkboxes) */
.cl-instr-plan-item {
  margin: 0 0 14px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--rcs-border, rgba(148, 163, 184, 0.2));
}

.cl-instr-plan-item.is-ready .cl-instr-plan-item__head strong {
  color: var(--rcs-status, #22c55e);
}

.cl-instr-stars {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
}

.cl-instr-star {
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--rcs-border, rgba(148, 163, 184, 0.35));
  background: transparent;
  color: var(--rcs-muted);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

.cl-instr-star.is-on {
  color: #f59e0b;
  border-color: color-mix(in srgb, #f59e0b 50%, transparent);
  background: color-mix(in srgb, #f59e0b 14%, transparent);
}

.cl-instr-star:disabled,
.cl-instr-star-clear:disabled {
  opacity: 0.45;
  cursor: default;
}

.cl-instr-star-clear {
  margin: 0 0 0 4px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--rcs-border, rgba(148, 163, 184, 0.35));
  background: transparent;
  color: var(--rcs-muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
