.fl-classroom {
  --cl-bg: #111820;
  --cl-panel: #18242b;
  --cl-panel-soft: #202e36;
  --cl-line: #344650;
  --cl-text: #eef5f6;
  --cl-muted: #9eb0b8;
  --cl-accent: #54d2b3;
  --cl-accent-deep: #1d765f;
  --cl-blue: #79c7e8;
  --cl-warn: #eec36b;
  min-height: 100%;
  height: 100%;
  overflow: auto;
  background: var(--cl-bg);
  color: var(--cl-text);
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

.fl-classroom * { box-sizing: border-box; }
.fl-classroom button,
.fl-classroom input,
.fl-classroom select,
.fl-classroom textarea { font: inherit; letter-spacing: 0; }
.fl-classroom button { -webkit-tap-highlight-color: transparent; }
.fl-classroom [hidden] { display: none !important; }

.cl-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--cl-line);
  background: #141f26;
}
.cl-toolbar__title { min-width: 0; }
.cl-toolbar__title h3 { margin: 2px 0 2px; font-size: 21px; line-height: 1.25; }
.cl-toolbar__title p { margin: 0; color: var(--cl-muted); font-size: 12px; }
.cl-toolbar__actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.cl-eyebrow { display: block; color: var(--cl-accent); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cl-message { min-height: 20px; color: var(--cl-muted); font-size: 12px; }
.cl-btn {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #526772;
  border-radius: 5px;
  background: var(--cl-panel-soft);
  color: var(--cl-text);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}
.cl-btn:hover { border-color: #8ca4ad; background: #2a3a43; }
.cl-btn:focus-visible,
.cl-filter:focus-visible,
.cl-level-card:focus-visible,
.cl-search input:focus-visible { outline: 2px solid var(--cl-accent); outline-offset: 2px; }
.cl-btn--primary { border-color: var(--cl-accent-deep); background: #216f5b; color: #f2fffb; }
.cl-btn--primary:hover { background: #2a8d73; }
.cl-btn--screen { border-color: #39728e; background: #1c4e65; color: #e7f7ff; }
.cl-share-card { margin-top: 14px; padding: 12px; border: 1px solid #39728e; background: rgba(28, 78, 101, .24); }
.cl-share-card h5 { margin: 0 0 5px; color: #e7f7ff; font-size: 13px; }
.cl-share-card p { margin: 0 0 9px; color: var(--cl-muted); font-size: 11px; line-height: 1.6; }
.cl-share-actions { display: flex; gap: 7px; align-items: stretch; flex-wrap: wrap; }
.cl-share-url { flex: 1 1 240px; min-width: 0; min-height: 38px; padding: 8px 9px; border: 1px solid #526772; border-radius: 5px; background: #101a20; color: #cdebf4; font-size: 11px; }
.cl-share-url::selection { background: #39728e; color: #fff; }

.cl-tabs {
  display: flex;
  gap: 3px;
  padding: 0 18px;
  border-bottom: 1px solid var(--cl-line);
  background: #141f26;
}
.cl-tab {
  min-height: 43px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--cl-muted);
  cursor: pointer;
  font-size: 13px;
}
.cl-tab:hover { color: var(--cl-text); }
.cl-tab.is-active { border-bottom-color: var(--cl-accent); color: var(--cl-text); font-weight: 800; }
.cl-view { padding: 16px 18px 24px; }

.cl-level-layout {
  display: grid;
  grid-template-columns: 220px minmax(320px, 1fr) minmax(320px, .9fr);
  gap: 15px;
  align-items: start;
}
.cl-level-nav,
.cl-level-detail,
.cl-console-panel { border: 1px solid var(--cl-line); background: var(--cl-panel); }
.cl-level-nav { padding: 14px; }
.cl-nav-heading,
.cl-content-heading,
.cl-console-head,
.cl-panel-title,
.cl-section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.cl-nav-heading h4,
.cl-content-heading h4,
.cl-console-head h4 { margin: 3px 0 0; font-size: 17px; line-height: 1.3; }
.cl-catalog-count,
.cl-result-count,
.cl-panel-title > span,
.cl-section-heading > span { color: var(--cl-muted); font-size: 12px; white-space: nowrap; }
.cl-catalog-count { min-width: 33px; padding: 7px 5px; border: 1px solid #386052; color: var(--cl-accent); text-align: center; }
.cl-search { display: block; margin: 14px 0 12px; }
.cl-search input { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #4a606a; border-radius: 5px; background: #10171c; color: var(--cl-text); }
.cl-search input::placeholder { color: #7e929b; }
.cl-filters { display: grid; gap: 5px; max-height: 580px; overflow: auto; }
.cl-filter { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 34px; padding: 7px 9px; border: 1px solid transparent; border-left: 3px solid var(--chapter-color, #526772); background: transparent; color: var(--cl-muted); cursor: pointer; text-align: left; font-size: 12px; }
.cl-filter span:last-child { color: #7d929c; }
.cl-filter:hover { background: #213039; color: var(--cl-text); }
.cl-filter.is-active { border-color: #3d5e5e; background: #203938; color: #eafff9; }
.cl-filter.is-active span:last-child { color: var(--cl-accent); }

.cl-level-content { min-width: 0; }
.cl-content-heading { min-height: 42px; margin-bottom: 10px; align-items: flex-end; }
.cl-level-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 62px;
  margin-bottom: 6px;
  padding: 9px 10px;
  border: 1px solid #30434c;
  background: #18262e;
  color: var(--cl-text);
  cursor: pointer;
  text-align: left;
}
.cl-level-card:hover { border-color: #5e8986; background: #20343b; }
.cl-level-card.is-selected { border-color: var(--cl-accent); background: #1e3a38; box-shadow: inset 3px 0 0 var(--cl-accent); }
.cl-level-card__code { color: var(--cl-accent); font: 800 13px ui-monospace, SFMono-Regular, Consolas, monospace; }
.cl-level-card__body { min-width: 0; }
.cl-level-card__body strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.cl-level-card__body small { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cl-muted); font-size: 11px; }
.cl-level-card__arrow { color: #7e9aa0; font-size: 22px; line-height: 1; text-align: center; }
.cl-empty { display: grid; place-items: center; min-height: 220px; border: 1px dashed #40545d; color: var(--cl-muted); text-align: center; }

.cl-level-detail { position: sticky; top: 0; min-width: 0; padding: 16px; }
.cl-detail-top { padding-bottom: 14px; border-bottom: 1px solid var(--cl-line); }
.cl-detail-top h4 { margin: 5px 0 4px; font-size: 21px; line-height: 1.35; overflow-wrap: anywhere; }
.cl-detail-top > p { margin: 0; color: var(--cl-muted); font-size: 12px; }
.cl-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 15px; }
.cl-detail-section { padding: 14px 0 0; }
.cl-detail-section + .cl-detail-section { border-top: 1px solid #2d3e47; }
.cl-detail-section h5 { margin: 0 0 7px; font-size: 14px; }
.cl-detail-section > p { margin: 0; color: #bdcbd0; font-size: 12px; line-height: 1.7; }
.cl-detail-section > p b { color: var(--cl-blue); font-weight: 700; }
.cl-loop { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.cl-loop li { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 8px; align-items: start; }
.cl-stage-index { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #245447; color: #c8fff0; font-size: 11px; font-weight: 800; }
.cl-loop strong { display: block; font-size: 12px; }
.cl-loop p { margin: 2px 0 0; color: var(--cl-muted); font-size: 11px; line-height: 1.55; }
.cl-flowling { padding-bottom: 2px; }
.cl-flowling-grid { display: grid; gap: 6px; }
.cl-flowling-grid div { display: grid; grid-template-columns: 75px minmax(0, 1fr); gap: 8px; padding: 7px 8px; background: #203038; font-size: 11px; }
.cl-flowling-grid b { color: var(--cl-accent); }
.cl-flowling-grid span { color: #c2d0d4; }

.cl-console-head { align-items: center; margin-bottom: 14px; }
.cl-console-head p { margin: 5px 0 0; color: var(--cl-muted); font-size: 12px; line-height: 1.6; }
.cl-metrics { display: grid; grid-template-columns: repeat(8, minmax(92px, 1fr)); gap: 8px; margin-bottom: 10px; }
.cl-metric { min-height: 75px; padding: 11px 12px; border: 1px solid var(--cl-line); background: var(--cl-panel); }
.cl-metric strong { display: block; color: #f5fbfc; font-size: 23px; line-height: 1.2; }
.cl-metric span { display: block; margin-top: 5px; color: var(--cl-muted); font-size: 11px; }
.cl-metric--online strong { color: var(--cl-blue); }
.cl-metric--good strong { color: var(--cl-accent); }
.cl-metric--warn strong { color: var(--cl-warn); }
.cl-observation-strip { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 8px; margin-bottom: 15px; }
.cl-observation-strip > div { min-height: 51px; padding: 8px 10px; border-left: 3px solid #39728e; background: #15232b; }
.cl-observation-strip > div:nth-child(2n) { border-left-color: #438f79; }
.cl-observation-strip span,
.cl-observation-strip strong { display: block; }
.cl-observation-strip span { color: var(--cl-muted); font-size: 10px; }
.cl-observation-strip strong { margin-top: 3px; color: #eaf7f8; font-size: 15px; }
.cl-console-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .7fr); gap: 15px; align-items: start; }
.cl-console-panel { min-width: 0; padding: 13px; }
.cl-panel-title { align-items: center; margin-bottom: 10px; }
.cl-panel-title h5 { margin: 3px 0 0; font-size: 14px; }
.cl-table-wrap { overflow: auto; border: 1px solid var(--cl-line); }
.cl-table { width: 100%; min-width: 1010px; border-collapse: collapse; }
.cl-table th,
.cl-table td { padding: 9px 10px; border-bottom: 1px solid #2d3d45; text-align: left; vertical-align: middle; font-size: 12px; }
.cl-table th { background: #202d35; color: var(--cl-muted); font-weight: 700; white-space: nowrap; }
.cl-table tr:last-child td { border-bottom: 0; }
.cl-table td strong,
.cl-table td small { display: block; }
.cl-table td small { margin-top: 3px; color: var(--cl-muted); font-size: 10px; }
.cl-table-empty { min-height: 100px; padding: 32px !important; color: var(--cl-muted); text-align: center !important; }
.cl-online-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #718087; vertical-align: middle; }
.cl-online-dot.is-online { background: var(--cl-accent); box-shadow: 0 0 0 3px rgba(84, 210, 179, .12); }
.cl-status { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 7px; border: 1px solid #53646d; border-radius: 4px; white-space: nowrap; }
.cl-status--completed { border-color: #2c8c72; color: #9bf2d9; }
.cl-status--in-progress { border-color: #4d778c; color: #b5e3f5; }
.cl-status--stuck { border-color: #98783c; color: #f5d28c; }
.cl-status--not-started { color: #a7b4b9; }
.cl-stat-number,
.cl-score { color: var(--cl-blue); font-weight: 800; }
.cl-attention-count { color: var(--cl-warn); font-weight: 800; }
.cl-console-side { display: grid; gap: 15px; }
.cl-time { color: #dcecf0; font-weight: 700; }
.cl-error-list,
.cl-attention-list,
.cl-stage-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cl-error-list li { display: grid; grid-template-columns: 23px minmax(0, 1fr); gap: 8px; align-items: start; padding: 7px 8px; background: #1d2e36; }
.cl-error-rank { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: #644f2b; color: #ffe0a0; font-size: 10px; font-weight: 800; }
.cl-error-list strong,
.cl-error-list small { display: block; overflow-wrap: anywhere; }
.cl-error-list strong { color: #f3f8f8; font-size: 12px; line-height: 1.4; }
.cl-error-list small { margin-top: 3px; color: var(--cl-muted); font-size: 10px; }
.cl-attention-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 7px 8px; background: #2b2920; }
.cl-attention-list strong { color: #f5e1a9; font-size: 11px; }
.cl-attention-list span { color: #c3b27c; font-size: 10px; text-align: right; }
.cl-list-more { color: var(--cl-muted); font-size: 11px; text-align: right; }
.cl-stage-list li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 8px; background: #1d2e36; color: #cfdee1; font-size: 11px; }
.cl-stage-list b { color: var(--cl-accent); white-space: nowrap; }
.cl-subheading { margin: 13px 0 7px; color: var(--cl-muted); font-size: 11px; font-weight: 800; }
.cl-data-empty { padding: 14px; border: 1px dashed #4c606a; background: #152128; }
.cl-data-empty strong { display: block; color: #e6f2f4; font-size: 13px; }
.cl-data-empty p { margin: 7px 0 0; color: var(--cl-muted); font-size: 11px; line-height: 1.7; }
.cl-load-error { margin: 9px 0 0; color: #f0aa8f; font-size: 12px; }
.cl-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 1180px) {
  .cl-level-layout { grid-template-columns: 205px minmax(300px, 1fr) minmax(290px, .9fr); gap: 11px; }
  .cl-view { padding-left: 12px; padding-right: 12px; }
  .cl-toolbar { padding-left: 13px; padding-right: 13px; }
  .cl-metrics { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
  .cl-observation-strip { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}

@media (max-width: 940px) {
  .cl-level-layout { grid-template-columns: 205px minmax(0, 1fr); }
  .cl-level-detail { position: static; grid-column: 1 / -1; }
  .cl-console-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .cl-toolbar { align-items: flex-start; flex-direction: column; gap: 9px; }
  .cl-toolbar__actions { width: 100%; justify-content: space-between; }
  .cl-tabs { padding: 0 10px; overflow-x: auto; }
  .cl-tab { flex: 0 0 auto; padding-left: 10px; padding-right: 10px; }
  .cl-view { padding: 11px 10px 18px; }
  .cl-level-layout { display: block; }
  .cl-level-nav { margin-bottom: 11px; }
  .cl-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }
  .cl-content-heading { align-items: flex-end; }
  .cl-content-heading h4 { font-size: 15px; }
  .cl-level-detail { margin-top: 11px; padding: 13px; }
  .cl-detail-actions .cl-btn { flex: 1 1 135px; }
  .cl-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl-observation-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl-console-head { align-items: flex-start; flex-direction: column; }
  .cl-console-head .cl-btn { width: 100%; }
  .cl-console-panel { padding: 10px; }
}
