:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #d8dee8;
  --line-strong: #b8c2d1;
  --text: #172033;
  --muted: #667085;
  --muted-2: #8a95a6;
  --accent: #0f766e;
  --accent-2: #155e75;
  --ok: #15803d;
  --warn: #b45309;
  --bad: #b91c1c;
  --blue: #2563eb;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 24, 39, 0.78);
}

.auth-gate.hidden {
  display: none;
}

.auth-card {
  width: min(420px, 100%);
  border: 1px solid rgba(216, 222, 232, 0.9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
  padding: 24px;
}

.auth-card .brand-mark {
  margin-bottom: 14px;
}

.auth-card h2 {
  margin: 0;
  font-size: 24px;
}

.auth-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.auth-card label {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.auth-card input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  color: var(--text);
}

.auth-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.auth-message {
  min-height: 20px;
  color: var(--bad) !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  display: grid;
  grid-template-columns: 340px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: #101827;
  color: #eef4ff;
  padding: 18px;
}

.brand {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  font-weight: 760;
  font-size: 22px;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 0;
}

.brand p {
  margin: 5px 0 0;
  color: #aeb9ca;
  font-size: 12px;
  word-break: break-all;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 38px;
  gap: 8px;
  margin-bottom: 12px;
}

.search-row input,
.split-controls input,
.split-controls select {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 11px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.search-row input {
  background: #182235;
  border-color: #2d3a50;
  color: #f6f8fb;
}

.search-row input::placeholder {
  color: #95a3b7;
}

.icon-button,
.secondary,
.primary {
  min-height: 36px;
  border-radius: 7px;
  padding: 0 12px;
  font-weight: 650;
  letter-spacing: 0;
}

.icon-button {
  display: grid;
  place-items: center;
  border: 1px solid #2d3a50;
  background: #1c273a;
  color: #e7eefc;
}

.secondary {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.secondary:hover {
  background: var(--surface-2);
}

.primary {
  background: var(--accent);
  color: #fff;
}

.primary:hover {
  background: #115e59;
}

.case-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.summary-pill {
  border: 1px solid #2d3a50;
  border-radius: 7px;
  padding: 8px 10px;
  background: #151f31;
}

.summary-pill strong {
  display: block;
  font-size: 18px;
}

.summary-pill span {
  display: block;
  color: #aeb9ca;
  font-size: 12px;
}

.case-list {
  display: grid;
  gap: 8px;
}

.case-item {
  width: 100%;
  text-align: left;
  border: 1px solid #2d3a50;
  border-radius: 8px;
  background: #151f31;
  color: #f6f8fb;
  padding: 11px;
}

.case-item:hover,
.case-item.active {
  border-color: #4db6ac;
  background: #1b2a40;
}

.case-name {
  font-size: 14px;
  font-weight: 720;
  line-height: 1.35;
  margin-bottom: 8px;
}

.case-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #aeb9ca;
  font-size: 12px;
}

.workspace {
  min-width: 0;
  padding: 18px 22px 28px;
}

.topbar {
  min-height: 84px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
}

.eyeline {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 760;
  margin-bottom: 4px;
}

.topbar h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0;
}

.topbar p {
  margin: 7px 0 0;
  color: var(--muted);
}

.topbar-actions,
.command-row,
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-nav {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  width: fit-content;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.admin-nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 6px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 720;
  text-decoration: none;
}

.admin-nav-item.active {
  background: #e8f4f3;
  color: var(--accent);
}

.as-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  text-decoration: none;
}

.admin-panel {
  display: grid;
  gap: 14px;
}

.admin-panel-head {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-panel-head h3,
.permission-card h4,
.permission-note h4,
.student-profile-schema h4 {
  margin: 0;
  font-size: 17px;
}

.admin-panel-head p,
.student-profile-schema p {
  margin: 5px 0 0;
  color: var(--muted);
}

.readiness-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(74px, 1fr));
  gap: 8px;
  min-width: 420px;
}

.readiness-item {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 10px;
  background: #fff;
}

.readiness-item strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.readiness-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.mode-card-wrap {
  min-height: 0;
}

.mode-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.mode-card.safe {
  border-color: #9bd8bd;
  background: #f2fbf6;
}

.mode-card.caution {
  border-color: #f0d58b;
  background: #fff9e8;
}

.mode-card.danger {
  border-color: #f0a0a0;
  background: #fff1f1;
}

.mode-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.mode-card strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
}

.mode-card p {
  margin: 5px 0 8px;
  color: var(--text);
}

.mode-card code {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.progress-dashboard-card {
  display: grid;
  gap: 12px;
}

.progress-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.progress-stat-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #f8fafc;
}

.progress-stat-grid strong {
  display: block;
  font-size: 18px;
}

.progress-stat-grid span,
.progress-case span,
.progress-action span,
.progress-blockers span {
  color: var(--muted);
  font-size: 12px;
}

.progress-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.progress-dashboard-grid section {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.progress-dashboard-grid h5 {
  margin: 0;
  font-size: 13px;
}

.progress-action,
.progress-case {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  background: #fff;
}

.progress-action {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
}

.progress-action b {
  color: var(--accent);
}

.progress-case strong,
.progress-case span {
  display: block;
  overflow-wrap: anywhere;
}

.progress-blockers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.progress-blockers span {
  border-radius: 999px;
  padding: 5px 9px;
  background: #ecfdf5;
  color: #166534;
}

.progress-blockers.has-blockers span {
  background: #fff7ed;
  color: #9a3412;
}

.system-layout,
.ability-layout,
.workflow-layout,
.service-layout,
.quality-release-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.ops-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.ops-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ops-card-head h4 {
  margin: 0;
  font-size: 16px;
}

.ops-card-head span {
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.layer-grid,
.stakeholder-grid,
.backlog-grid,
.profile-level-grid,
.ability-grid,
.subject-grid,
.workflow-list,
.stage-grid,
.cadence-grid,
.output-grid,
.quality-gate-grid,
.release-grid {
  display: grid;
  gap: 10px;
}

.layer-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.layer-card.ready,
.stakeholder-card.ready,
.workflow-module.ready {
  border-left-color: var(--accent);
}

.layer-card.pending,
.stakeholder-card.pending,
.workflow-module.pending {
  border-left-color: var(--warn);
}

.layer-card.building,
.stakeholder-card.building,
.workflow-module.building {
  border-left-color: var(--blue);
}

.layer-index {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #e8f4f3;
  color: var(--accent);
  font-weight: 780;
}

.layer-card h5,
.layer-card strong,
.stakeholder-card strong,
.profile-level-card strong,
.ability-card strong,
.subject-card strong,
.workflow-module strong,
.workflow-stage-card strong,
.cadence-card strong,
.output-card strong,
.quality-release-card strong,
.release-card strong,
.backlog-card strong {
  display: block;
  margin: 0;
  line-height: 1.25;
}

.layer-card h5 {
  font-size: 15px;
}

.layer-card strong {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.layer-card p,
.stakeholder-card p,
.profile-level-card p,
.ability-card p,
.subject-card p,
.workflow-module p,
.workflow-stage-card p,
.cadence-card p,
.output-card p,
.quality-release-card p,
.release-card p,
.backlog-card p {
  margin: 5px 0 0;
  color: var(--muted);
}

.layer-card > span,
.stakeholder-card span,
.ability-card span,
.subject-card span,
.subject-card em,
.output-card span,
.workflow-module > span {
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.ability-card span,
.subject-card span,
.subject-card em,
.output-card span {
  margin-top: 8px;
  place-items: center start;
  white-space: normal;
  text-align: left;
}

.stakeholder-grid,
.profile-level-grid,
.cadence-grid,
.output-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stakeholder-card,
.profile-level-card,
.ability-card,
.subject-card,
.workflow-module,
.workflow-stage-card,
.cadence-card,
.output-card,
.quality-release-card,
.release-card {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
}

.ability-grid,
.subject-grid,
.quality-gate-grid,
.release-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ability-card,
.subject-card {
  border-left-color: var(--accent-2);
}

.type-deepening-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.type-deepening-row {
  display: grid;
  gap: 5px;
  padding: 8px;
  border-radius: 8px;
  background: #f8fafc;
}

.type-deepening-row b {
  color: var(--accent);
  font-size: 12px;
}

.type-deepening-row p {
  margin: 0;
  color: var(--ink);
  font-weight: 760;
}

.type-deepening-row span,
.type-deepening-row em {
  display: block;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 620;
  white-space: normal;
}

.type-deepening-coach-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.type-deepening-coach-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #fff;
}

.type-deepening-coach-card strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.type-deepening-coach-card p {
  margin: 3px 0 0;
  color: var(--muted);
}

.type-deepening-coach-card span,
.type-deepening-coach-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.subject-training-coach-wrap {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.subject-training-summary {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.subject-training-summary span {
  color: var(--muted);
  font-size: 12px;
}

.subject-training-list {
  display: grid;
  gap: 8px;
}

.subject-training-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff;
}

.subject-training-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.subject-training-title b {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 26px;
  border-radius: 6px;
  background: #e8f4f3;
  color: var(--accent);
  font-size: 12px;
}

.subject-training-title strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.subject-training-title p {
  margin: 3px 0 0;
  color: var(--muted);
}

.subject-training-card span,
.subject-training-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.workflow-module {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.workflow-module b,
.backlog-card b,
.workflow-stage-card b {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 26px;
  border-radius: 6px;
  background: #e8f4f3;
  color: var(--accent);
  font-size: 12px;
}

.stage-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workflow-stage-card {
  border-left-color: var(--blue);
}

.cadence-card {
  border-left-color: var(--accent);
}

.output-card {
  border-left-color: var(--accent-2);
}

.parent-report-grid,
.evidence-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.parent-report-grid span,
.evidence-grid span {
  min-height: 30px;
  display: inline-grid;
  align-items: center;
  border-radius: 7px;
  padding: 0 10px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 680;
}

.parent-method-column {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.parent-method-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.parent-method-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
}

.parent-method-card strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.parent-method-card p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}

.parent-method-card em {
  margin-top: 2px;
  border-radius: 7px;
  padding: 7px 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
}

.service-plan-card {
  display: grid;
  gap: 12px;
}

.service-plan-head {
  align-items: center;
}

.service-plan-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.service-plan-actions select {
  min-width: 260px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
}

#servicePlanSaveState.dirty {
  border-color: rgba(173, 95, 0, 0.28);
  background: #fff7eb;
  color: var(--warn);
}

.service-plan-form,
.service-plan-form-body,
.service-subsection {
  display: grid;
  gap: 12px;
}

.service-plan-grid,
.service-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-plan-grid label,
.service-review-grid label {
  display: grid;
  gap: 5px;
  color: #334155;
  font-weight: 680;
}

.service-plan-grid input,
.service-plan-grid textarea,
.service-review-grid input,
.service-review-grid textarea,
.service-table input,
.service-table select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 9px;
  background: #fff;
  color: var(--text);
  font-weight: 520;
}

.service-plan-grid textarea,
.service-review-grid textarea {
  min-height: 76px;
  resize: vertical;
}

.service-subsection h5 {
  margin: 0;
  font-size: 15px;
}

.service-subsection-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.service-subsection-head h5 {
  margin: 0;
}

.service-evidence-quality {
  display: grid;
  gap: 10px;
}

.service-evidence-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 4px solid var(--warn);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.service-evidence-summary.ready {
  border-left-color: var(--accent);
}

.service-evidence-summary strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
}

.service-evidence-summary span,
.service-evidence-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.service-evidence-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.service-evidence-checklist span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.service-evidence-checklist span.ok {
  border-color: rgba(23, 121, 111, 0.22);
  background: #eefaf8;
  color: var(--accent);
}

.service-evidence-checklist span.needs {
  border-color: rgba(173, 95, 0, 0.24);
  background: #fff7eb;
  color: var(--warn);
}

.service-evidence-issues {
  display: grid;
  gap: 8px;
}

.service-evidence-issue {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.service-evidence-issue.high {
  border-left-color: #b42318;
}

.service-evidence-issue.medium {
  border-left-color: var(--warn);
}

.service-evidence-issue.low {
  border-left-color: var(--blue);
}

.service-evidence-issue strong {
  color: var(--ink);
  font-size: 13px;
}

.service-evidence-issue p,
.service-evidence-issue em,
.service-evidence-ok {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.service-table-head,
.service-task-row,
.service-daily-row {
  display: grid;
  gap: 8px;
  align-items: center;
  min-width: 820px;
  padding: 8px 10px;
}

.service-table-head {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 760;
}

.service-task-row,
.service-daily-row {
  border-top: 1px solid var(--line);
  background: #fff;
}

.service-table.weekly .service-table-head,
.service-table.weekly .service-task-row {
  grid-template-columns: minmax(180px, 1.3fr) minmax(90px, 0.7fr) minmax(90px, 0.7fr) minmax(110px, 0.8fr) minmax(150px, 1fr);
}

.service-table.daily .service-table-head,
.service-table.daily .service-daily-row {
  grid-template-columns: minmax(132px, 0.7fr) minmax(100px, 0.6fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr);
}

.quality-release-card {
  border-left-color: var(--warn);
}

.release-card {
  border-left-color: var(--accent);
}

.backlog-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.backlog-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
}

.admin-panel-tools,
.permission-current-role {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-panel-tools input,
.permission-current-role select {
  min-width: 220px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: #fff;
}

.permission-current-role span {
  color: var(--muted);
  font-size: 12px;
}

.student-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.student-stat {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: var(--surface);
}

.student-stat strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.student-stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.student-layout,
.student-master-layout,
.permission-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}

.student-master-layout {
  grid-template-columns: 360px minmax(0, 1fr);
}

.student-roster,
.staff-list {
  display: grid;
  gap: 10px;
}

.staff-account-form {
  display: grid;
  gap: 10px;
}

.staff-account-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.staff-account-form input,
.staff-account-form select,
.staff-account-form textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
}

.staff-account-form textarea {
  min-height: 76px;
  resize: vertical;
}

.staff-account-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.student-card,
.student-profile-schema,
.permission-card,
.permission-note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.student-card,
.student-profile-schema,
.permission-card,
.permission-note {
  padding: 14px;
}

.student-card.selected {
  border-color: rgba(15, 118, 110, 0.5);
  background: #f0fdfa;
}

.student-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.student-card h4 {
  margin: 0;
  font-size: 18px;
}

.student-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.student-status {
  min-height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  padding: 0 10px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 760;
}

.student-status.needs {
  background: #fff7ed;
  color: var(--warn);
}

.student-status.done {
  background: #f0fdf4;
  color: var(--ok);
}

.student-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.student-card-grid span,
.profile-field-grid span {
  min-height: 28px;
  display: inline-grid;
  align-items: center;
  border-radius: 6px;
  padding: 0 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
}

.student-card-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.profile-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.student-profile-form {
  display: grid;
  gap: 14px;
}

#studentProfileSaveState.dirty {
  border-color: rgba(173, 95, 0, 0.28);
  background: #fff7eb;
  color: var(--warn);
}

.profile-section {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.profile-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.profile-section h5 {
  margin: 0;
  font-size: 15px;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-form-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-form-grid label,
.archive-grid label,
.parent-report-form label {
  display: grid;
  gap: 5px;
  color: #334155;
  font-weight: 680;
}

.profile-form-grid input,
.profile-form-grid select,
.profile-form-grid textarea,
.archive-grid select,
.score-table input,
.score-table select,
.parent-report-form input,
.parent-report-form select,
.parent-report-form textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 9px;
  background: #fff;
  color: var(--text);
  font-weight: 520;
}

.profile-form-grid textarea,
.parent-report-form textarea {
  min-height: 72px;
  resize: vertical;
}

.span-2 {
  grid-column: span 2;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.score-block {
  display: grid;
  gap: 8px;
}

.score-block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.score-block-title strong {
  font-size: 14px;
}

.score-block-title span {
  color: var(--warn);
  font-size: 12px;
}

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

.score-table-head,
.score-table-row {
  display: grid;
  grid-template-columns: 86px 54px minmax(90px, 1fr) minmax(90px, 1fr) minmax(110px, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 620px;
  padding: 8px 10px;
}

.score-table-head {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 760;
}

.score-table-row {
  border-top: 1px solid var(--line);
  background: #fff;
}

.score-table.simple .score-table-head,
.score-table.simple .score-table-row {
  grid-template-columns: 86px minmax(90px, 1fr) minmax(90px, 1fr);
  min-width: 360px;
}

.score-table-row strong {
  font-size: 13px;
}

.score-enabled {
  width: 18px !important;
  min-height: 18px !important;
}

.student-backup-card {
  display: grid;
  gap: 12px;
}

.backup-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.backup-toolbar span {
  color: var(--muted);
  font-size: 13px;
}

.student-backup-list {
  display: grid;
  gap: 8px;
}

.student-dictionary-card {
  display: grid;
  gap: 12px;
}

.student-dictionary-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.student-dictionary-summary span {
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.student-dictionary-summary strong {
  color: var(--text);
  font-size: 18px;
}

.student-dictionary-summary em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.student-dictionary-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.student-dictionary-table {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.student-dictionary-table div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.student-dictionary-table strong {
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.student-dictionary-table span {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
}

.student-dictionary-table p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.backup-empty,
.student-backup-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.student-backup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.student-backup-row div {
  display: grid;
  gap: 3px;
}

.student-backup-row strong {
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.student-backup-row span,
.backup-empty {
  color: var(--muted);
  font-size: 13px;
}

.parent-report-builder {
  display: grid;
  gap: 12px;
}

.parent-report-history-card {
  display: grid;
  gap: 12px;
}

.parent-report-history {
  display: grid;
  gap: 10px;
}

.parent-report-empty,
.parent-report-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.parent-report-empty {
  color: var(--muted);
  background: #f8fafc;
}

.parent-report-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.parent-report-row div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.parent-report-row strong {
  color: var(--text);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.parent-report-row span,
.parent-report-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.parent-report-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.parent-report-row-actions a {
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.report-missing {
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  padding: 0 10px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 12px;
}

.parent-report-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.parent-report-form button {
  min-height: 38px;
}

.parent-report-preview {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #101827;
  color: #e5e7eb;
  white-space: pre-wrap;
}

.ability-database-list {
  display: grid;
  gap: 10px;
}

.ability-database-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.ability-database-card h5 {
  margin: 0;
  font-size: 15px;
}

.ability-database-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.ability-database-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ability-database-grid span {
  min-height: 30px;
  display: inline-grid;
  align-items: center;
  border-radius: 7px;
  padding: 0 9px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
}

.permission-layout {
  grid-template-columns: 320px minmax(0, 1fr);
}

.staff-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  text-align: left;
}

.staff-row.active {
  border-color: rgba(15, 118, 110, 0.45);
  background: #f0fdfa;
}

.staff-row strong,
.staff-row em {
  display: block;
}

.staff-row em {
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.staff-row b {
  color: var(--accent);
  font-size: 12px;
}

.permission-matrix-wrap {
  overflow: auto;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.permission-matrix {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.permission-matrix th,
.permission-matrix td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: middle;
}

.permission-matrix th {
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
}

.permission-dot {
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 760;
}

.permission-dot.on {
  background: #dcfce7;
  color: #166534;
}

.permission-dot.off {
  background: #f1f5f9;
  color: #64748b;
}

.security-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.security-item {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fff7ed;
  color: #7c2d12;
}

.audit-log-list {
  display: grid;
  gap: 8px;
}

.audit-log-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fff;
}

.audit-log-row div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.audit-log-row strong {
  font-size: 13px;
}

.audit-log-row span,
.audit-log-row p {
  color: var(--muted);
  font-size: 12px;
}

.audit-log-row p {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

.production-console {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f9fbfd);
  box-shadow: var(--shadow);
}

.production-head {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.production-head h3 {
  margin: 0;
  font-size: 17px;
}

.production-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.production-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.production-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.production-stat {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: var(--surface);
}

.production-stat strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.production-stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.production-stat.auto {
  border-color: rgba(15, 118, 110, 0.28);
  background: #f0fdfa;
}

.production-stat.manual {
  border-color: rgba(180, 83, 9, 0.28);
  background: #fff7ed;
}

.production-stat.blocked {
  border-color: rgba(185, 28, 28, 0.24);
  background: #fff1f2;
}

.production-stat.done {
  border-color: rgba(21, 128, 61, 0.22);
  background: #f0fdf4;
}

.production-queue {
  display: grid;
  gap: 8px;
}

.production-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface);
}

.production-row.auto {
  border-left-color: var(--accent);
}

.production-row.manual {
  border-left-color: var(--warn);
}

.production-row.blocked {
  border-left-color: var(--bad);
}

.production-row-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.production-row-title strong {
  font-size: 14px;
}

.production-row-title span {
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: #eef6ff;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 760;
}

.production-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.production-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.production-row-meta span,
.production-row-actions > span {
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  padding: 0 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
}

.production-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.production-empty {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

body[data-has-current-case="true"] .production-console {
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
}

body[data-has-current-case="true"] .production-head {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

body[data-has-current-case="true"] .production-head p,
body[data-has-current-case="true"] .production-queue {
  display: none;
}

body[data-has-current-case="true"] .production-stats {
  grid-template-columns: repeat(4, minmax(86px, 1fr));
}

body[data-has-current-case="true"] .production-stat {
  min-height: 38px;
  padding: 7px 10px;
}

body[data-has-current-case="true"] .production-stat strong,
body[data-has-current-case="true"] .production-stat span {
  display: inline;
}

body[data-has-current-case="true"] .production-stat strong {
  margin-right: 6px;
  font-size: 18px;
}

body[data-has-current-case="true"] .production-stat span {
  margin-top: 0;
}

.batch-progress {
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  background: #eff6ff;
}

.batch-progress-head,
.batch-progress-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #1e3a8a;
}

.batch-progress-head span,
.batch-progress-foot {
  font-size: 12px;
}

.batch-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  margin: 9px 0;
  background: rgba(37, 99, 235, 0.16);
}

.batch-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 180ms ease;
}

.empty-state {
  min-height: calc(100vh - 132px);
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.empty-inner {
  max-width: 480px;
  text-align: center;
  color: var(--muted);
}

.empty-inner h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 22px;
}

.hidden {
  display: none !important;
}

.ai-nav-item {
  border: 1px solid rgba(15, 118, 110, 0.18);
}

.ai-assistant-head {
  border-top: 3px solid #0f766e;
}

.ai-assistant-status {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 170px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
}

.ai-assistant-status div {
  display: grid;
  gap: 2px;
}

.ai-assistant-status strong,
.ai-assistant-status span {
  font-size: 12px;
}

.ai-assistant-status div span {
  color: var(--muted);
}

.ai-status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #94a3b8;
}

.ai-status-dot.ready {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.ai-status-dot.offline {
  background: #d97706;
}

.ai-assistant-layout {
  display: grid;
  grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
  min-height: 680px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ai-control-panel {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(180px, 1fr);
  align-content: start;
  gap: 12px;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: #f8fafc;
}

.ai-control-panel > label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.ai-control-panel select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  background: #fff;
  color: var(--text);
}

.ai-control-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.ai-context-section,
.ai-access-section,
.ai-risk-section,
.ai-history-section {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.ai-consent-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.ai-consent-check input {
  margin-top: 2px;
}

.ai-access-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.ai-access-actions label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.ai-access-actions input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
}

.ai-access-list,
.ai-risk-list {
  display: grid;
  gap: 6px;
}

.ai-latest-invite {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 7px;
  padding: 8px;
  border: 1px solid #a9d5d1;
  border-radius: 6px;
  background: #eaf6f4;
}

.ai-latest-invite label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
}

.ai-latest-invite input {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px;
  background: #fff;
  font-size: 10px;
}

.ai-latest-invite button {
  min-height: 31px;
  border: 1px solid var(--teal, #0f766e);
  border-radius: 5px;
  background: #fff;
  color: #115e59;
  font-size: 11px;
}

.ai-access-item,
.ai-risk-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.ai-access-item div,
.ai-risk-item div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ai-access-item strong,
.ai-risk-item strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-access-item span,
.ai-risk-item span {
  color: var(--muted);
  font-size: 10px;
}

.ai-access-item button,
.ai-risk-item button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  font-size: 11px;
}

.ai-risk-item {
  border-color: #fecdd3;
  background: #fff7f8;
}

.ai-context-list {
  display: grid;
  gap: 7px;
}

.ai-context-list > div {
  display: grid;
  gap: 2px;
}

.ai-context-list span,
.ai-conversation-item small {
  color: var(--muted);
  font-size: 11px;
}

.ai-context-list strong {
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.ai-conversation-list {
  display: grid;
  align-content: start;
  gap: 6px;
  max-height: 300px;
  overflow: auto;
}

.ai-conversation-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.ai-conversation-item:hover,
.ai-conversation-item.active {
  border-color: rgba(15, 118, 110, 0.28);
  background: #ecfdf5;
}

.ai-conversation-item span {
  color: #0f766e;
  font-size: 11px;
  font-weight: 760;
}

.ai-conversation-item strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 680px;
  background: #fff;
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.ai-chat-header div {
  display: grid;
  gap: 3px;
}

.ai-chat-header span {
  color: var(--muted);
  font-size: 12px;
}

.ai-risk-badge {
  padding: 5px 8px;
  border-radius: 6px;
  background: #fff7ed;
  color: #c2410c !important;
  font-weight: 760;
}

.ai-risk-badge.critical,
.ai-risk-badge.high {
  background: #fff1f2;
  color: #be123c !important;
}

.ai-message-list {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 22px clamp(16px, 5vw, 70px);
  overflow: auto;
  background: #fbfcfd;
}

.ai-message {
  display: grid;
  gap: 5px;
  max-width: min(760px, 88%);
}

.ai-message.user {
  justify-self: end;
}

.ai-message-role {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.ai-message.user .ai-message-role,
.ai-message.user time {
  text-align: right;
}

.ai-message-content {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.ai-message.user .ai-message-content {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

.ai-message time {
  color: var(--muted);
  font-size: 10px;
}

.ai-welcome {
  align-self: center;
  justify-self: center;
  width: min(620px, 100%);
  text-align: center;
}

.ai-welcome > strong {
  font-size: 20px;
}

.ai-welcome > p {
  margin: 8px 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.ai-starter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ai-starter-grid button {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
  background: #fff;
  color: var(--text);
}

.ai-starter-grid button:hover {
  border-color: #0f766e;
  color: #0f766e;
}

.ai-composer {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.ai-composer textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 11px;
  color: var(--text);
  line-height: 1.5;
}

.ai-composer textarea:focus {
  border-color: #0f766e;
  outline: 2px solid rgba(15, 118, 110, 0.12);
}

.ai-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-composer-footer span,
.ai-empty-copy {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.icon-text-button {
  padding: 4px 6px;
  border-radius: 5px;
  background: transparent;
  color: var(--accent);
  font-size: 11px;
}

@media (max-width: 980px) {
  .ai-assistant-layout {
    grid-template-columns: 1fr;
  }

  .ai-control-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .ai-context-section,
  .ai-history-section {
    grid-column: 1 / -1;
  }

  .ai-chat-panel {
    min-height: 620px;
  }
}

@media (max-width: 720px) {
  .ai-control-panel,
  .ai-starter-grid {
    grid-template-columns: 1fr;
  }

  .ai-assistant-status {
    min-width: 0;
  }

  .ai-message-list {
    padding: 16px 12px;
  }

  .ai-message {
    max-width: 94%;
  }

  .ai-composer-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

.case-workspace {
  display: grid;
  gap: 12px;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
}

.stage {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 9px 10px;
}

.stage.done {
  border-color: rgba(21, 128, 61, 0.45);
  background: #f1fbf5;
}

.stage.current {
  border-color: rgba(37, 99, 235, 0.55);
  background: #eff6ff;
}

.stage strong {
  display: block;
  font-size: 13px;
}

.stage span {
  color: var(--muted);
  font-size: 12px;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding-top: 4px;
}

.tab {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 7px 7px 0 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.overview-grid,
.actions-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 12px;
  margin-bottom: 12px;
}

.materials-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
}

.editor-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 12px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  min-width: 0;
}

.panel-heading {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0;
}

.kv-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0;
  margin: 0;
  padding: 4px 14px 14px;
}

.kv-grid dt,
.kv-grid dd {
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid #edf1f6;
}

.kv-grid dt {
  color: var(--muted);
}

.kv-grid dd {
  word-break: break-all;
}

.next-action {
  padding: 14px;
  min-height: 86px;
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.command-row {
  padding: 0 14px 14px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 760;
}

.status-badge.needs,
.status-badge.blocked {
  background: var(--warn);
}

.status-badge.ready {
  background: var(--accent);
}

.status-badge.done {
  background: var(--ok);
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.text-preview,
.log-view {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  padding: 14px;
  color: #273142;
  background: #fbfcfe;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.65;
  max-height: 320px;
  overflow: auto;
}

.text-preview.small {
  max-height: 420px;
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  padding: 14px;
}

.material-tile {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface-2);
}

.material-tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #edf1f6;
}

.material-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: #e7edf5;
  color: var(--muted);
  font-weight: 760;
  text-transform: uppercase;
}

.material-info {
  padding: 9px;
}

.material-info strong {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-all;
}

.material-info a {
  color: var(--accent-2);
  font-size: 12px;
  text-decoration: none;
}

.split-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
  padding: 14px;
  align-items: end;
}

.split-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.split-controls .checkbox-label {
  align-items: center;
  grid-template-columns: auto 1fr;
  min-height: 42px;
}

.split-controls .checkbox-label input {
  width: auto;
}

.ocr-quality-panel {
  border-top: 1px solid var(--line);
  padding: 14px;
}

.quality-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.quality-heading h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.quality-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.quality-heading > span {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 760;
}

.quality-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.quality-stat {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 10px;
  background: var(--surface-2);
}

.quality-stat strong {
  display: block;
  font-size: 19px;
  line-height: 1.1;
}

.quality-stat span {
  color: var(--muted);
  font-size: 12px;
}

.quality-list {
  display: grid;
  gap: 8px;
}

.quality-item,
.quality-empty,
.quality-ok {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fbfcfe;
}

.quality-empty {
  display: grid;
  gap: 3px;
}

.quality-empty span,
.quality-ok {
  color: var(--muted);
  font-size: 12px;
}

.quality-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quality-item-main strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.quality-item-main span {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
}

.quality-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.quality-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.quality-flags span {
  border-radius: 999px;
  padding: 3px 8px;
  background: #f3f5f8;
  color: #3d4656;
  font-size: 12px;
}

.quality-green {
  border-color: rgba(21, 128, 61, 0.32);
  background: #f2fbf5;
}

.quality-yellow {
  border-color: rgba(180, 83, 9, 0.36);
  background: #fff8ed;
}

.quality-red {
  border-color: rgba(185, 28, 28, 0.35);
  background: #fff3f3;
}

.quality-green .quality-item-main span {
  background: #dcfce7;
  color: var(--ok);
}

.quality-yellow .quality-item-main span {
  background: #ffedd5;
  color: var(--warn);
}

.quality-red .quality-item-main span {
  background: #fee2e2;
  color: var(--bad);
}

.ocr-review-panel {
  border-top: 1px solid var(--line);
  padding: 14px;
}

.ocr-review-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ocr-review-heading h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.ocr-review-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.ocr-review-heading code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #eef2f7;
  color: #304158;
}

.ocr-review-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ocr-review-list {
  display: grid;
  gap: 10px;
}

.ocr-review-card {
  display: grid;
  grid-template-columns: minmax(160px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfe;
}

.ocr-review-image {
  min-width: 0;
}

.ocr-review-image img,
.ocr-review-image-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  display: block;
  border: 1px solid #e4e9f1;
  border-radius: 7px;
  background: #fff;
}

.ocr-review-image-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.ocr-review-fields {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.ocr-review-card-head,
.ocr-review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ocr-review-card-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ocr-review-card-head span {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
}

.ocr-review-card-head span.quality-green {
  background: #dcfce7;
  color: var(--ok);
}

.ocr-review-card-head span.quality-yellow {
  background: #ffedd5;
  color: var(--warn);
}

.ocr-review-card-head span.quality-red {
  background: #fee2e2;
  color: var(--bad);
}

.ocr-review-fields label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.ocr-review-fields input,
.ocr-review-fields textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.ocr-review-fields textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.ocr-review-row {
  color: var(--muted);
  font-size: 12px;
}

.ocr-review-row .checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.ocr-review-row input {
  width: auto;
}

.two-previews {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 14px 14px;
}

.preview-title {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.health-list,
.question-list {
  padding: 14px;
}

.health-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #edf1f6;
  padding: 9px 0;
}

.health-item span:last-child {
  font-weight: 760;
}

.question-list {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.question-row {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  background: var(--surface-2);
}

.question-row strong {
  display: block;
  margin-bottom: 4px;
}

.question-row span {
  color: var(--muted);
  font-size: 12px;
}

.spec-editor textarea {
  width: 100%;
  height: calc(100vh - 265px);
  min-height: 520px;
  resize: vertical;
  border: 0;
  outline: none;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
  color: #182033;
  background: #fbfcfe;
}

.delivery-links {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.delivery-gates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
}

.delivery-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fbfcfe;
}

.delivery-gate strong,
.delivery-gate span {
  display: block;
}

.delivery-gate span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.delivery-gate em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 8px;
  font-style: normal;
  font-size: 12px;
  font-weight: 760;
}

.delivery-gate.ok {
  border-color: rgba(21, 128, 61, 0.24);
  background: #f0fdf4;
}

.delivery-gate.ok em {
  background: #dcfce7;
  color: var(--ok);
}

.delivery-gate.warn {
  border-color: rgba(180, 83, 9, 0.24);
  background: #fff7ed;
}

.delivery-gate.warn em {
  background: #ffedd5;
  color: var(--warn);
}

.delivery-gate.bad {
  border-color: rgba(185, 28, 28, 0.22);
  background: #fff1f2;
}

.delivery-gate.bad em {
  background: #ffe4e6;
  color: var(--bad);
}

.wrong-question-diagnosis {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.wrong-question-empty {
  display: grid;
  gap: 5px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  padding: 14px;
  background: #fbfcfe;
}

.wrong-question-empty span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.wrong-question-summary {
  display: grid;
  grid-template-columns: 120px 120px 1fr;
  gap: 10px;
  align-items: stretch;
}

.wrong-question-summary > div,
.wrong-question-summary > p {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fbfcfe;
}

.wrong-question-summary strong,
.wrong-question-summary span {
  display: block;
}

.wrong-question-summary strong {
  color: #182033;
  font-size: 20px;
}

.wrong-question-summary span,
.wrong-question-summary p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.wrong-question-type-list,
.wrong-question-evidence,
.wrong-question-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wrong-question-type-list span,
.wrong-question-evidence span,
.wrong-question-actions span {
  border: 1px solid #dbe4ee;
  border-radius: 999px;
  padding: 4px 8px;
  color: #324154;
  background: #f8fafc;
  font-size: 12px;
  line-height: 1.35;
}

.wrong-question-card-list {
  display: grid;
  gap: 10px;
}

.wrong-question-card {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #fff;
}

.wrong-question-card.high {
  border-color: rgba(21, 128, 61, 0.28);
}

.wrong-question-card.medium {
  border-color: rgba(37, 99, 235, 0.24);
}

.wrong-question-card.needs {
  border-color: rgba(180, 83, 9, 0.28);
  background: #fffbeb;
}

.wrong-question-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.wrong-question-card-head strong,
.wrong-question-card-head span {
  display: block;
}

.wrong-question-card-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.wrong-question-card-head em {
  align-self: start;
  border-radius: 999px;
  padding: 3px 8px;
  color: #1f2937;
  background: #e5edf6;
  font-style: normal;
  font-size: 12px;
  font-weight: 760;
}

.wrong-question-card.needs .wrong-question-card-head em {
  color: var(--warn);
  background: #ffedd5;
}

.wrong-question-evidence span.counter {
  border-color: #fecdd3;
  color: #9f1239;
  background: #fff1f2;
}

.wrong-question-card p,
.wrong-question-boundary {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.wrong-question-boundary {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.delivery-link {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #edf1f6;
  padding: 8px 0;
}

.delivery-link span {
  color: var(--muted);
}

.delivery-link a {
  color: var(--accent-2);
  text-decoration: none;
  word-break: break-all;
}

.report-preview-panel {
  min-height: 460px;
}

.report-preview {
  min-height: 400px;
  padding: 12px;
}

.report-preview iframe {
  width: 100%;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.report-preview-empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.report-preview-empty strong {
  color: var(--text);
}

.log-view {
  min-height: 420px;
  max-height: calc(100vh - 260px);
  background: #111827;
  color: #d7e2f1;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100vw - 44px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  z-index: 20;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .production-head,
  .production-row,
  .admin-panel-head,
  .system-layout,
  .ability-layout,
  .workflow-layout,
  .service-layout,
  .quality-release-layout,
  .student-master-layout,
  .parent-report-form,
  .student-layout,
  .permission-layout {
    grid-template-columns: 1fr;
  }

  .production-actions,
  .production-row-actions,
  .admin-panel-tools,
  .permission-current-role {
    justify-content: flex-start;
  }

  .production-stats,
  .student-stats,
  .student-dictionary-summary,
  .student-dictionary-tables,
  .readiness-grid,
  .backlog-grid,
  .ability-grid,
  .subject-grid,
  .quality-gate-grid,
  .release-grid,
  .delivery-gates,
  .parent-method-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-form-grid,
  .profile-form-grid.compact,
  .archive-grid,
  .service-plan-grid,
  .service-review-grid,
  .ability-database-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .readiness-grid {
    min-width: 0;
  }

  .overview-grid,
  .materials-layout,
  .editor-layout,
  .actions-layout,
  .two-previews {
    grid-template-columns: 1fr;
  }

  .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .app-shell {
    display: flex;
    flex-direction: column;
  }

  .workspace {
    order: 1;
  }

  .sidebar {
    order: 2;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .workspace {
    padding: 14px;
  }

  .topbar {
    display: grid;
  }

  .split-controls {
    grid-template-columns: 1fr;
  }

  .production-stats,
  .student-stats,
  .readiness-grid,
  .stakeholder-grid,
  .profile-level-grid,
  .ability-grid,
  .subject-grid,
  .stage-grid,
  .cadence-grid,
  .output-grid,
  .quality-gate-grid,
  .release-grid,
  .backlog-grid,
  .profile-form-grid,
  .profile-form-grid.compact,
  .archive-grid,
  .service-plan-grid,
  .service-review-grid,
  .student-dictionary-summary,
  .student-dictionary-tables,
  .ability-database-grid,
  .student-card-grid,
  .profile-field-grid,
	  .security-checklist,
	  .delivery-gates,
	  .wrong-question-summary {
	    grid-template-columns: 1fr;
	  }

	  .wrong-question-card-head {
	    display: grid;
	  }

	  .wrong-question-card-head em {
	    justify-self: start;
	  }

  .admin-nav {
    width: 100%;
  }

  .admin-nav-item {
    flex: 1 1 120px;
  }

  .admin-panel-tools input,
  .permission-current-role select {
    min-width: 0;
    width: 100%;
  }

  .student-dictionary-table div {
    display: grid;
    justify-content: stretch;
  }

  .student-dictionary-table strong,
  .student-dictionary-table span {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .parent-report-row {
    grid-template-columns: 1fr;
  }

  .parent-report-row-actions {
    justify-content: flex-start;
  }

  .student-card-main,
  .staff-row,
  .layer-card,
  .workflow-module,
  .backlog-card {
    display: grid;
    grid-template-columns: 1fr;
  }

  .batch-progress-head,
  .batch-progress-foot {
    display: grid;
  }

  .span-2 {
    grid-column: span 1;
  }

  .score-block-title {
    display: grid;
  }

  body[data-has-current-case="true"] .production-head {
    grid-template-columns: 1fr;
  }

  body[data-has-current-case="true"] .production-actions {
    justify-content: flex-start;
  }

  .quality-heading,
  .quality-item-main,
  .ocr-review-heading,
  .ocr-review-card-head,
  .ocr-review-row {
    display: grid;
  }

  .quality-heading > span,
  .quality-item-main span,
  .ocr-review-card-head span {
    width: fit-content;
  }

  .quality-summary {
    grid-template-columns: 1fr;
  }

  .ocr-review-card {
    grid-template-columns: 1fr;
  }

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

  .kv-grid dt {
    border-bottom: 0;
    padding-bottom: 2px;
  }

  .kv-grid dd {
    padding-top: 0;
  }
}

/* Web design plugin enhancement layer */

body.web-design-plugin-ready {
  background:
    radial-gradient(circle at 18% 0%, rgba(15, 118, 110, 0.08), transparent 32%),
    radial-gradient(circle at 88% 10%, rgba(37, 99, 235, 0.08), transparent 28%),
    #f5f7fb;
}

.web-design-plugin-ready .sidebar {
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.08), transparent 34%),
    linear-gradient(180deg, #101726 0%, #0c1320 100%);
}

.web-design-plugin-ready .brand {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(174, 185, 202, 0.16);
}

.web-design-plugin-ready .brand-mark {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent),
    linear-gradient(135deg, #0f766e, #1d4ed8 66%, #7c3aed);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.web-design-plugin-ready .workspace {
  padding: 20px 24px 30px;
}

.web-design-plugin-ready .topbar {
  align-items: center;
  min-height: 92px;
  margin-bottom: 10px;
  padding: 16px 18px;
  border: 1px solid rgba(184, 194, 209, 0.75);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(8px);
}

.web-design-plugin-ready .topbar h2 {
  font-size: clamp(22px, 2.4vw, 30px);
}

.status-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 14px;
}

.status-filter {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(174, 185, 202, 0.18);
  border-radius: 7px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #c8d3e3;
  font-size: 12px;
}

.status-filter strong {
  min-width: 22px;
  min-height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 11px;
}

.status-filter:hover,
.status-filter.active {
  border-color: rgba(77, 182, 172, 0.72);
  background: rgba(15, 118, 110, 0.22);
  color: #f8fafc;
}

.case-empty {
  border: 1px dashed rgba(174, 185, 202, 0.28);
  border-radius: 8px;
  padding: 18px 12px;
  color: #aeb9ca;
  text-align: center;
  font-size: 13px;
}

.design-plugin-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid rgba(184, 194, 209, 0.75);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
}

.design-plugin-title {
  display: grid;
  gap: 2px;
  white-space: nowrap;
}

.design-plugin-title strong {
  font-size: 14px;
}

.design-plugin-title span {
  color: var(--muted);
  font-size: 12px;
}

.design-plugin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.design-plugin-actions button {
  min-height: 32px;
  border: 1px solid #cad3df;
  border-radius: 7px;
  padding: 0 10px;
  background: #fff;
  color: #253044;
  font-size: 12px;
  font-weight: 700;
}

.design-plugin-actions button:hover,
.design-plugin-actions button.active {
  border-color: rgba(15, 118, 110, 0.55);
  background: #ecfdf5;
  color: #0f766e;
}

.web-design-plugin-ready .panel,
.web-design-plugin-ready .stage,
.web-design-plugin-ready .material-tile,
.web-design-plugin-ready .ocr-review-card,
.web-design-plugin-ready .quality-item,
.web-design-plugin-ready .quality-empty,
.web-design-plugin-ready .quality-ok {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.web-design-plugin-ready .panel-heading {
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
}

.web-design-plugin-ready .tabs {
  gap: 8px;
  border-bottom: 0;
}

.web-design-plugin-ready .tab {
  border: 1px solid transparent;
  border-radius: 8px;
}

.web-design-plugin-ready .tab.active {
  border-color: #cad3df;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.web-design-plugin-ready .case-item {
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.web-design-plugin-ready .case-item:hover {
  transform: translateY(-1px);
}

.density-compact .workspace {
  padding: 14px 18px 22px;
}

.density-compact .topbar {
  min-height: 72px;
  padding: 12px 14px;
}

.density-compact .topbar h2 {
  font-size: 22px;
}

.density-compact .design-plugin-bar,
.density-compact .production-console,
.density-compact .panel-heading,
.density-compact .split-controls,
.density-compact .ocr-quality-panel,
.density-compact .ocr-review-panel,
.density-compact .delivery-gates,
.density-compact .materials-grid,
.density-compact .health-list,
.density-compact .question-list,
.density-compact .delivery-links,
.density-compact .text-preview,
.density-compact .log-view {
  padding: 10px;
}

.density-compact .case-item {
  padding: 9px;
}

.density-compact .stage {
  min-height: 46px;
  padding: 7px 9px;
}

.density-compact .panel-heading {
  min-height: 42px;
}

.focus-mode .app-shell {
  grid-template-columns: 1fr;
}

.focus-mode .sidebar {
  display: none;
}

.focus-mode .workspace {
  width: min(1480px, 100%);
  margin: 0 auto;
}

@media (max-width: 900px) {
  .design-plugin-bar {
    grid-template-columns: 1fr;
  }

  .design-plugin-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .design-plugin-actions button {
    width: 100%;
  }
}

/* YFLOS visual redesign v2: operational command desk */
:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #edf3f7;
  --line: #d5dde8;
  --line-strong: #aeb9c8;
  --text: #172033;
  --muted: #667085;
  --muted-2: #8a95a6;
  --accent: #176b5f;
  --accent-2: #2f5597;
  --ok: #16854a;
  --warn: #ad5f00;
  --bad: #c33838;
  --blue: #3157d5;
  --sidebar: #0f1724;
  --sidebar-2: #121d2d;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 14px 32px rgba(16, 24, 40, 0.08);
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 20px rgba(16, 24, 40, 0.055);
}

body {
  background:
    linear-gradient(180deg, #e9eef5 0, #f7f9fc 220px, #f2f5f9 100%),
    repeating-linear-gradient(90deg, rgba(23, 32, 51, 0.035) 0 1px, transparent 1px 84px);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app-shell {
  grid-template-columns: 326px minmax(0, 1fr);
}

.sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(49, 87, 213, 0.13), transparent 280px),
    linear-gradient(135deg, rgba(23, 107, 95, 0.22), transparent 34%),
    linear-gradient(180deg, var(--sidebar), #0b111d 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.brand {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 13px;
  margin-bottom: 16px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(174, 185, 202, 0.16);
}

.brand-mark {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #176b5f 0%, #3157d5 62%, #5d4bd8 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.brand h1 {
  font-size: 19px;
  font-weight: 800;
}

.brand p {
  max-width: 210px;
  color: #9dacbf;
  line-height: 1.35;
}

.search-row {
  grid-template-columns: minmax(0, 1fr) 40px;
  margin-bottom: 12px;
}

.search-row input {
  height: 42px;
  border-color: rgba(174, 185, 202, 0.18);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.icon-button {
  min-height: 42px;
  border-color: rgba(174, 185, 202, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.case-summary {
  gap: 7px;
  margin-bottom: 12px;
}

.summary-pill {
  min-height: 62px;
  border-color: rgba(174, 185, 202, 0.16);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.summary-pill strong {
  font-size: 22px;
  font-weight: 800;
}

.summary-pill span {
  color: #a8b5c7;
  font-weight: 620;
}

.status-filters {
  gap: 6px;
  margin-bottom: 14px;
}

.status-filter {
  min-height: 36px;
  border-color: rgba(174, 185, 202, 0.16);
  background: rgba(255, 255, 255, 0.055);
  color: #d6deea;
}

.status-filter.active {
  border-color: rgba(45, 212, 191, 0.45);
  background: rgba(23, 107, 95, 0.34);
  box-shadow: inset 3px 0 0 #2dd4bf;
}

.case-list {
  gap: 9px;
}

.case-item {
  position: relative;
  overflow: hidden;
  border-color: rgba(174, 185, 202, 0.14);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.case-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: transparent;
}

.case-item:hover,
.case-item.active {
  border-color: rgba(45, 212, 191, 0.5);
  background: rgba(23, 107, 95, 0.18);
}

.case-item.active::before {
  background: #2dd4bf;
}

.case-name {
  font-size: 14px;
  font-weight: 780;
}

.case-line {
  color: #aebacf;
}

.workspace {
  padding: 22px 26px 34px;
}

.topbar {
  min-height: 104px;
  align-items: center;
  padding: 18px 18px 18px 20px;
  border: 1px solid rgba(174, 185, 202, 0.72);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(23, 107, 95, 0.07), transparent 38%),
    #ffffff;
  box-shadow: var(--shadow);
}

.eyeline {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.topbar h2 {
  max-width: 860px;
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 860;
  line-height: 1.12;
}

.topbar p {
  max-width: 780px;
  color: #5f6c7e;
  font-size: 14px;
}

.primary,
.secondary,
.icon-button,
.design-plugin-actions button,
.as-button {
  border-radius: 7px;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.primary {
  background: linear-gradient(180deg, #1c7a6d, #145f55);
  box-shadow: 0 8px 18px rgba(20, 95, 85, 0.18);
}

.primary:hover {
  background: linear-gradient(180deg, #208679, #176b5f);
  transform: translateY(-1px);
}

.secondary {
  border-color: #c6d0dd;
  background: #ffffff;
  color: #263247;
}

.secondary:hover {
  border-color: #9fb0c4;
  background: #f8fafc;
}

.design-plugin-bar {
  min-height: 44px;
  border-color: rgba(174, 185, 202, 0.72);
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-soft);
}

.design-plugin-title strong {
  color: #263247;
  font-weight: 820;
}

.design-plugin-actions button {
  min-height: 34px;
  border-color: #cbd5e1;
  background: #ffffff;
  color: #253044;
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.035);
}

.design-plugin-actions button:hover,
.design-plugin-actions button.active {
  border-color: rgba(23, 107, 95, 0.42);
  background: #edf8f6;
  color: var(--accent);
}

.admin-nav {
  display: grid;
  grid-template-columns: repeat(9, minmax(72px, 1fr));
  width: 100%;
  gap: 3px;
  padding: 5px;
  border-color: rgba(174, 185, 202, 0.68);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.admin-nav-item {
  min-height: 38px;
  padding: 0 8px;
  color: #59667a;
  font-size: 13px;
  font-weight: 760;
}

.admin-nav-item.active {
  background: #e9f5f2;
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.admin-panel,
.case-workspace {
  gap: 14px;
}

.admin-panel-head,
.production-console,
.ops-card,
.panel,
.student-card,
.student-profile-schema,
.permission-card,
.permission-note {
  border-color: rgba(174, 185, 202, 0.72);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.admin-panel-head {
  padding: 16px;
}

.admin-panel-head h3,
.production-head h3,
.panel-heading h3,
.ops-card-head h4 {
  color: #172033;
  font-weight: 820;
}

.admin-panel-head p,
.production-head p,
.ops-card-head span,
.layer-card p,
.stakeholder-card p,
.backlog-card p,
.profile-level-card p,
.ability-card p,
.subject-card p,
.workflow-module p,
.workflow-stage-card p,
.cadence-card p,
.output-card p,
.quality-release-card p,
.release-card p {
  color: #667085;
}

.readiness-grid,
.production-stats,
.student-stats {
  gap: 10px;
}

.readiness-item,
.production-stat,
.student-stat {
  border-color: #d8e0ea;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.035);
}

.readiness-item strong,
.production-stat strong,
.student-stat strong {
  color: #172033;
  font-size: 24px;
  font-weight: 860;
}

.production-console {
  padding: 16px;
  background:
    linear-gradient(90deg, rgba(49, 87, 213, 0.055), transparent 36%),
    #ffffff;
}

.production-stat.auto {
  border-color: rgba(23, 107, 95, 0.24);
  background: #eef9f6;
}

.production-stat.manual {
  border-color: rgba(173, 95, 0, 0.22);
  background: #fff7eb;
}

.production-stat.blocked {
  border-color: rgba(195, 56, 56, 0.22);
  background: #fff1f2;
}

.production-stat.done {
  border-color: rgba(22, 133, 74, 0.22);
  background: #eefaf2;
}

body[data-has-current-case="true"] .production-console {
  background: #ffffff;
}

.status-strip {
  gap: 9px;
}

.stage {
  min-height: 62px;
  border-color: #d6dfeb;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-soft);
}

.stage.done {
  border-color: rgba(22, 133, 74, 0.28);
  background: #effaf3;
}

.stage.current {
  border-color: rgba(49, 87, 213, 0.42);
  background: #eef4ff;
}

.tabs {
  align-items: center;
  gap: 8px;
  padding-top: 0;
}

.tab {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #59667a;
}

.tab.active {
  border-color: #cad5e3;
  background: #ffffff;
  color: #172033;
  box-shadow: inset 0 -2px 0 var(--accent), var(--shadow-soft);
}

.panel {
  overflow: hidden;
}

.panel-heading {
  min-height: 52px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.kv-grid dt,
.kv-grid dd {
  border-bottom-color: #edf1f6;
}

.next-action {
  color: #263247;
}

.delivery-gate,
.layer-card,
.stakeholder-card,
.profile-level-card,
.ability-card,
.subject-card,
.workflow-module,
.workflow-stage-card,
.cadence-card,
.output-card,
.quality-release-card,
.release-card,
.backlog-card,
.student-card,
.staff-row,
.ability-database-card {
  border-color: #d8e0ea;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.035);
}

.layer-card {
  grid-template-columns: 36px minmax(0, 1fr) auto;
}

.layer-index,
.workflow-module b,
.backlog-card b,
.workflow-stage-card b {
  background: #e9f5f2;
  color: var(--accent);
}

.ops-card-head span,
.layer-card > span,
.stakeholder-card span,
.workflow-module > span {
  background: #edf2f7;
  color: #59667a;
}

.delivery-gate.ok,
.quality-green {
  background: #eefaf2;
}

.delivery-gate.warn,
.quality-yellow {
  background: #fff7eb;
}

.delivery-gate.bad,
.quality-red {
  background: #fff1f2;
}

.materials-grid {
  background: #fbfcfe;
}

.material-tile {
  border-color: #d8e0ea;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.035);
}

.report-preview iframe,
.text-preview,
.log-view,
.parent-report-preview,
.spec-editor textarea {
  border-color: #d8e0ea;
}

.toast {
  background: #111827;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.24);
}

@media (max-width: 1180px) {
  .admin-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body {
    background: #f2f5f9;
  }

  .workspace {
    padding: 14px;
  }

  .topbar {
    min-height: 0;
    padding: 16px;
  }

  .topbar h2 {
    font-size: 25px;
  }

  .design-plugin-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-nav-item {
    min-height: 42px;
  }

  .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-has-current-case="true"] .production-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.web-design-plugin-ready {
  background:
    linear-gradient(180deg, #e8edf4 0, #f7f9fc 210px, #f1f4f8 100%),
    repeating-linear-gradient(90deg, rgba(23, 32, 51, 0.035) 0 1px, transparent 1px 84px);
}

body.web-design-plugin-ready .sidebar {
  background:
    linear-gradient(180deg, rgba(49, 87, 213, 0.13), transparent 280px),
    linear-gradient(135deg, rgba(23, 107, 95, 0.22), transparent 34%),
    linear-gradient(180deg, #0f1724 0%, #0b111d 100%);
}

body.web-design-plugin-ready .workspace {
  padding: 22px 26px 34px;
}

body.web-design-plugin-ready .topbar {
  min-height: 104px;
  align-items: center;
  padding: 18px 18px 18px 20px;
  border: 1px solid rgba(174, 185, 202, 0.72);
  border-left: 4px solid var(--accent);
  background:
    linear-gradient(90deg, rgba(23, 107, 95, 0.075), transparent 40%),
    linear-gradient(180deg, #ffffff, #fbfcfe);
  box-shadow: var(--shadow);
}

body.web-design-plugin-ready .topbar h2 {
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 860;
}

body.web-design-plugin-ready .panel,
body.web-design-plugin-ready .stage,
body.web-design-plugin-ready .material-tile,
body.web-design-plugin-ready .ocr-review-card,
body.web-design-plugin-ready .quality-item,
body.web-design-plugin-ready .quality-empty,
body.web-design-plugin-ready .quality-ok {
  box-shadow: var(--shadow-soft);
}

body.web-design-plugin-ready .panel-heading {
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.empty-state {
  min-height: 220px;
  align-content: center;
  border-color: rgba(174, 185, 202, 0.7);
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-soft);
}

.empty-inner {
  max-width: 560px;
}

.empty-inner h3 {
  font-size: 20px;
}

.empty-inner p {
  margin: 0;
  color: #667085;
}

#productionConsole + .empty-state {
  min-height: 180px;
}

#productionConsole + .empty-state .empty-inner h3 {
  margin-bottom: 6px;
}

@media (max-width: 720px) {
  body.web-design-plugin-ready .workspace {
    padding: 14px;
  }

  body.web-design-plugin-ready .topbar {
    min-height: 0;
    padding: 16px;
  }

  body.web-design-plugin-ready .topbar h2 {
    font-size: 25px;
  }
}

/* YFLOS high-end redesign v4: private intelligence atelier */
:root {
  --bg: #f1f3f2;
  --surface: #fffefa;
  --surface-2: #f6f5ef;
  --surface-3: #ecefe8;
  --line: #d8d1c0;
  --line-strong: #bda56d;
  --text: #151922;
  --muted: #626b76;
  --muted-2: #88909a;
  --accent: #0c7668;
  --accent-2: #c09a4a;
  --ok: #167a44;
  --warn: #a56412;
  --bad: #b93636;
  --blue: #3658c9;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.7), 0 24px 64px rgba(12, 16, 24, 0.13);
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.65), 0 14px 34px rgba(12, 16, 24, 0.09);
}

body.web-design-plugin-ready {
  background:
    linear-gradient(180deg, #07090d 0, #101620 262px, #e5e8e8 262px, #f5f5f1 100%),
    repeating-linear-gradient(135deg, rgba(192, 154, 74, 0.09) 0 1px, transparent 1px 22px);
  color: var(--text);
}

body.web-design-plugin-ready .app-shell {
  grid-template-columns: 336px minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(7, 9, 13, 0.98) 0 336px, transparent 336px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 320px);
}

body.web-design-plugin-ready .sidebar {
  border-right: 1px solid rgba(192, 154, 74, 0.3);
  background:
    linear-gradient(180deg, rgba(192, 154, 74, 0.12), transparent 30%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, #07090d 0%, #11161e 48%, #07110f 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04), 18px 0 56px rgba(7, 9, 13, 0.18);
}

body.web-design-plugin-ready .brand {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(192, 154, 74, 0.22);
}

body.web-design-plugin-ready .brand-mark {
  width: 52px;
  height: 52px;
  border-color: rgba(220, 196, 137, 0.62);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 42%),
    linear-gradient(135deg, #0b1517 0%, #0c7668 54%, #c09a4a 100%);
  color: #fff8df;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body.web-design-plugin-ready .brand h1 {
  color: #fffefa;
  font-size: 19px;
  font-weight: 860;
}

body.web-design-plugin-ready .brand p {
  color: #b6bdc5;
}

body.web-design-plugin-ready .search-row input,
body.web-design-plugin-ready .icon-button {
  border-color: rgba(192, 154, 74, 0.28);
  background: rgba(255, 255, 255, 0.07);
  color: #f8f7ef;
}

body.web-design-plugin-ready .search-row input:focus {
  border-color: rgba(220, 196, 137, 0.72);
  box-shadow: 0 0 0 3px rgba(192, 154, 74, 0.16);
}

body.web-design-plugin-ready .summary-pill,
body.web-design-plugin-ready .status-filter,
body.web-design-plugin-ready .case-item {
  border-color: rgba(192, 154, 74, 0.2);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

body.web-design-plugin-ready .summary-pill strong {
  color: #fffefa;
}

body.web-design-plugin-ready .summary-pill span,
body.web-design-plugin-ready .status-filter,
body.web-design-plugin-ready .case-line {
  color: #bbc4cc;
}

body.web-design-plugin-ready .status-filter.active,
body.web-design-plugin-ready .case-item:hover,
body.web-design-plugin-ready .case-item.active {
  border-color: rgba(220, 196, 137, 0.56);
  background:
    linear-gradient(90deg, rgba(192, 154, 74, 0.14), transparent 70%),
    rgba(12, 118, 104, 0.16);
}

body.web-design-plugin-ready .case-item.active::before {
  background: #d7bd78;
}

body.web-design-plugin-ready .case-name {
  color: #fffefa;
}

body.web-design-plugin-ready .workspace {
  padding: 26px 30px 40px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0, rgba(255, 255, 255, 0.025) 210px, transparent 211px),
    linear-gradient(180deg, transparent 0, transparent 250px, rgba(255, 255, 255, 0.28) 250px);
}

body.web-design-plugin-ready .topbar {
  min-height: 136px;
  margin-bottom: 14px;
  padding: 24px 24px 22px;
  border: 1px solid rgba(220, 196, 137, 0.34);
  border-left: 4px solid #c09a4a;
  background:
    linear-gradient(120deg, rgba(192, 154, 74, 0.2), transparent 36%),
    linear-gradient(135deg, #090d13 0%, #151c27 62%, #0b1514 100%);
  color: #fffefa;
  box-shadow: 0 28px 78px rgba(7, 9, 13, 0.34);
}

body.web-design-plugin-ready .eyeline {
  color: #d7bd78;
  font-size: 12px;
  font-weight: 820;
}

body.web-design-plugin-ready .topbar h2 {
  color: #fffefa;
  font-size: clamp(32px, 3vw, 46px);
  font-weight: 880;
  line-height: 1.06;
}

body.web-design-plugin-ready .topbar p {
  max-width: 760px;
  color: #d4d8dd;
  font-size: 14px;
}

body.web-design-plugin-ready .topbar .primary {
  background: linear-gradient(180deg, #e1c57a 0%, #b88a3c 100%);
  color: #11151c;
  box-shadow: 0 14px 30px rgba(192, 154, 74, 0.22);
}

body.web-design-plugin-ready .topbar .primary:hover {
  background: linear-gradient(180deg, #ead28e 0%, #c39747 100%);
}

body.web-design-plugin-ready .topbar .secondary {
  border-color: rgba(220, 196, 137, 0.36);
  background: rgba(255, 255, 255, 0.07);
  color: #f8f7ef;
}

body.web-design-plugin-ready .design-plugin-bar,
body.web-design-plugin-ready .admin-nav {
  border: 1px solid rgba(220, 196, 137, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.045)),
    #0d121a;
  box-shadow: 0 18px 48px rgba(7, 9, 13, 0.22);
  backdrop-filter: blur(16px);
}

body.web-design-plugin-ready .design-plugin-title strong {
  color: #fffefa;
}

body.web-design-plugin-ready .design-plugin-actions button,
body.web-design-plugin-ready .admin-nav-item {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  color: #e5e8ed;
  box-shadow: none;
}

body.web-design-plugin-ready .design-plugin-actions button:hover,
body.web-design-plugin-ready .design-plugin-actions button.active,
body.web-design-plugin-ready .admin-nav-item:hover,
body.web-design-plugin-ready .admin-nav-item.active {
  border-color: rgba(220, 196, 137, 0.46);
  background:
    linear-gradient(180deg, rgba(192, 154, 74, 0.22), rgba(12, 118, 104, 0.16));
  color: #fffefa;
  box-shadow: inset 0 -2px 0 #d7bd78;
}

body.web-design-plugin-ready .admin-panel-head,
body.web-design-plugin-ready .production-console,
body.web-design-plugin-ready .ops-card,
body.web-design-plugin-ready .panel,
body.web-design-plugin-ready .student-card,
body.web-design-plugin-ready .student-profile-schema,
body.web-design-plugin-ready .permission-card,
body.web-design-plugin-ready .permission-note,
body.web-design-plugin-ready .empty-state {
  border: 1px solid rgba(192, 154, 74, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 249, 243, 0.94)),
    #fffefa;
  box-shadow: var(--shadow-soft);
}

body.web-design-plugin-ready .admin-panel-head,
body.web-design-plugin-ready .production-console {
  padding: 18px;
}

body.web-design-plugin-ready .admin-panel-head h3,
body.web-design-plugin-ready .production-head h3,
body.web-design-plugin-ready .panel-heading h3,
body.web-design-plugin-ready .ops-card-head h4 {
  color: #151922;
  font-weight: 860;
}

body.web-design-plugin-ready .admin-panel-head p,
body.web-design-plugin-ready .production-head p,
body.web-design-plugin-ready .ops-card-head span,
body.web-design-plugin-ready .layer-card p,
body.web-design-plugin-ready .stakeholder-card p,
body.web-design-plugin-ready .backlog-card p,
body.web-design-plugin-ready .profile-level-card p,
body.web-design-plugin-ready .ability-card p,
body.web-design-plugin-ready .subject-card p,
body.web-design-plugin-ready .workflow-module p,
body.web-design-plugin-ready .workflow-stage-card p,
body.web-design-plugin-ready .cadence-card p,
body.web-design-plugin-ready .output-card p,
body.web-design-plugin-ready .quality-release-card p,
body.web-design-plugin-ready .release-card p {
  color: #626b76;
}

body.web-design-plugin-ready .ops-card-head span,
body.web-design-plugin-ready .layer-card > span,
body.web-design-plugin-ready .stakeholder-card span,
body.web-design-plugin-ready .workflow-module > span,
body.web-design-plugin-ready .readiness-item,
body.web-design-plugin-ready .production-stat,
body.web-design-plugin-ready .student-stat {
  border-color: rgba(192, 154, 74, 0.22);
  background:
    linear-gradient(180deg, #fffefa, #f4f2ea);
}

body.web-design-plugin-ready .ops-card-head span,
body.web-design-plugin-ready .layer-card > span,
body.web-design-plugin-ready .stakeholder-card span,
body.web-design-plugin-ready .workflow-module > span {
  border: 1px solid rgba(192, 154, 74, 0.18);
  border-radius: 6px;
  color: #775d2b;
}

body.web-design-plugin-ready .readiness-item strong,
body.web-design-plugin-ready .production-stat strong,
body.web-design-plugin-ready .student-stat strong {
  color: #151922;
  font-weight: 880;
}

body.web-design-plugin-ready .production-console {
  background:
    linear-gradient(120deg, rgba(192, 154, 74, 0.12), transparent 34%),
    linear-gradient(180deg, #fffefa, #f2f5f0);
}

body.web-design-plugin-ready .production-stat.auto,
body.web-design-plugin-ready .stage.done,
body.web-design-plugin-ready .delivery-gate.ok,
body.web-design-plugin-ready .quality-green {
  border-color: rgba(12, 118, 104, 0.32);
  background: linear-gradient(180deg, #f3fbf7, #e8f4ef);
}

body.web-design-plugin-ready .production-stat.manual,
body.web-design-plugin-ready .delivery-gate.warn,
body.web-design-plugin-ready .quality-yellow {
  border-color: rgba(192, 154, 74, 0.34);
  background: linear-gradient(180deg, #fff9e8, #f7efd8);
}

body.web-design-plugin-ready .production-stat.blocked,
body.web-design-plugin-ready .delivery-gate.bad,
body.web-design-plugin-ready .quality-red {
  border-color: rgba(185, 54, 54, 0.28);
  background: linear-gradient(180deg, #fff4f3, #f8e8e7);
}

body.web-design-plugin-ready .production-stat.done {
  border-color: rgba(54, 88, 201, 0.28);
  background: linear-gradient(180deg, #f1f4ff, #e8edf9);
}

body.web-design-plugin-ready .stage,
body.web-design-plugin-ready .delivery-gate,
body.web-design-plugin-ready .layer-card,
body.web-design-plugin-ready .stakeholder-card,
body.web-design-plugin-ready .profile-level-card,
body.web-design-plugin-ready .ability-card,
body.web-design-plugin-ready .subject-card,
body.web-design-plugin-ready .workflow-module,
body.web-design-plugin-ready .workflow-stage-card,
body.web-design-plugin-ready .cadence-card,
body.web-design-plugin-ready .output-card,
body.web-design-plugin-ready .quality-release-card,
body.web-design-plugin-ready .release-card,
body.web-design-plugin-ready .backlog-card,
body.web-design-plugin-ready .student-card,
body.web-design-plugin-ready .staff-row,
body.web-design-plugin-ready .ability-database-card,
body.web-design-plugin-ready .material-tile,
body.web-design-plugin-ready .ocr-review-card,
body.web-design-plugin-ready .quality-item,
body.web-design-plugin-ready .quality-empty,
body.web-design-plugin-ready .quality-ok {
  border-color: rgba(192, 154, 74, 0.22);
  background: linear-gradient(180deg, #fffefa, #f7f6f0);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 24px rgba(12, 16, 24, 0.06);
}

body.web-design-plugin-ready .layer-card.ready,
body.web-design-plugin-ready .stakeholder-card.ready,
body.web-design-plugin-ready .workflow-module.ready,
body.web-design-plugin-ready .cadence-card {
  border-left-color: #0c7668;
}

body.web-design-plugin-ready .layer-card.pending,
body.web-design-plugin-ready .stakeholder-card.pending,
body.web-design-plugin-ready .workflow-module.pending {
  border-left-color: #c09a4a;
}

body.web-design-plugin-ready .layer-card.building,
body.web-design-plugin-ready .stakeholder-card.building,
body.web-design-plugin-ready .workflow-module.building,
body.web-design-plugin-ready .workflow-stage-card,
body.web-design-plugin-ready .ability-card,
body.web-design-plugin-ready .subject-card {
  border-left-color: #3658c9;
}

body.web-design-plugin-ready .layer-index,
body.web-design-plugin-ready .workflow-module b,
body.web-design-plugin-ready .backlog-card b,
body.web-design-plugin-ready .workflow-stage-card b {
  border: 1px solid rgba(192, 154, 74, 0.26);
  background: linear-gradient(180deg, #f8f1de, #e9dcc2);
  color: #775d2b;
}

body.web-design-plugin-ready .panel {
  overflow: hidden;
}

body.web-design-plugin-ready .panel-heading {
  min-height: 58px;
  background:
    linear-gradient(90deg, rgba(192, 154, 74, 0.11), transparent 32%),
    linear-gradient(180deg, #fffefa, #f4f3ec);
}

body.web-design-plugin-ready .tabs {
  gap: 7px;
}

body.web-design-plugin-ready .tab {
  min-height: 40px;
  border-color: transparent;
  color: #626b76;
  font-weight: 760;
}

body.web-design-plugin-ready .tab.active {
  border-color: rgba(192, 154, 74, 0.34);
  background: linear-gradient(180deg, #fffefa, #f2ecdc);
  color: #151922;
  box-shadow: inset 0 -2px 0 #c09a4a;
}

body.web-design-plugin-ready .primary {
  background: linear-gradient(180deg, #0e8878, #0b675c);
  color: #fffefa;
  box-shadow: 0 12px 24px rgba(12, 118, 104, 0.18);
}

body.web-design-plugin-ready .secondary {
  border-color: rgba(192, 154, 74, 0.32);
  background: linear-gradient(180deg, #fffefa, #f4f2ea);
  color: #151922;
}

body.web-design-plugin-ready .primary:hover,
body.web-design-plugin-ready .secondary:hover,
body.web-design-plugin-ready .icon-button:hover,
body.web-design-plugin-ready .design-plugin-actions button:hover {
  transform: translateY(-1px);
}

body.web-design-plugin-ready .materials-grid {
  border: 1px solid rgba(192, 154, 74, 0.18);
  background:
    repeating-linear-gradient(135deg, rgba(192, 154, 74, 0.06) 0 1px, transparent 1px 18px),
    #f7f7f1;
}

body.web-design-plugin-ready .report-preview iframe,
body.web-design-plugin-ready .text-preview,
body.web-design-plugin-ready .log-view,
body.web-design-plugin-ready .parent-report-preview,
body.web-design-plugin-ready .spec-editor textarea {
  border-color: rgba(192, 154, 74, 0.28);
}

body.web-design-plugin-ready .empty-state {
  min-height: 240px;
  background:
    linear-gradient(120deg, rgba(192, 154, 74, 0.12), transparent 42%),
    linear-gradient(180deg, #fffefa, #f4f3ec);
}

body.web-design-plugin-ready .empty-inner h3 {
  color: #151922;
  font-size: 22px;
  font-weight: 860;
}

body.web-design-plugin-ready .empty-inner p {
  color: #626b76;
}

body.web-design-plugin-ready .toast {
  border: 1px solid rgba(220, 196, 137, 0.38);
  background: #101620;
  box-shadow: 0 24px 58px rgba(7, 9, 13, 0.34);
}

@media (max-width: 1280px) {
  body.web-design-plugin-ready .admin-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  body.web-design-plugin-ready .app-shell {
    grid-template-columns: 1fr;
    background: linear-gradient(180deg, #07090d 0, #101620 280px, #f5f5f1 280px);
  }

  body.web-design-plugin-ready .sidebar {
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(192, 154, 74, 0.28);
  }
}

@media (max-width: 720px) {
  body.web-design-plugin-ready {
    background: linear-gradient(180deg, #07090d 0, #111820 210px, #f5f5f1 210px);
  }

  body.web-design-plugin-ready .app-shell {
    display: flex;
    flex-direction: column;
    background: transparent;
  }

  body.web-design-plugin-ready .workspace {
    order: 1;
    padding: 14px;
  }

  body.web-design-plugin-ready .sidebar {
    order: 2;
  }

  body.web-design-plugin-ready .topbar {
    min-height: 0;
    display: grid;
    gap: 16px;
    padding: 18px;
  }

  body.web-design-plugin-ready .topbar h2 {
    font-size: 30px;
    line-height: 1.12;
  }

  body.web-design-plugin-ready .topbar-actions,
  body.web-design-plugin-ready .production-actions,
  body.web-design-plugin-ready .admin-panel-tools {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  body.web-design-plugin-ready .topbar-actions button,
  body.web-design-plugin-ready .production-actions button,
  body.web-design-plugin-ready .admin-panel-tools button {
    width: 100%;
  }

  body.web-design-plugin-ready .design-plugin-bar {
    grid-template-columns: 1fr;
  }

  body.web-design-plugin-ready .design-plugin-actions,
  body.web-design-plugin-ready .admin-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* YFLOS ocean voyage motion theme v5 */
:root {
  --bg: #eef7f8;
  --surface: #fbffff;
  --surface-2: #eef8f9;
  --surface-3: #ddecef;
  --line: #b9d4d8;
  --line-strong: #6fb6c6;
  --text: #102130;
  --muted: #5d7080;
  --muted-2: #8394a1;
  --accent: #0a8f9c;
  --accent-2: #d9b66d;
  --ok: #0f8555;
  --warn: #a86b16;
  --bad: #b83b42;
  --blue: #1b66d8;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.72), 0 28px 70px rgba(4, 22, 41, 0.16);
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.7), 0 16px 38px rgba(4, 22, 41, 0.11);
}

body.web-design-plugin-ready {
  overflow-x: hidden;
  background:
    linear-gradient(180deg, #021126 0, #052a4b 246px, #0a4263 246px, #e7f2f3 247px, #f6fbfa 100%),
    repeating-linear-gradient(115deg, rgba(119, 210, 229, 0.09) 0 1px, transparent 1px 26px);
}

body.web-design-plugin-ready .voyage-dynamics {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 16%, rgba(97, 205, 232, 0.13) 24%, transparent 36% 100%),
    repeating-linear-gradient(118deg, rgba(165, 231, 244, 0.045) 0 1px, transparent 1px 34px);
  animation: yflosOceanLight 18s ease-in-out infinite alternate;
}

body.web-design-plugin-ready .voyage-wave {
  position: absolute;
  left: -14vw;
  right: -14vw;
  height: 220px;
  opacity: 0.58;
  background:
    repeating-radial-gradient(ellipse at 50% 125%, transparent 0 34px, rgba(114, 215, 235, 0.22) 36px 37px, transparent 39px 72px),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: skewY(-4deg);
  animation: yflosWaveDrift 22s linear infinite;
}

body.web-design-plugin-ready .voyage-wave-a {
  top: 82px;
}

body.web-design-plugin-ready .voyage-wave-b {
  top: 192px;
  opacity: 0.42;
  animation-duration: 28s;
  animation-direction: reverse;
}

body.web-design-plugin-ready .voyage-wave-c {
  bottom: 18vh;
  opacity: 0.2;
  animation-duration: 34s;
}

body.web-design-plugin-ready .voyage-route {
  position: absolute;
  top: 142px;
  left: clamp(360px, 33vw, 560px);
  width: min(58vw, 820px);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(225, 199, 127, 0.78) 38%, rgba(117, 222, 242, 0.8) 62%, transparent);
  box-shadow: 0 0 22px rgba(117, 222, 242, 0.24);
  transform: rotate(-6deg);
  animation: yflosRoutePulse 5.8s ease-in-out infinite;
}

body.web-design-plugin-ready .voyage-route::after {
  content: "";
  position: absolute;
  right: 18%;
  top: -11px;
  width: 18px;
  height: 22px;
  background: linear-gradient(145deg, #f6d98d, #55d6e9 58%, transparent 59%);
  clip-path: polygon(0 100%, 42% 0, 100% 100%);
  filter: drop-shadow(0 0 12px rgba(117, 222, 242, 0.36));
}

body.web-design-plugin-ready .app-shell {
  position: relative;
  z-index: 1;
  grid-template-columns: 336px minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(2, 13, 30, 0.97) 0 336px, rgba(255, 255, 255, 0) 336px),
    linear-gradient(180deg, rgba(68, 182, 210, 0.08), transparent 330px);
}

body.web-design-plugin-ready .sidebar {
  border-right: 1px solid rgba(112, 202, 222, 0.3);
  background:
    linear-gradient(180deg, rgba(217, 182, 109, 0.1), transparent 26%),
    repeating-linear-gradient(128deg, rgba(139, 222, 239, 0.055) 0 1px, transparent 1px 21px),
    linear-gradient(180deg, #020d1e 0%, #08223c 50%, #021426 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05), 18px 0 56px rgba(3, 23, 43, 0.2);
}

body.web-design-plugin-ready .brand-mark {
  position: relative;
  overflow: hidden;
  border-color: rgba(117, 222, 242, 0.42);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 44%),
    linear-gradient(135deg, #03213d 0%, #0a8f9c 58%, #d9b66d 100%);
  box-shadow: 0 18px 42px rgba(0, 18, 38, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

body.web-design-plugin-ready .brand-mark::before {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 18px;
  height: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(117, 222, 242, 0.16));
  clip-path: polygon(0 100%, 45% 0, 100% 100%);
  opacity: 0.8;
}

body.web-design-plugin-ready .search-row input,
body.web-design-plugin-ready .icon-button,
body.web-design-plugin-ready .summary-pill,
body.web-design-plugin-ready .status-filter,
body.web-design-plugin-ready .case-item {
  border-color: rgba(117, 222, 242, 0.22);
  background: rgba(255, 255, 255, 0.072);
}

body.web-design-plugin-ready .status-filter.active,
body.web-design-plugin-ready .case-item:hover,
body.web-design-plugin-ready .case-item.active {
  border-color: rgba(217, 182, 109, 0.58);
  background:
    linear-gradient(90deg, rgba(217, 182, 109, 0.14), transparent 70%),
    rgba(10, 143, 156, 0.18);
}

body.web-design-plugin-ready .case-item.active::before {
  background: linear-gradient(180deg, #f2cf7f, #5bd7ea);
}

body.web-design-plugin-ready .workspace {
  position: relative;
  padding: 26px 30px 40px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0, rgba(255, 255, 255, 0.025) 230px, transparent 231px),
    linear-gradient(180deg, transparent 0, transparent 252px, rgba(246, 251, 250, 0.55) 252px);
}

body.web-design-plugin-ready .topbar {
  position: relative;
  overflow: hidden;
  min-height: 142px;
  border-color: rgba(117, 222, 242, 0.28);
  border-left-color: #d9b66d;
  background:
    linear-gradient(120deg, rgba(217, 182, 109, 0.16), transparent 34%),
    linear-gradient(150deg, rgba(77, 203, 231, 0.15), transparent 58%),
    linear-gradient(135deg, #031226 0%, #073052 56%, #021223 100%);
  box-shadow: 0 30px 84px rgba(2, 17, 38, 0.38);
}

body.web-design-plugin-ready .topbar > * {
  position: relative;
  z-index: 1;
}

body.web-design-plugin-ready .topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-radial-gradient(ellipse at 48% 132%, transparent 0 30px, rgba(112, 202, 222, 0.18) 32px 33px, transparent 36px 64px),
    linear-gradient(95deg, transparent 0 28%, rgba(255, 255, 255, 0.08) 46%, transparent 68%);
  opacity: 0.72;
  transform: translate3d(-5%, 0, 0) skewY(-3deg);
  animation: yflosTopbarCurrent 16s linear infinite;
}

body.web-design-plugin-ready .topbar::after {
  content: "";
  position: absolute;
  right: clamp(28px, 6vw, 92px);
  bottom: 18px;
  width: clamp(72px, 10vw, 132px);
  height: clamp(78px, 10vw, 138px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(117, 222, 242, 0.18) 58%, transparent 59%),
    linear-gradient(90deg, rgba(217, 182, 109, 0.5), transparent 64%);
  clip-path: polygon(0 100%, 42% 0, 100% 100%);
  opacity: 0.18;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.34));
}

body.web-design-plugin-ready .eyeline {
  color: #f0ce83;
}

body.web-design-plugin-ready .topbar .primary {
  background: linear-gradient(180deg, #f3d78c 0%, #c49946 100%);
  color: #071223;
  box-shadow: 0 14px 30px rgba(217, 182, 109, 0.24);
}

body.web-design-plugin-ready .topbar .secondary {
  border-color: rgba(117, 222, 242, 0.32);
  background: rgba(255, 255, 255, 0.07);
}

body.web-design-plugin-ready .design-plugin-bar,
body.web-design-plugin-ready .admin-nav {
  position: relative;
  overflow: hidden;
  border-color: rgba(117, 222, 242, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.042)),
    #061528;
  box-shadow: 0 18px 48px rgba(3, 23, 43, 0.23);
}

body.web-design-plugin-ready .design-plugin-bar::before,
body.web-design-plugin-ready .admin-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0 28%, rgba(117, 222, 242, 0.12) 48%, transparent 70%);
  transform: translateX(-58%);
  animation: yflosSurfaceSweep 9s ease-in-out infinite;
}

body.web-design-plugin-ready .design-plugin-bar > *,
body.web-design-plugin-ready .admin-nav > * {
  position: relative;
  z-index: 1;
}

body.web-design-plugin-ready .design-plugin-actions button:hover,
body.web-design-plugin-ready .design-plugin-actions button.active,
body.web-design-plugin-ready .admin-nav-item:hover,
body.web-design-plugin-ready .admin-nav-item.active {
  border-color: rgba(217, 182, 109, 0.5);
  background:
    linear-gradient(180deg, rgba(217, 182, 109, 0.2), rgba(10, 143, 156, 0.18));
  box-shadow: inset 0 -2px 0 #f0ce83;
}

body.web-design-plugin-ready .admin-panel-head,
body.web-design-plugin-ready .production-console,
body.web-design-plugin-ready .ops-card,
body.web-design-plugin-ready .panel,
body.web-design-plugin-ready .student-card,
body.web-design-plugin-ready .student-profile-schema,
body.web-design-plugin-ready .permission-card,
body.web-design-plugin-ready .permission-note,
body.web-design-plugin-ready .empty-state {
  border-color: rgba(111, 182, 198, 0.38);
  background:
    linear-gradient(180deg, rgba(251, 255, 255, 0.97), rgba(239, 248, 249, 0.95)),
    #fbffff;
  box-shadow: var(--shadow-soft);
}

body.web-design-plugin-ready .production-console {
  background:
    linear-gradient(116deg, rgba(117, 222, 242, 0.12), transparent 38%),
    linear-gradient(180deg, #fbffff, #edf8f8);
}

body.web-design-plugin-ready .ops-card-head span,
body.web-design-plugin-ready .layer-card > span,
body.web-design-plugin-ready .stakeholder-card span,
body.web-design-plugin-ready .workflow-module > span,
body.web-design-plugin-ready .readiness-item,
body.web-design-plugin-ready .production-stat,
body.web-design-plugin-ready .student-stat {
  border-color: rgba(111, 182, 198, 0.28);
  background: linear-gradient(180deg, #fbffff, #eaf5f6);
}

body.web-design-plugin-ready .ops-card-head span,
body.web-design-plugin-ready .layer-card > span,
body.web-design-plugin-ready .stakeholder-card span,
body.web-design-plugin-ready .workflow-module > span {
  color: #277485;
}

body.web-design-plugin-ready .stage,
body.web-design-plugin-ready .delivery-gate,
body.web-design-plugin-ready .layer-card,
body.web-design-plugin-ready .stakeholder-card,
body.web-design-plugin-ready .profile-level-card,
body.web-design-plugin-ready .ability-card,
body.web-design-plugin-ready .subject-card,
body.web-design-plugin-ready .workflow-module,
body.web-design-plugin-ready .workflow-stage-card,
body.web-design-plugin-ready .cadence-card,
body.web-design-plugin-ready .output-card,
body.web-design-plugin-ready .quality-release-card,
body.web-design-plugin-ready .release-card,
body.web-design-plugin-ready .backlog-card,
body.web-design-plugin-ready .student-card,
body.web-design-plugin-ready .staff-row,
body.web-design-plugin-ready .ability-database-card,
body.web-design-plugin-ready .material-tile,
body.web-design-plugin-ready .ocr-review-card,
body.web-design-plugin-ready .quality-item,
body.web-design-plugin-ready .quality-empty,
body.web-design-plugin-ready .quality-ok {
  border-color: rgba(111, 182, 198, 0.28);
  background: linear-gradient(180deg, #fbffff, #edf7f8);
}

body.web-design-plugin-ready .layer-card.ready,
body.web-design-plugin-ready .stakeholder-card.ready,
body.web-design-plugin-ready .workflow-module.ready,
body.web-design-plugin-ready .cadence-card {
  border-left-color: #0a8f9c;
}

body.web-design-plugin-ready .layer-card.pending,
body.web-design-plugin-ready .stakeholder-card.pending,
body.web-design-plugin-ready .workflow-module.pending {
  border-left-color: #d9b66d;
}

body.web-design-plugin-ready .layer-card.building,
body.web-design-plugin-ready .stakeholder-card.building,
body.web-design-plugin-ready .workflow-module.building,
body.web-design-plugin-ready .workflow-stage-card,
body.web-design-plugin-ready .ability-card,
body.web-design-plugin-ready .subject-card {
  border-left-color: #1b66d8;
}

body.web-design-plugin-ready .layer-index,
body.web-design-plugin-ready .workflow-module b,
body.web-design-plugin-ready .backlog-card b,
body.web-design-plugin-ready .workflow-stage-card b {
  border-color: rgba(111, 182, 198, 0.32);
  background: linear-gradient(180deg, #e7fbfd, #cfeef3);
  color: #0b7180;
}

body.web-design-plugin-ready .panel-heading {
  background:
    linear-gradient(90deg, rgba(117, 222, 242, 0.12), transparent 34%),
    linear-gradient(180deg, #fbffff, #eaf5f6);
}

body.web-design-plugin-ready .tab.active {
  border-color: rgba(111, 182, 198, 0.38);
  background: linear-gradient(180deg, #fbffff, #e3f1f3);
  box-shadow: inset 0 -2px 0 #0a8f9c;
}

body.web-design-plugin-ready .primary {
  background: linear-gradient(180deg, #0aa5b2, #087987);
  color: #fbffff;
  box-shadow: 0 12px 24px rgba(10, 143, 156, 0.18);
}

body.web-design-plugin-ready .secondary {
  border-color: rgba(111, 182, 198, 0.34);
  background: linear-gradient(180deg, #fbffff, #eef8f9);
}

body.web-design-plugin-ready .production-stat.auto,
body.web-design-plugin-ready .stage.done,
body.web-design-plugin-ready .delivery-gate.ok,
body.web-design-plugin-ready .quality-green {
  border-color: rgba(10, 143, 156, 0.34);
  background: linear-gradient(180deg, #effcfa, #dff3f2);
}

body.web-design-plugin-ready .production-stat.manual,
body.web-design-plugin-ready .delivery-gate.warn,
body.web-design-plugin-ready .quality-yellow {
  border-color: rgba(217, 182, 109, 0.36);
  background: linear-gradient(180deg, #fff9e8, #f6efd9);
}

body.web-design-plugin-ready .production-stat.done {
  border-color: rgba(27, 102, 216, 0.28);
  background: linear-gradient(180deg, #eef5ff, #e1ebfb);
}

body.web-design-plugin-ready .empty-state {
  background:
    linear-gradient(118deg, rgba(117, 222, 242, 0.12), transparent 44%),
    linear-gradient(180deg, #fbffff, #edf7f8);
}

@keyframes yflosOceanLight {
  0% {
    background-position: 0 0, 0 0;
    opacity: 0.88;
  }
  100% {
    background-position: 180px 0, 260px 0;
    opacity: 1;
  }
}

@keyframes yflosWaveDrift {
  0% {
    transform: translate3d(-4%, 0, 0) skewY(-4deg);
  }
  100% {
    transform: translate3d(4%, 0, 0) skewY(-4deg);
  }
}

@keyframes yflosRoutePulse {
  0%,
  100% {
    opacity: 0.38;
    transform: rotate(-6deg) translateX(-8px);
  }
  50% {
    opacity: 0.9;
    transform: rotate(-6deg) translateX(12px);
  }
}

@keyframes yflosTopbarCurrent {
  0% {
    transform: translate3d(-5%, 0, 0) skewY(-3deg);
  }
  100% {
    transform: translate3d(5%, 0, 0) skewY(-3deg);
  }
}

@keyframes yflosSurfaceSweep {
  0%,
  68% {
    transform: translateX(-64%);
  }
  100% {
    transform: translateX(72%);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.web-design-plugin-ready .voyage-dynamics,
  body.web-design-plugin-ready .voyage-wave,
  body.web-design-plugin-ready .voyage-route,
  body.web-design-plugin-ready .topbar::before,
  body.web-design-plugin-ready .design-plugin-bar::before,
  body.web-design-plugin-ready .admin-nav::before {
    animation: none;
  }

  body.web-design-plugin-ready .primary:hover,
  body.web-design-plugin-ready .secondary:hover,
  body.web-design-plugin-ready .icon-button:hover,
  body.web-design-plugin-ready .design-plugin-actions button:hover {
    transform: none;
  }
}

@media (max-width: 1100px) {
  body.web-design-plugin-ready .app-shell {
    background: linear-gradient(180deg, #021126 0, #062742 280px, #f6fbfa 280px);
  }

  body.web-design-plugin-ready .voyage-route {
    left: 18vw;
    width: 72vw;
  }
}

@media (max-width: 720px) {
  body.web-design-plugin-ready {
    background: linear-gradient(180deg, #021126 0, #062742 224px, #f6fbfa 224px);
  }

  body.web-design-plugin-ready .voyage-wave {
    height: 160px;
  }

  body.web-design-plugin-ready .voyage-route {
    top: 96px;
    left: 18vw;
    width: 70vw;
    opacity: 0.62;
  }

  body.web-design-plugin-ready .topbar {
    min-height: 0;
  }

  body.web-design-plugin-ready .topbar::after {
    right: 14px;
    bottom: 14px;
    width: 74px;
    height: 78px;
    opacity: 0.13;
  }
}

/* YFLOS ocean brand hero v7: original sea-inspired header */
body.web-design-plugin-ready .topbar {
  min-height: 206px;
  align-items: center;
  isolation: isolate;
  border-color: rgba(180, 219, 255, 0.38);
  border-left-color: rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(90deg, rgba(1, 11, 30, 0.94) 0%, rgba(3, 21, 56, 0.78) 38%, rgba(5, 71, 159, 0.28) 72%, rgba(21, 108, 223, 0.08) 100%),
    radial-gradient(ellipse at 84% 18%, rgba(96, 162, 255, 0.42) 0 18%, transparent 48%),
    radial-gradient(ellipse at 30% 110%, rgba(20, 92, 205, 0.78) 0 28%, transparent 58%),
    repeating-linear-gradient(176deg, rgba(255, 255, 255, 0.16) 0 2px, transparent 2px 18px),
    linear-gradient(180deg, #1d67dc 0%, #1252b8 38%, #073982 70%, #03255c 100%);
  background-size: auto, 100% 100%, 100% 100%, 240px 100%, 100% 100%;
  box-shadow: 0 32px 88px rgba(2, 24, 62, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

body.web-design-plugin-ready .topbar::before {
  background:
    radial-gradient(ellipse at 58% 116%, transparent 0 28px, rgba(235, 247, 255, 0.22) 29px 31px, transparent 33px 66px),
    radial-gradient(ellipse at 18% 118%, transparent 0 22px, rgba(146, 199, 255, 0.16) 23px 25px, transparent 27px 58px),
    linear-gradient(94deg, transparent 0 20%, rgba(255, 255, 255, 0.2) 42%, transparent 66%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 32%, rgba(0, 35, 98, 0.3));
  background-size: 420px 156px, 360px 126px, 100% 100%, 100% 100%;
  opacity: 0.92;
  transform: translate3d(-3%, 0, 0) skewY(-1.5deg);
  animation: yflosInspiredSeaDrift 18s ease-in-out infinite alternate;
}

body.web-design-plugin-ready .topbar::after {
  display: block;
  right: clamp(54px, 10vw, 150px);
  top: 32px;
  bottom: auto;
  width: clamp(126px, 13vw, 184px);
  height: clamp(112px, 11vw, 156px);
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-bottom-color: transparent;
  border-radius: 999px 999px 48px 48px;
  background:
    linear-gradient(90deg, transparent 0 47%, rgba(255, 255, 255, 0.7) 48% 52%, transparent 53%) 50% 52% / 72px 76px no-repeat,
    linear-gradient(138deg, transparent 0 31%, rgba(255, 255, 255, 0.72) 32% 55%, transparent 56%) 39% 53% / 72px 80px no-repeat,
    linear-gradient(222deg, transparent 0 31%, rgba(255, 255, 255, 0.72) 32% 55%, transparent 56%) 61% 53% / 72px 80px no-repeat,
    radial-gradient(ellipse at 50% 88%, rgba(255, 255, 255, 0.72) 0 34%, transparent 35%) 50% 76% / 126px 42px no-repeat;
  clip-path: none;
  opacity: 0.24;
  filter: drop-shadow(0 16px 28px rgba(1, 13, 34, 0.22));
  animation: yflosSailMarkFloat 7s ease-in-out infinite;
}

body.web-design-plugin-ready .topbar > div:first-child {
  max-width: min(760px, 60%);
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.web-design-plugin-ready .topbar .eyeline {
  color: #e7f3ff;
  text-shadow: 0 2px 10px rgba(1, 16, 38, 0.45);
}

body.web-design-plugin-ready .topbar h2 {
  color: #ffffff;
  text-shadow: 0 3px 18px rgba(1, 16, 38, 0.5);
}

body.web-design-plugin-ready .topbar p {
  color: rgba(241, 248, 255, 0.88);
  text-shadow: 0 2px 10px rgba(1, 16, 38, 0.36);
}

body.web-design-plugin-ready .topbar-actions {
  position: relative;
  z-index: 2;
  padding: 10px;
  border: 1px solid rgba(205, 231, 255, 0.16);
  border-radius: 8px;
  background: rgba(2, 19, 46, 0.28);
  backdrop-filter: blur(3px);
}

@keyframes yflosInspiredSeaDrift {
  0% {
    background-position: -80px 0, 40px 0, 0 0, 0 0;
  }
  100% {
    background-position: 120px 0, -80px 0, 0 0, 0 0;
  }
}

@keyframes yflosSailMarkFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -5px, 0);
  }
}

@media (max-width: 1100px) {
  body.web-design-plugin-ready .topbar {
    min-height: 188px;
  }

  body.web-design-plugin-ready .topbar > div:first-child {
    max-width: min(760px, 76%);
  }
}

@media (max-width: 720px) {
  body.web-design-plugin-ready .topbar {
    min-height: 246px;
    background:
      linear-gradient(180deg, rgba(1, 11, 30, 0.88) 0%, rgba(3, 21, 56, 0.58) 58%, rgba(6, 69, 157, 0.18) 100%),
      radial-gradient(ellipse at 84% 16%, rgba(96, 162, 255, 0.38) 0 18%, transparent 48%),
      repeating-linear-gradient(176deg, rgba(255, 255, 255, 0.14) 0 2px, transparent 2px 16px),
      linear-gradient(180deg, #1d67dc 0%, #1252b8 42%, #073982 100%);
  }

  body.web-design-plugin-ready .topbar > div:first-child {
    max-width: 100%;
    padding: 14px;
  }

  body.web-design-plugin-ready .topbar-actions {
    padding: 8px;
  }

  body.web-design-plugin-ready .topbar::after {
    right: 18px;
    top: 24px;
    width: 108px;
    height: 96px;
    opacity: 0.14;
  }
}

/* YFLOS ocean palette v8: full UI system from the reference blues */
:root {
  --bg: #edf6ff;
  --surface: #fbfdff;
  --surface-2: #edf6ff;
  --surface-3: #dcecff;
  --line: rgba(49, 112, 205, 0.24);
  --line-strong: rgba(25, 96, 205, 0.48);
  --text: #061832;
  --muted: #526b8f;
  --muted-2: #8094b6;
  --accent: #155fcf;
  --accent-2: #ffffff;
  --blue: #1d67dc;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.82), 0 30px 76px rgba(7, 54, 131, 0.18);
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.78), 0 18px 44px rgba(7, 54, 131, 0.12);
}

body.web-design-plugin-ready {
  color: #061832;
  background:
    radial-gradient(ellipse at 72% -8%, rgba(69, 137, 255, 0.46) 0 22%, transparent 48%),
    linear-gradient(180deg, #021843 0, #053783 210px, #1d67dc 211px, #e8f4ff 212px, #f7fbff 100%);
}

body.web-design-plugin-ready .voyage-dynamics {
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(112, 169, 255, 0.16) 28%, transparent 42% 100%),
    repeating-linear-gradient(118deg, rgba(235, 247, 255, 0.06) 0 1px, transparent 1px 30px);
}

body.web-design-plugin-ready .app-shell {
  background:
    linear-gradient(90deg, rgba(2, 13, 42, 0.98) 0 336px, rgba(255, 255, 255, 0) 336px),
    linear-gradient(180deg, rgba(29, 103, 220, 0.12), transparent 360px);
}

body.web-design-plugin-ready .sidebar {
  border-right-color: rgba(120, 174, 255, 0.28);
  background:
    radial-gradient(ellipse at 88% 8%, rgba(48, 127, 255, 0.28) 0 22%, transparent 48%),
    repeating-linear-gradient(128deg, rgba(235, 247, 255, 0.06) 0 1px, transparent 1px 22px),
    linear-gradient(180deg, #02122f 0%, #03235e 42%, #062f7f 76%, #021432 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08), 20px 0 58px rgba(4, 35, 92, 0.24);
}

body.web-design-plugin-ready .brand-mark {
  border-color: rgba(235, 247, 255, 0.46);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.42), transparent 34%),
    linear-gradient(145deg, #2f7dff 0%, #155fcf 48%, #073982 100%);
  box-shadow: 0 18px 42px rgba(0, 21, 68, 0.48), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

body.web-design-plugin-ready .brand-mark::before {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(218, 237, 255, 0.24));
}

body.web-design-plugin-ready .brand h1,
body.web-design-plugin-ready .case-name {
  color: #ffffff;
}

body.web-design-plugin-ready .brand p,
body.web-design-plugin-ready .summary-pill span,
body.web-design-plugin-ready .status-filter,
body.web-design-plugin-ready .case-line {
  color: rgba(232, 244, 255, 0.72);
}

body.web-design-plugin-ready .search-row input,
body.web-design-plugin-ready .icon-button,
body.web-design-plugin-ready .summary-pill,
body.web-design-plugin-ready .status-filter,
body.web-design-plugin-ready .case-item {
  border-color: rgba(157, 200, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.052)),
    rgba(5, 43, 112, 0.28);
  color: #ffffff;
}

body.web-design-plugin-ready .search-row input::placeholder {
  color: rgba(232, 244, 255, 0.58);
}

body.web-design-plugin-ready .search-row input:focus,
body.web-design-plugin-ready .icon-button:hover,
body.web-design-plugin-ready .status-filter.active,
body.web-design-plugin-ready .case-item:hover,
body.web-design-plugin-ready .case-item.active {
  border-color: rgba(235, 247, 255, 0.72);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(47, 125, 255, 0.18) 72%),
    rgba(11, 78, 181, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 14px 32px rgba(3, 28, 78, 0.22);
}

body.web-design-plugin-ready .case-item.active::before {
  background: linear-gradient(180deg, #ffffff, #76adff);
}

body.web-design-plugin-ready .workspace {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0, rgba(255, 255, 255, 0.025) 246px, transparent 247px),
    linear-gradient(180deg, transparent 0, transparent 266px, rgba(242, 248, 255, 0.9) 267px);
}

body.web-design-plugin-ready .topbar {
  border-color: rgba(211, 232, 255, 0.48);
  border-left-color: rgba(255, 255, 255, 0.9);
  background:
    linear-gradient(90deg, rgba(1, 11, 30, 0.94) 0%, rgba(3, 23, 68, 0.8) 36%, rgba(5, 76, 178, 0.34) 70%, rgba(29, 103, 220, 0.12) 100%),
    radial-gradient(ellipse at 86% 16%, rgba(95, 159, 255, 0.5) 0 18%, transparent 48%),
    radial-gradient(ellipse at 28% 110%, rgba(24, 104, 225, 0.82) 0 30%, transparent 60%),
    repeating-linear-gradient(176deg, rgba(255, 255, 255, 0.17) 0 2px, transparent 2px 18px),
    linear-gradient(180deg, #2f7dff 0%, #1d67dc 38%, #0a4cad 70%, #032c70 100%);
  box-shadow: 0 32px 88px rgba(3, 42, 112, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

body.web-design-plugin-ready .topbar::before {
  background:
    radial-gradient(ellipse at 58% 116%, transparent 0 28px, rgba(245, 250, 255, 0.24) 29px 31px, transparent 33px 66px),
    radial-gradient(ellipse at 18% 118%, transparent 0 22px, rgba(163, 206, 255, 0.2) 23px 25px, transparent 27px 58px),
    linear-gradient(94deg, transparent 0 20%, rgba(255, 255, 255, 0.22) 42%, transparent 66%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 32%, rgba(0, 35, 98, 0.28));
}

body.web-design-plugin-ready .topbar .eyeline,
body.web-design-plugin-ready .eyeline {
  color: #f7fbff;
  letter-spacing: 0;
}

body.web-design-plugin-ready .topbar h2,
body.web-design-plugin-ready .topbar p {
  color: #ffffff;
}

body.web-design-plugin-ready .topbar p {
  max-width: 720px;
}

body.web-design-plugin-ready .topbar .primary {
  border-color: rgba(255, 255, 255, 0.6);
  background: linear-gradient(180deg, #ffffff 0%, #dcecff 100%);
  color: #05265e;
  box-shadow: 0 16px 34px rgba(1, 28, 76, 0.28);
}

body.web-design-plugin-ready .topbar .secondary {
  border-color: rgba(222, 239, 255, 0.34);
  background: rgba(5, 42, 111, 0.36);
  color: #ffffff;
}

body.web-design-plugin-ready .design-plugin-bar,
body.web-design-plugin-ready .admin-nav {
  border-color: rgba(157, 200, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.046)),
    linear-gradient(135deg, #061a43 0%, #082d73 100%);
  box-shadow: 0 18px 48px rgba(4, 34, 90, 0.24);
}

body.web-design-plugin-ready .design-plugin-bar::before,
body.web-design-plugin-ready .admin-nav::before {
  background: linear-gradient(100deg, transparent 0 28%, rgba(235, 247, 255, 0.16) 48%, transparent 70%);
}

body.web-design-plugin-ready .design-plugin-title strong,
body.web-design-plugin-ready .admin-nav-item {
  color: #f7fbff;
}

body.web-design-plugin-ready .design-plugin-actions button,
body.web-design-plugin-ready .admin-nav-item {
  border-color: rgba(157, 200, 255, 0.2);
  background: rgba(255, 255, 255, 0.055);
}

body.web-design-plugin-ready .design-plugin-actions button:hover,
body.web-design-plugin-ready .design-plugin-actions button.active,
body.web-design-plugin-ready .admin-nav-item:hover,
body.web-design-plugin-ready .admin-nav-item.active {
  border-color: rgba(245, 250, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(47, 125, 255, 0.2)),
    rgba(11, 77, 178, 0.42);
  box-shadow: inset 0 -2px 0 #ffffff, 0 12px 28px rgba(1, 28, 76, 0.2);
}

body.web-design-plugin-ready .admin-panel-head,
body.web-design-plugin-ready .production-console,
body.web-design-plugin-ready .ops-card,
body.web-design-plugin-ready .panel,
body.web-design-plugin-ready .student-card,
body.web-design-plugin-ready .student-profile-schema,
body.web-design-plugin-ready .permission-card,
body.web-design-plugin-ready .permission-note,
body.web-design-plugin-ready .empty-state {
  border-color: rgba(49, 112, 205, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 246, 255, 0.94)),
    #fbfdff;
  box-shadow: var(--shadow-soft);
}

body.web-design-plugin-ready .production-console {
  background:
    linear-gradient(116deg, rgba(29, 103, 220, 0.13), transparent 40%),
    linear-gradient(180deg, #fbfdff, #edf6ff);
}

body.web-design-plugin-ready .panel-heading {
  background:
    linear-gradient(90deg, rgba(29, 103, 220, 0.12), transparent 38%),
    linear-gradient(180deg, #fbfdff, #eaf4ff);
}

body.web-design-plugin-ready .admin-panel-head h3,
body.web-design-plugin-ready .production-head h3,
body.web-design-plugin-ready .panel-heading h3,
body.web-design-plugin-ready .ops-card-head h4,
body.web-design-plugin-ready .empty-inner h3 {
  color: #061832;
}

body.web-design-plugin-ready .admin-panel-head p,
body.web-design-plugin-ready .production-head p,
body.web-design-plugin-ready .ops-card-head span,
body.web-design-plugin-ready .layer-card p,
body.web-design-plugin-ready .stakeholder-card p,
body.web-design-plugin-ready .backlog-card p,
body.web-design-plugin-ready .profile-level-card p,
body.web-design-plugin-ready .ability-card p,
body.web-design-plugin-ready .subject-card p,
body.web-design-plugin-ready .workflow-module p,
body.web-design-plugin-ready .workflow-stage-card p,
body.web-design-plugin-ready .cadence-card p,
body.web-design-plugin-ready .output-card p,
body.web-design-plugin-ready .quality-release-card p,
body.web-design-plugin-ready .release-card p,
body.web-design-plugin-ready .empty-inner p {
  color: #526b8f;
}

body.web-design-plugin-ready .stage,
body.web-design-plugin-ready .delivery-gate,
body.web-design-plugin-ready .layer-card,
body.web-design-plugin-ready .stakeholder-card,
body.web-design-plugin-ready .profile-level-card,
body.web-design-plugin-ready .ability-card,
body.web-design-plugin-ready .subject-card,
body.web-design-plugin-ready .workflow-module,
body.web-design-plugin-ready .workflow-stage-card,
body.web-design-plugin-ready .cadence-card,
body.web-design-plugin-ready .output-card,
body.web-design-plugin-ready .quality-release-card,
body.web-design-plugin-ready .release-card,
body.web-design-plugin-ready .backlog-card,
body.web-design-plugin-ready .student-card,
body.web-design-plugin-ready .staff-row,
body.web-design-plugin-ready .ability-database-card,
body.web-design-plugin-ready .material-tile,
body.web-design-plugin-ready .ocr-review-card,
body.web-design-plugin-ready .quality-item,
body.web-design-plugin-ready .quality-empty,
body.web-design-plugin-ready .quality-ok {
  border-color: rgba(49, 112, 205, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 255, 0.96)),
    #fbfdff;
}

body.web-design-plugin-ready .ops-card-head span,
body.web-design-plugin-ready .layer-card > span,
body.web-design-plugin-ready .stakeholder-card span,
body.web-design-plugin-ready .workflow-module > span,
body.web-design-plugin-ready .readiness-item,
body.web-design-plugin-ready .production-stat,
body.web-design-plugin-ready .student-stat {
  border-color: rgba(49, 112, 205, 0.22);
  background: linear-gradient(180deg, #fbfdff, #eaf4ff);
}

body.web-design-plugin-ready .ops-card-head span,
body.web-design-plugin-ready .layer-card > span,
body.web-design-plugin-ready .stakeholder-card span,
body.web-design-plugin-ready .workflow-module > span,
body.web-design-plugin-ready .readiness-item strong,
body.web-design-plugin-ready .production-stat strong,
body.web-design-plugin-ready .student-stat strong {
  color: #0a4cad;
}

body.web-design-plugin-ready .layer-card.ready,
body.web-design-plugin-ready .stakeholder-card.ready,
body.web-design-plugin-ready .workflow-module.ready,
body.web-design-plugin-ready .cadence-card,
body.web-design-plugin-ready .layer-card.building,
body.web-design-plugin-ready .stakeholder-card.building,
body.web-design-plugin-ready .workflow-module.building,
body.web-design-plugin-ready .workflow-stage-card,
body.web-design-plugin-ready .ability-card,
body.web-design-plugin-ready .subject-card {
  border-left-color: #1d67dc;
}

body.web-design-plugin-ready .layer-card.pending,
body.web-design-plugin-ready .stakeholder-card.pending,
body.web-design-plugin-ready .workflow-module.pending {
  border-left-color: #76adff;
}

body.web-design-plugin-ready .layer-index,
body.web-design-plugin-ready .workflow-module b,
body.web-design-plugin-ready .backlog-card b,
body.web-design-plugin-ready .workflow-stage-card b {
  border-color: rgba(49, 112, 205, 0.24);
  background: linear-gradient(180deg, #f7fbff, #dcecff);
  color: #0a4cad;
}

body.web-design-plugin-ready .tab.active {
  border-color: rgba(49, 112, 205, 0.34);
  background: linear-gradient(180deg, #fbfdff, #dfedff);
  box-shadow: inset 0 -2px 0 #1d67dc;
  color: #05265e;
}

body.web-design-plugin-ready .primary {
  border-color: rgba(29, 103, 220, 0.18);
  background: linear-gradient(180deg, #2f7dff, #155fcf);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(21, 95, 207, 0.22);
}

body.web-design-plugin-ready .secondary {
  border-color: rgba(49, 112, 205, 0.28);
  background: linear-gradient(180deg, #ffffff, #edf6ff);
  color: #05265e;
}

body.web-design-plugin-ready .production-stat.auto,
body.web-design-plugin-ready .stage.done,
body.web-design-plugin-ready .delivery-gate.ok,
body.web-design-plugin-ready .quality-green {
  border-color: rgba(29, 103, 220, 0.26);
  background: linear-gradient(180deg, #f5faff, #e4f1ff);
}

body.web-design-plugin-ready .production-stat.manual,
body.web-design-plugin-ready .delivery-gate.warn,
body.web-design-plugin-ready .quality-yellow {
  border-color: rgba(118, 173, 255, 0.34);
  background: linear-gradient(180deg, #f9fcff, #eaf4ff);
}

body.web-design-plugin-ready .production-stat.done {
  border-color: rgba(21, 95, 207, 0.28);
  background: linear-gradient(180deg, #eef6ff, #dcecff);
}

body.web-design-plugin-ready .materials-grid,
body.web-design-plugin-ready .report-preview iframe,
body.web-design-plugin-ready .text-preview,
body.web-design-plugin-ready .log-view,
body.web-design-plugin-ready .parent-report-preview,
body.web-design-plugin-ready .spec-editor textarea,
body.web-design-plugin-ready input,
body.web-design-plugin-ready textarea,
body.web-design-plugin-ready select {
  border-color: rgba(49, 112, 205, 0.22);
}

body.web-design-plugin-ready .materials-grid {
  background:
    repeating-linear-gradient(135deg, rgba(29, 103, 220, 0.055) 0 1px, transparent 1px 18px),
    #f6faff;
}

body.web-design-plugin-ready .empty-state {
  background:
    linear-gradient(118deg, rgba(29, 103, 220, 0.12), transparent 44%),
    linear-gradient(180deg, #fbfdff, #edf6ff);
}

body.web-design-plugin-ready .toast {
  border-color: rgba(157, 200, 255, 0.38);
  background: #061a43;
  box-shadow: 0 24px 58px rgba(4, 34, 90, 0.34);
}

@media (max-width: 1100px) {
  body.web-design-plugin-ready .app-shell {
    background: linear-gradient(180deg, #021843 0, #053783 280px, #f7fbff 280px);
  }
}

@media (max-width: 720px) {
  body.web-design-plugin-ready {
    background: linear-gradient(180deg, #021843 0, #053783 224px, #f7fbff 224px);
  }

  body.web-design-plugin-ready .topbar {
    background:
      linear-gradient(180deg, rgba(1, 11, 30, 0.9) 0%, rgba(3, 23, 68, 0.6) 58%, rgba(29, 103, 220, 0.18) 100%),
      radial-gradient(ellipse at 84% 16%, rgba(95, 159, 255, 0.38) 0 18%, transparent 48%),
      repeating-linear-gradient(176deg, rgba(255, 255, 255, 0.14) 0 2px, transparent 2px 16px),
      linear-gradient(180deg, #2f7dff 0%, #1d67dc 42%, #073982 100%);
  }
}

/* YFLOS brand mark v9: white transparent company logo watermark */
body.web-design-plugin-ready .topbar::after {
  content: "";
  position: absolute;
  right: clamp(184px, 19vw, 262px);
  top: 28px;
  bottom: auto;
  z-index: 0;
  width: clamp(128px, 14vw, 176px);
  height: clamp(136px, 15vw, 184px);
  border: 0;
  border-radius: 0;
  background: url("/assets/yuanfan-logo-mark-white.png") center / contain no-repeat;
  opacity: 0.2;
  filter: drop-shadow(0 18px 32px rgba(1, 13, 34, 0.24));
  pointer-events: none;
  animation: yflosLogoWatermarkFloat 8s ease-in-out infinite;
}

@keyframes yflosLogoWatermarkFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -4px, 0);
  }
}

@media (max-width: 1100px) {
  body.web-design-plugin-ready .topbar::after {
    right: 132px;
    top: 30px;
    width: 132px;
    height: 140px;
    opacity: 0.17;
  }
}

@media (max-width: 720px) {
  body.web-design-plugin-ready .topbar::after {
    right: 14px;
    top: 20px;
    width: 104px;
    height: 110px;
    opacity: 0.12;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.web-design-plugin-ready .topbar::after {
    animation: none;
  }
}

/* Final responsive guard: keep admin pages inside narrow in-app browser panes. */
@media (max-width: 720px) {
  .workspace,
  .web-design-plugin-ready .workspace,
  body.web-design-plugin-ready .workspace {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 14px;
    overflow-x: hidden;
  }

  .admin-panel,
  .production-console,
  .admin-panel-head,
  .ops-card,
  .permission-card,
  .permission-note,
  .empty-state,
  .service-layout,
  .permission-layout {
    min-width: 0;
    max-width: 100%;
  }

  .admin-panel-head,
  body.web-design-plugin-ready .admin-panel-head {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .admin-panel-head > *,
  .permission-current-role,
  .permission-current-role > * {
    min-width: 0;
    max-width: 100%;
  }

  .service-layout,
  .permission-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .ops-card-head,
  .service-plan-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    align-items: start;
  }

  .ops-card-head span {
    justify-content: start;
    place-items: center start;
    white-space: normal;
    text-align: left;
  }

  .service-plan-card,
  .service-plan-form,
  .service-plan-form-body,
  .service-subsection {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .service-plan-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    justify-content: stretch;
  }

  .service-plan-actions select,
  .service-plan-actions button {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .service-subsection-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .service-subsection-head button {
    width: 100%;
  }

  .service-plan-grid,
  .service-review-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .parent-method-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .service-table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
  }

  .permission-current-role {
    justify-content: flex-start;
  }

  .permission-current-role select {
    width: 100%;
    min-width: 0;
  }
}
