:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --text: #172033;
  --muted: #5d6a80;
  --line: #d9e0ea;
  --primary: #1976ff;
  --primary-dark: #0f56c7;
  --accent: #198754;
  --warning: #ff7a14;
  --danger: #dc3545;
  --sidebar: #1d2f40;
  --sidebar-strong: #172637;
  --sidebar-text: #e8eef6;
  --sidebar-muted: #95a7ba;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  background: var(--sidebar);
  color: var(--sidebar-text);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header {
  display: grid;
}

.sidebar-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 78px;
  padding: 18px;
  color: var(--sidebar-text);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-menu-toggle {
  display: none;
}

.sidebar-brand__mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: var(--primary) url("/favicon.svg") center / 34px 34px no-repeat;
  box-shadow: 0 8px 18px rgba(31, 78, 121, 0.24);
}

.sidebar-brand strong,
.sidebar-brand small {
  display: block;
}

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

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.sidebar-nav a {
  min-height: 40px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--sidebar-text);
  text-decoration: none;
}

.sidebar-nav a:hover,
.sidebar-nav a:focus {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav__section {
  margin: 14px 8px 4px;
  color: var(--sidebar-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-account {
  display: grid;
  gap: 6px;
  padding: 14px 18px;
  background: var(--sidebar-strong);
  color: var(--sidebar-muted);
  font-size: 12px;
}

.sidebar-account span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account a {
  color: #ffd84d;
  text-decoration: none;
}

.sidebar-account small {
  color: var(--sidebar-muted);
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  width: min(1120px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand > span:last-child {
  display: grid;
}

.brand__mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 7px;
  background: var(--primary) url("/favicon.svg") center / 34px 34px no-repeat;
  box-shadow: 0 8px 18px rgba(31, 78, 121, 0.18);
}

.brand__name {
  font-size: 20px;
  font-weight: 700;
}

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

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.nav__user {
  max-width: 220px;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav a:hover,
.nav a:focus {
  color: var(--primary);
  text-decoration: underline;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.app-shell--authenticated .page {
  width: min(100% - 48px, 1420px);
  padding-top: 28px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.hero__panel,
.status-panel,
.content-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero__panel {
  padding: 28px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: 0;
}

.lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--primary);
  padding: 10px 16px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.button:hover,
.button:focus {
  background: var(--primary-dark);
  text-decoration: none;
}

.button--small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.button--secondary {
  background: var(--surface);
  color: var(--primary);
}

.button--secondary:hover,
.button--secondary:focus {
  background: #eef4fa;
}

.button--danger {
  border-color: var(--danger);
  background: var(--danger);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.button--danger:hover,
.button--danger:focus {
  border-color: #b42318;
  background: #b42318;
}

.button--alert {
  border-color: var(--danger);
  background: var(--danger);
  color: #ffffff;
}

.button--alert:hover,
.button--alert:focus {
  border-color: #b42318;
  background: #b42318;
}

.button-badge {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  margin-left: 6px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 900;
}

.button-badge--neutral {
  background: #eaf2ff;
  color: var(--primary);
}

.status-panel {
  padding: 20px;
}

.danger-panel {
  border-color: #f4a8af;
  background: #fff8f8;
}

.status-panel h2,
.content-panel h1 {
  margin: 0 0 14px;
  font-size: 20px;
}

.status-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

.content-panel {
  padding: 24px;
}

.content-panel p {
  max-width: 780px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0 0 4px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.empty-state {
  margin: 14px 0;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: #f8fafc;
}

.empty-state--compact {
  padding: 14px;
}

.empty-state p {
  margin: 6px 0 0;
  color: var(--muted);
}

.dashboard-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.workspace-heading h1 {
  margin: 0 0 4px;
  font-size: 24px;
}

.workspace-heading h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.workspace-heading--compact {
  margin-top: 26px;
  margin-bottom: 18px;
  padding-bottom: 14px;
}

.workspace-heading p {
  margin: 0;
  color: var(--muted);
}

.heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-row--end {
  justify-content: flex-end;
}

.dashboard-heading h1 {
  margin: 0 0 4px;
  font-size: 28px;
}

.dashboard-heading p {
  margin: 0;
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-card {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(23, 32, 51, 0.06);
}

.metric-card--link {
  color: inherit;
  text-decoration: none;
}

.metric-card--link:hover,
.metric-card--link:focus {
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(31, 78, 121, 0.14);
  text-decoration: none;
}

.metric-card--alert {
  border-color: #f1aeb5;
  background: linear-gradient(180deg, #fff5f6, #ffffff);
}

.metric-card--alert .metric-card__label,
.metric-card--alert strong {
  color: var(--danger);
}

.metric-card__label {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.metric-card strong {
  display: block;
  margin-top: 6px;
  font-size: 34px;
  line-height: 1;
}

.metric-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

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

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.dashboard-grid--visual {
  margin-bottom: 18px;
}

.visual-panel {
  min-height: 260px;
}

.donut-stat {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.donut-chart {
  width: 180px;
  aspect-ratio: 1;
  display: grid;
  align-content: center;
  gap: 4px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--warning) 0 var(--a), var(--primary) var(--a) var(--b), var(--accent) var(--b) var(--c), #e5eaf0 var(--c) 100%);
  position: relative;
}

.donut-chart--success {
  background: conic-gradient(var(--accent) 0 var(--a), #e5eaf0 var(--a) 100%);
}

.donut-chart::after {
  content: "";
  position: absolute;
  inset: 42px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.donut-chart strong,
.donut-chart span {
  position: relative;
  z-index: 1;
}

.donut-chart strong {
  font-size: 34px;
  line-height: 1;
}

.donut-chart span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stage-score {
  width: 82px;
  min-height: 96px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.stage-score::before {
  content: "";
  width: 58px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--score-color, var(--primary)) 0 var(--score), #e5eaf0 var(--score) 100%);
  box-shadow: inset 0 0 0 7px #ffffff, 0 0 0 1px var(--line);
}

.stage-score strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.stage-score span {
  max-width: 90px;
}

.stage-score.is-excellent {
  --score-color: var(--accent);
}

.stage-score.is-good {
  --score-color: var(--primary);
}

.stage-score.is-watch {
  --score-color: var(--warning);
}

.stage-score.is-low {
  --score-color: var(--danger);
}

.stage-score--print {
  width: 72px;
  min-height: 82px;
}

.stage-score--print::before {
  width: 48px;
  box-shadow: inset 0 0 0 6px #ffffff, 0 0 0 1px var(--line);
}

.stage-score--large {
  width: 110px;
  min-height: 122px;
}

.stage-score--large::before {
  width: 78px;
  box-shadow: inset 0 0 0 9px #ffffff, 0 0 0 1px var(--line);
}

.stage-score--large strong {
  font-size: 24px;
}

.stage-quality-summary {
  gap: 14px;
}

.stage-quality-summary__body {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  gap: 18px;
  align-items: center;
}

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

.quality-checklist div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #f8fafc;
}

.quality-checklist strong,
.quality-checklist span {
  display: block;
}

.quality-checklist strong {
  color: var(--text);
}

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

.quality-checklist .is-ok {
  border-color: #b7dfc9;
  background: #f3fbf6;
}

.quality-checklist .is-missing {
  border-color: #f6d38a;
  background: #fff8e6;
}

.quality-checklist .is-alert {
  border-color: #fecaca;
  background: #fff1f2;
}

.stage-quality-summary__actions {
  display: grid;
  gap: 8px;
  min-width: 170px;
}

.legend-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.legend-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.legend-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.legend-list dt {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
}

.legend-list dd {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.legend-color {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  background: var(--primary);
}

.legend-color--warning {
  background: var(--warning);
}

.legend-color--success {
  background: var(--accent);
}

.legend-color--danger {
  background: var(--danger);
}

.help-tip {
  position: relative;
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  place-items: center;
  border-radius: 999px;
  background: #e8f1ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
}

.help-tip::after {
  content: attr(aria-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: min(280px, 80vw);
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.16);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.help-tip:hover::after,
.help-tip:focus::after {
  opacity: 1;
}

.donut-preview {
  width: 180px;
  aspect-ratio: 1;
  margin: 8px 0 14px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0 45%, var(--accent) 45% 72%, var(--warning) 72% 88%, #d9e0ea 88% 100%);
  position: relative;
}

.donut-preview::after {
  content: "";
  position: absolute;
  inset: 42px;
  border-radius: 50%;
  background: var(--surface);
}

.status-bars {
  display: grid;
  gap: 10px;
}

.status-bars__row {
  display: grid;
  grid-template-columns: minmax(110px, 0.9fr) minmax(120px, 2fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 0.92rem;
}

.status-bars__row span {
  color: var(--text);
  font-weight: 700;
}

.status-bars__row strong {
  color: var(--muted);
  font-size: 0.86rem;
}

.status-bars__track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eaf0;
}

.status-bars__track i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.status-bars__track .status-bars__warning {
  background: linear-gradient(90deg, var(--warning), #f59e0b);
}

.status-bars__track .status-bars__success {
  background: linear-gradient(90deg, var(--accent), #22c55e);
}

.status-bars__track .status-bars__danger {
  background: linear-gradient(90deg, var(--danger), #ef4444);
}

.compact-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-list li {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.compact-list li:last-child {
  border-bottom: 0;
}

.compact-list strong,
.compact-list small {
  display: block;
}

.compact-list small {
  color: var(--muted);
}

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

.quick-actions-grid--student {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.student-progress-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.2fr) minmax(220px, 0.8fr);
  gap: 14px;
  margin-bottom: 18px;
}

.student-progress-card {
  display: grid;
  gap: 14px;
  align-content: center;
}

.student-progress-card strong {
  display: block;
  color: var(--primary);
  font-size: 42px;
  line-height: 1;
}

.weekly-plan {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.weekly-plan__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.weekly-plan__header h2 {
  margin-bottom: 4px;
}

.weekly-plan__header p {
  margin: 0;
  color: var(--muted);
}

.weekly-plan__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.weekly-plan__item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #f8fafc;
  color: inherit;
  text-decoration: none;
}

.weekly-plan__item:hover,
.weekly-plan__item:focus {
  border-color: var(--primary);
  background: #eef5ff;
  text-decoration: none;
}

.weekly-plan__rank {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--primary);
  font-weight: 900;
}

.weekly-plan__item strong,
.weekly-plan__item small {
  display: block;
}

.weekly-plan__item small {
  color: var(--muted);
}

.weekly-plan__item em {
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.weekly-plan__item .mini-progress {
  grid-column: 2 / 4;
}

.weekly-plan__item--success .weekly-plan__rank {
  background: #dff4e9;
  color: var(--accent);
}

.weekly-plan__item--warning .weekly-plan__rank {
  background: #fff1cc;
  color: var(--warning);
}

.weekly-plan__item--neutral .weekly-plan__rank {
  background: #e8edf3;
  color: var(--muted);
}

.checklist-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist-list li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 2px 8px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #f8fafc;
}

.checklist-list li > span {
  grid-row: span 2;
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: var(--muted);
  font-weight: 900;
}

.checklist-list li.is-done {
  border-color: #b7dfc9;
  background: #f3fbf6;
}

.checklist-list li.is-done > span {
  background: var(--accent);
  color: #ffffff;
}

.checklist-list li.is-admin-step {
  border-color: #f6d38a;
  background: #fff8e6;
}

.checklist-list li.is-admin-step > span {
  background: var(--warning);
  color: #ffffff;
}

.checklist-list strong,
.checklist-list small {
  display: block;
}

.checklist-list small {
  color: var(--muted);
}

.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.student-badge {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px dashed #b9c4d1;
  border-radius: 999px;
  padding: 6px 10px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 800;
}

.student-badge.is-earned {
  border-style: solid;
  border-color: #b9d6ff;
  background: #eef6ff;
  color: var(--primary);
}

.quick-action {
  display: grid;
  gap: 4px;
  min-height: 78px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #f8fafc;
  color: inherit;
  text-decoration: none;
}

.quick-action:hover,
.quick-action:focus {
  border-color: var(--primary);
  background: #eef5ff;
  text-decoration: none;
}

.quick-action strong {
  color: var(--text);
}

.quick-action span {
  color: var(--muted);
  font-size: 0.86rem;
}

.quality-panel {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 10px 0;
}

.quality-panel strong {
  color: var(--warning);
  font-size: 42px;
  line-height: 1;
}

.stage-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.stage-mini-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  background: #ffffff;
}

.stage-mini-card strong {
  color: var(--text);
}

.stage-mini-card span,
.stage-mini-card small,
.stage-mini-card em {
  color: var(--muted);
}

.stage-mini-card em {
  font-style: normal;
  font-size: 0.86rem;
  font-weight: 800;
}

.mini-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eaf0;
}

.mini-progress--large {
  height: 12px;
}

.mini-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.directory-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(6, minmax(130px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.directory-filters label {
  display: grid;
  gap: 6px;
}

.directory-filters span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.directory-filters input,
.directory-filters select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.directory-filters__actions {
  display: flex;
  gap: 8px;
}

.directory-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 0;
  color: var(--muted);
}

.directory-summary strong {
  color: var(--primary);
  font-size: 30px;
  line-height: 1;
}

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

.map-heading h2,
.map-heading p {
  margin: 0;
}

.map-heading p {
  color: var(--muted);
}

.enterprise-map {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.78)),
    repeating-linear-gradient(0deg, #d9e0ea 0, #d9e0ea 1px, transparent 1px, transparent 48px),
    repeating-linear-gradient(90deg, #d9e0ea 0, #d9e0ea 1px, transparent 1px, transparent 48px),
    #eef4f8;
}

.enterprise-map--leaflet {
  min-height: 420px;
  background: #eef4f8;
}

.enterprise-map--leaflet::before {
  display: none;
}

.enterprise-map::before {
  content: "N";
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.enterprise-map__marker {
  position: absolute;
  width: 15px;
  height: 15px;
  transform: translate(-50%, -50%);
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 6px 16px rgba(23, 32, 51, 0.22);
  text-decoration: none;
}

.enterprise-map__marker:hover,
.enterprise-map__marker:focus {
  z-index: 4;
  background: var(--warning);
  outline: 0;
}

.enterprise-map__marker span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 220px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.16);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  white-space: normal;
}

.enterprise-map__marker:hover span,
.enterprise-map__marker:focus span {
  opacity: 1;
}

.enterprise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 14px;
}

.enterprise-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(23, 32, 51, 0.04);
}

.enterprise-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.enterprise-card h2 {
  margin: 0;
  font-size: 1.05rem;
}

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

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

.enterprise-card__facts div {
  border-radius: 6px;
  padding: 8px;
  background: #f8fafc;
}

.enterprise-card__facts dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.enterprise-card__facts dd {
  margin: 3px 0 0;
  color: var(--text);
  font-weight: 800;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-cloud span {
  border: 1px solid #cfe0f6;
  border-radius: 999px;
  padding: 3px 8px;
  background: #f1f7ff;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
}

.enterprise-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.enterprise-card__footer small {
  color: var(--muted);
}

.enterprise-profile {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 18px;
}

.contact-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  display: grid;
  gap: 3px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.contact-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.contact-list span,
.contact-list small {
  color: var(--muted);
}

.teacher-feedback {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #eff6ff;
}

.teacher-feedback strong {
  color: var(--primary);
}

.teacher-feedback p {
  margin: 0;
  color: var(--text);
}

.context-feedback {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  border: 1px solid #bbf7d0;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #f0fdf4;
}

.context-feedback strong {
  color: var(--accent);
}

.context-feedback p {
  margin: 0;
  color: var(--text);
  font-weight: 800;
}

.timeline-list {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #ffffff;
}

.timeline-item__date {
  display: grid;
  align-content: start;
  gap: 4px;
  color: var(--muted);
}

.timeline-item__date strong {
  color: var(--primary);
  font-size: 1.1rem;
}

.timeline-item__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.timeline-item h3 {
  margin: 0;
  font-size: 1rem;
}

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

.timeline-item blockquote {
  margin: 10px 0 0;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  color: var(--text);
}

.table-panel {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

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

.data-table th {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

.data-table small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.row-actions--stacked {
  align-items: center;
  justify-content: flex-start;
}

.row-actions form {
  margin: 0;
}

.stacked-action-form {
  display: grid;
  min-width: 260px;
  gap: 8px;
}

.stacked-action-form label {
  display: grid;
  gap: 4px;
  font-weight: 700;
}

.stacked-action-form span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.stacked-action-form select,
.stacked-action-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.form-grid textarea,
.stacked-action-form textarea {
  resize: vertical;
}

.action-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.action-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.action-legend i,
.action-legend b {
  width: 22px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #ffffff;
  color: var(--primary);
  font-style: normal;
  font-size: 0.78rem;
  line-height: 1;
}

.action-legend b {
  border-radius: 999px;
  background: #e8f1ff;
}

.icon-button {
  width: 34px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #8ea1b5;
  border-radius: 5px;
  background: #ffffff;
  color: #334155;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus {
  border-color: var(--primary);
  color: var(--primary);
  background: #eef5ff;
  text-decoration: none;
}

.icon-button--danger {
  border-color: #f4a8af;
  color: var(--danger);
}

.icon-button--danger:hover,
.icon-button--danger:focus {
  border-color: var(--danger);
  color: #ffffff;
  background: var(--danger);
}

.action-count {
  position: relative;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e8f1ff;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: help;
}

.action-count::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 30;
  width: max-content;
  max-width: 260px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.16);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.action-count:hover::after,
.action-count:focus::after {
  opacity: 1;
}

.is-muted {
  opacity: 0.62;
}

.pill {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 800;
}

.pill--primary {
  color: #ffffff;
  background: var(--primary);
}

.pill--success {
  color: #ffffff;
  background: var(--accent);
}

.pill--warning {
  color: #ffffff;
  background: var(--warning);
}

.pill--danger {
  color: #ffffff;
  background: var(--danger);
}

.pill--muted {
  color: #586579;
  background: #e8edf3;
}

.muted {
  color: var(--muted);
}

.info-note {
  margin: 0 0 16px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 700;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 18px;
}

.workflow-step {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.workflow-step--done {
  border-color: #bbf7d0;
  background: #ecfdf3;
  color: #166534;
}

.workflow-step--active {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.teacher-workflow-panel {
  margin-bottom: 16px;
}

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

.teacher-workflow__step {
  display: grid;
  gap: 8px;
  min-height: 132px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  background: #f8fafc;
  color: inherit;
  text-decoration: none;
}

.teacher-workflow__step:hover,
.teacher-workflow__step:focus {
  border-color: var(--primary);
  background: #eef5ff;
  text-decoration: none;
}

.teacher-workflow__step strong,
.teacher-workflow__step span {
  display: block;
}

.teacher-workflow__step strong {
  color: var(--text);
  font-size: 0.94rem;
}

.teacher-workflow__step span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.teacher-workflow__step.is-done {
  border-color: #b7dfc9;
  background: #f3fbf6;
}

.teacher-workflow__step.is-done strong {
  color: #166534;
}

.teacher-workflow__step.is-active {
  border-color: #fed7aa;
  background: #fff7ed;
  box-shadow: inset 0 0 0 2px rgba(251, 146, 60, 0.22);
}

.teacher-workflow__step.is-active strong {
  color: #9a3412;
}

.check-inline {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #f8fafc;
  font-weight: 700;
}

.check-inline input {
  margin-top: 4px;
}

.check-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.check-row,
.check-list label {
  display: flex;
}

.check-row {
  flex-direction: column;
}

.check-list label {
  gap: 10px;
  align-items: flex-start;
  min-height: 34px;
  border-radius: 6px;
  padding: 7px 8px;
}

.check-list label:hover {
  background: #f8fafc;
}

.check-list input {
  margin-top: 3px;
}

.check-list small {
  display: block;
  color: var(--muted);
}

.sub-check {
  margin-left: 28px;
  color: var(--muted);
  font-size: 13px;
}

.sub-check--select {
  display: grid;
  gap: 5px;
  max-width: 360px;
}

.sub-check--select select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: #ffffff;
  color: var(--text);
}

.referent-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 360px) auto;
  align-items: end;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #ffffff;
}

.referent-row .sub-check {
  margin-left: 0;
}

.referent-row__button {
  min-height: 40px;
  white-space: nowrap;
}

.filter-input {
  width: 100%;
  min-height: 42px;
  margin: 4px 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  padding: 14px 0;
  background: linear-gradient(rgba(243, 245, 248, 0), var(--bg) 32%);
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.toolbar-form {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.toolbar-form input,
.toolbar-form select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.toolbar-form input {
  flex: 1;
}

.bulk-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 4px 0 14px;
}

.bulk-toolbar select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.assist-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
  border: 1px solid #b9d6ff;
  border-radius: var(--radius);
  padding: 16px;
  background: #f3f8ff;
}

.assist-panel--osint {
  border-color: #d6e2ea;
  background: #fbfdff;
}

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

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

.osint-actions .button {
  justify-content: center;
}

.button.is-disabled,
.button.is-disabled:hover,
.button.is-disabled:focus {
  border-color: var(--line);
  background: #eef1f5;
  color: #8a94a5;
  cursor: not-allowed;
}

.assist-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.assist-grid label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.assist-grid input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.assist-results {
  display: grid;
  gap: 8px;
}

.assist-result {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.assist-result:hover,
.assist-result:focus {
  border-color: var(--primary);
  background: #eef5ff;
}

.inline-form input {
  min-height: 40px;
  width: min(260px, 100%);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

.form-panel {
  max-width: 1120px;
}

.admin-form {
  display: grid;
  gap: 18px;
}

.form-section {
  display: grid;
  gap: 14px;
  padding: 16px 0 2px;
  border-top: 1px solid var(--line);
}

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

.form-section h2 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
}

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

.form-fieldset {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.form-fieldset legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.check-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #f8fafc;
}

.check-card input {
  margin-top: 4px;
}

.check-card strong,
.check-card small {
  display: block;
}

.check-card small {
  color: var(--muted);
}

.code-sample {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #101827;
  color: #e6edf7;
  font-size: 0.88rem;
}

.form-grid label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.form-grid span {
  color: var(--text);
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.field-stack textarea {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.field-stack {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.field-stack small {
  color: var(--muted);
  font-weight: 400;
}

.field-stack textarea {
  min-height: 180px;
  resize: vertical;
}

.checkline {
  min-height: 44px;
  display: flex !important;
  align-items: center;
  gap: 10px !important;
}

.checkline input {
  width: 18px;
  min-height: 18px;
}

.quick-grid,
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rating-field {
  display: grid;
  gap: 8px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #ffffff;
}

.rating-field legend {
  padding: 0 4px;
  color: var(--text);
  font-weight: 800;
}

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

.rating-scale label,
.checkbox-grid label {
  cursor: pointer;
}

.rating-scale input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rating-scale span {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 800;
}

.rating-scale input:checked + span {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.checkbox-grid label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #ffffff;
  font-weight: 700;
}

.checkbox-grid input {
  width: 18px;
  min-height: 18px;
  margin-top: 1px;
}

.form-grid__wide {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.flash {
  margin: 0 0 12px;
  border-radius: var(--radius);
  padding: 10px 12px;
}

.flash--link {
  display: block;
  font-weight: 800;
  text-decoration: none;
}

.flash--link:hover,
.flash--link:focus {
  text-decoration: underline;
}

.flash--success {
  border: 1px solid #badbcc;
  color: #0f5132;
  background: #d1e7dd;
}

.flash--error {
  border: 1px solid #f5c2c7;
  color: #842029;
  background: #f8d7da;
}

.flash--warning {
  border: 1px solid #ffec99;
  color: #7a4f01;
  background: #fff3cd;
}

.learner-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.learner-hero__text {
  display: grid;
  gap: 14px;
}

.learner-hero__text h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1.02;
}

.learner-hero__text p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.learner-hero__art svg {
  display: block;
  width: 100%;
  height: auto;
}

.learner-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.learner-steps article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.learner-steps strong {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  margin-bottom: 12px;
  background: #1f74ff;
  color: #ffffff;
}

.learner-steps h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.learner-steps p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fffbeb;
  color: #713f12;
}

.impersonation-banner strong {
  color: #92400e;
}

.definition-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.definition-list div {
  display: grid;
  gap: 2px;
}

.definition-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.definition-list dd {
  margin: 0;
  color: var(--text);
}

.definition-list dd small {
  display: block;
  color: var(--muted);
}

.help-page {
  margin-bottom: 18px;
}

.help-page details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.help-page details:first-of-type {
  border-top: 0;
}

.help-page summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
}

.help-page summary:hover,
.help-page summary:focus {
  color: var(--primary);
}

.help-page p {
  margin: 8px 0 0;
}

.help-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 24px;
}

.help-steps li {
  padding-left: 4px;
}

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

.import-columns article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #ffffff;
}

.import-columns h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.import-columns p {
  margin: 0;
  color: var(--muted);
}

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

.preline {
  white-space: pre-line;
}

.form-link {
  justify-self: start;
  color: var(--muted);
  font-size: 14px;
}

.login-panel {
  max-width: 520px;
}

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

.login-form label {
  color: var(--text);
  font-weight: 700;
}

.login-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  background: #ffffff;
  font: inherit;
}

.form-error {
  border-left: 4px solid var(--danger);
  padding: 10px 12px;
  color: var(--danger);
  background: #fff3f1;
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    border-right: 0;
    box-shadow: 0 10px 28px rgba(23, 32, 51, 0.16);
  }

  .sidebar.is-open {
    max-height: 100vh;
    overflow-y: auto;
  }

  .sidebar-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 68px;
    padding: 10px 14px;
  }

  .sidebar-brand {
    min-height: auto;
    padding: 0;
    border-bottom: 0;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font: inherit;
    font-weight: 800;
  }

  .mobile-menu-toggle:focus,
  .mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.18);
  }

  .sidebar-nav {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 0;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }

  .sidebar.is-open .sidebar-nav {
    display: grid;
  }

  .sidebar-nav__section {
    grid-column: 1 / -1;
  }

  .sidebar-account {
    display: none;
  }

  .sidebar.is-open .sidebar-account {
    display: grid;
  }

  .workflow-steps {
    grid-template-columns: 1fr;
  }

  .teacher-workflow {
    grid-template-columns: 1fr;
  }

  .app-shell--authenticated .page {
    width: min(100% - 28px, 100%);
  }

  .topbar__inner {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
    gap: 10px 14px;
  }

  .page {
    padding-top: 22px;
  }

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

  .hero__panel {
    padding: 22px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .lead {
    font-size: 16px;
  }

  .button {
    width: 100%;
  }

  .learner-hero,
  .learner-steps,
  .stage-dossier__stage {
    grid-template-columns: 1fr;
  }

  .learner-hero {
    padding: 18px;
  }

  .learner-steps article {
    padding: 14px;
  }

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

  .referent-row__button {
    width: 100%;
  }

  .dashboard-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .weekly-plan__header {
    align-items: stretch;
    flex-direction: column;
  }

  .impersonation-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .heading-actions,
  .form-actions {
    justify-content: stretch;
  }

  .metric-grid,
  .metric-grid--compact,
  .student-progress-panel,
  .dashboard-grid,
  .import-columns,
  .enterprise-profile {
    grid-template-columns: 1fr;
  }

  .directory-filters {
    grid-template-columns: 1fr;
  }

  .directory-filters__actions,
  .enterprise-card__footer {
    align-items: stretch;
    flex-direction: column;
  }

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

  .enterprise-card__header,
  .map-heading,
  .timeline-item__title {
    align-items: flex-start;
    flex-direction: column;
  }

  .enterprise-card__facts {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .donut-stat {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .legend-list {
    width: 100%;
  }

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

    .quick-grid,
    .quick-actions-grid,
    .weekly-plan__grid,
    .report-breakdown,
    .checkbox-grid,
    .print-two-columns,
  .stage-quality-summary__body,
  .quality-checklist {
    grid-template-columns: 1fr;
  }

  .stage-quality-summary__actions {
    width: 100%;
  }

  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .bulk-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-form {
    flex-direction: column;
  }

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

  .osint-actions {
    grid-template-columns: 1fr;
  }
}

.print-report {
  display: grid;
  gap: 16px;
  color: var(--text);
}

.print-report__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.print-report__header h1 {
  margin: 0 0 4px;
}

.print-report__header p {
  margin: 0;
  color: var(--muted);
}

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

.print-metrics article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface);
}

.print-metrics span,
.print-table small {
  display: block;
  color: var(--muted);
}

.print-metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

.print-table th,
.print-table td {
  border: 1px solid var(--line);
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
}

.print-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.stage-dossier__student {
  break-inside: avoid;
}

.stage-dossier__student-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  padding-bottom: 8px;
}

.stage-dossier__student-header h2,
.stage-dossier__student-header p,
.stage-dossier__stage h3,
.stage-dossier__stage p,
.stage-dossier__notes h3,
.stage-dossier__notes p {
  margin: 0;
}

.stage-dossier__stage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.stage-dossier__stage h3,
.stage-dossier__notes h3 {
  margin-bottom: 6px;
  font-size: 15px;
}

.stage-dossier__stage p,
.stage-dossier__notes p {
  color: var(--muted);
  line-height: 1.4;
}

.stage-dossier__notes {
  padding: 10px 0 2px;
}

.print-alert {
  color: var(--danger) !important;
  font-weight: 800;
}

.print-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.print-brand {
  display: grid;
  gap: 3px;
  text-align: right;
}

.print-brand span {
  color: var(--muted);
}

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

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

.report-status-bars {
  margin-top: 4px;
}

.report-breakdown div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #f8fafc;
}

.report-breakdown strong,
.report-breakdown span {
  display: block;
}

.report-breakdown strong {
  font-size: 24px;
  line-height: 1;
}

.report-breakdown span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.print-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface);
}

.print-card h2 {
  margin: 0;
  font-size: 16px;
}

.print-two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.print-two-columns dl,
.print-notes {
  display: grid;
  gap: 8px;
  margin: 0;
}

.print-two-columns div,
.print-notes div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px;
}

.print-two-columns dt,
.print-notes dt {
  color: var(--muted);
  font-weight: 800;
}

.print-two-columns dd,
.print-notes dd {
  margin: 0;
}

.compact-table th {
  width: 34%;
}

.official-print {
  display: grid;
  gap: 14px;
}

.official-sheet {
  display: grid;
  gap: 10px;
  max-width: 920px;
  margin: 0 auto;
  border: 1px solid #111827;
  padding: 14px;
  background: #ffffff;
  color: #111827;
  font-size: 12px;
}

.official-header {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 16px;
  align-items: start;
  border-bottom: 2px solid #111827;
  padding-bottom: 8px;
}

.official-header h1 {
  margin: 0;
  font-size: 20px;
  text-align: center;
}

.official-header p {
  margin: 4px 0 0;
  color: #4b5563;
  text-align: center;
}

.official-school {
  display: grid;
  gap: 1px;
  line-height: 1.25;
}

.official-box {
  border: 1px solid #111827;
  padding: 8px;
}

.official-box h2 {
  margin: 0 0 6px;
  font-size: 14px;
  text-transform: uppercase;
}

.official-box h3 {
  margin: 8px 0 4px;
  font-size: 12px;
}

.official-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
}

.official-grid label {
  display: flex;
  align-items: end;
  gap: 6px;
  min-height: 20px;
  font-weight: 700;
}

.official-grid__wide {
  grid-column: 1 / -1;
}

.official-line {
  min-width: 90px;
  flex: 1;
  border-bottom: 1px solid #111827;
  padding: 0 4px 1px;
  font-weight: 500;
}

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

.official-rating-table {
  width: 100%;
  border-collapse: collapse;
}

.official-rating-table th,
.official-rating-table td {
  border: 1px solid #111827;
  padding: 4px 6px;
  vertical-align: middle;
}

.official-rating-table th {
  width: 68%;
  text-align: left;
}

.official-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
}

.official-scale span {
  display: grid;
  min-height: 22px;
  place-items: center;
  border: 1px solid #111827;
  font-weight: 800;
}

.official-scale .is-checked {
  background: #dbeafe;
  box-shadow: inset 0 0 0 2px #111827;
}

.official-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 12px;
}

.official-check {
  display: inline-flex;
  align-items: flex-start;
  gap: 5px;
  line-height: 1.25;
}

.official-check i {
  display: inline-grid;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  place-items: center;
  border: 1px solid #111827;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.official-textarea {
  min-height: 86px;
  margin: 0;
  border: 1px solid #9ca3af;
  padding: 6px;
  white-space: pre-wrap;
}

.official-textarea--short {
  min-height: 64px;
}

.official-notes {
  margin-top: 8px;
}

.official-notes p {
  min-height: 52px;
  margin: 0;
  border: 1px solid #9ca3af;
  padding: 6px;
  white-space: pre-wrap;
}

.official-footer {
  display: flex;
  min-height: 48px;
  align-items: end;
  justify-content: space-between;
  border-top: 1px solid #111827;
  padding-top: 6px;
  color: #4b5563;
}

@media print {
  body {
    background: #ffffff;
  }

  .sidebar,
  .topbar,
  .print-hidden {
    display: none !important;
  }

  .app-shell,
  .app-shell--authenticated {
    display: block;
    min-height: auto;
  }

  .page {
    padding: 0;
  }

  .print-report {
    gap: 10px;
    font-size: 11px;
  }

  .print-report__header,
  .print-footer {
    break-inside: avoid;
  }

  .print-metrics {
    grid-template-columns: repeat(6, 1fr);
  }

  .print-metrics article {
    border-radius: 0;
    padding: 6px;
  }

  .print-metrics strong {
    font-size: 18px;
  }

  .print-table th,
  .print-table td {
    padding: 4px 5px;
  }

  .official-sheet {
    max-width: none;
    min-height: 275mm;
    border: 0;
    padding: 0;
    box-shadow: none;
    page-break-after: always;
  }

  .official-box,
  .official-rating-table th,
  .official-rating-table td,
  .official-scale span,
  .official-check i {
    border-color: #000000;
  }
}

/* Formulaires officiels de suivi de stage BTS SIO */
.official-sheet--bahuet {
  gap: 14px;
  min-height: 297mm;
  border: 0;
  padding: 0 0 12mm;
  font-size: 13px;
}

.official-header--bahuet {
  grid-template-columns: 150px 1fr 170px;
  align-items: center;
  min-height: 90px;
  border: 0;
  border-bottom: 5px solid #9fc51a;
  padding: 12px 18px;
  background: #269c7c;
  color: #ffffff;
}

.official-header--bahuet h1 {
  color: #ffffff;
  font-size: 24px;
  font-weight: 400;
}

.official-brand,
.official-school {
  display: grid;
  gap: 2px;
  line-height: 1.25;
}

.official-school {
  text-align: right;
}

.official-paper-section {
  padding: 0 18px;
  break-inside: avoid;
}

.official-paper-section--grow {
  flex: 1;
}

.official-paper-section h2 {
  margin: 0 0 12px;
}

.official-paper-section h2 span {
  display: inline-block;
  min-width: 210px;
  border: 1px solid #111827;
  border-radius: 24px;
  padding: 8px 18px;
  background: #26aa82;
  color: #ffffff;
  font-size: 15px;
  text-align: center;
}

.official-paper-section h3 {
  margin: 12px 0 6px;
  font-size: 13px;
}

.official-grid--identity {
  gap: 8px 14px;
}

.official-section-caption {
  margin: -38px 0 18px 290px;
  font-size: 13px;
}

.official-two--rating-notes {
  grid-template-columns: minmax(360px, .9fr) minmax(0, 1.1fr);
  align-items: start;
}

.official-rating-table--paper th,
.official-rating-table--paper td {
  border: 0;
  padding: 4px 6px;
}

.official-rating-table--paper th {
  width: 62%;
  font-weight: 500;
}

.official-scale--circles {
  gap: 7px;
}

.official-scale--circles span {
  width: 22px;
  min-height: 22px;
  border-radius: 50%;
  background: #ffffff;
  color: #111827;
  font-size: 13px;
}

.official-scale--circles .is-checked {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #111827;
}

.official-check-grid {
  gap: 8px 28px;
}

.official-check i {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  border-radius: 50%;
}

.official-textarea--lined {
  border: 0;
  padding: 2px 4px;
  line-height: 29px;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 27px, #70b9a5 28px, transparent 29px);
}

.official-textarea--compact {
  min-height: 72px;
}

.official-textarea--projects {
  min-height: 235px;
}

.official-textarea--career {
  min-height: 112px;
}

.official-textarea--teacher {
  min-height: 125px;
}

.official-notes--lined p {
  min-height: 116px;
}

.official-paper-footer {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  align-items: end;
  padding: 0 18px;
}

.official-paper-footer label {
  display: flex;
  gap: 8px;
  align-items: end;
  font-weight: 700;
}

.official-signature {
  min-height: 92px;
  border: 4px solid #26aa82;
  border-radius: 42px;
  padding: 10px;
  text-align: center;
}

.official-sheet--second-page {
  padding-top: 18mm;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  .official-print {
    gap: 0;
  }

  .official-sheet--bahuet {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding-bottom: 10mm;
    page-break-after: always;
    break-after: page;
  }

  .official-sheet--bahuet:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .official-header--bahuet {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .official-paper-section h2 span {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* Invitations sécurisées de suivi */
.action-alert-panel{display:flex;gap:1rem;align-items:center;flex-wrap:wrap;padding:1rem 1.25rem;margin:0 0 1rem;background:#fff4d6;border:1px solid #f1c45c;border-left:6px solid #d98b00;border-radius:10px}.action-alert-panel>div{display:flex;align-items:baseline;gap:.45rem}.action-alert-panel strong{font-size:1.65rem}.action-alert-panel .button{margin-left:auto}.public-form-shell{max-width:860px;margin:2rem auto;padding:0 1rem}.public-form-card{padding:2rem}.response-field{padding:1rem 0;border-top:1px solid #dde5ec}.response-field:first-of-type{border-top:0}.rating-choice{display:flex;gap:.65rem;flex-wrap:wrap}.rating-choice label{cursor:pointer}.rating-choice input{position:absolute;opacity:0}.rating-choice span{display:grid;place-items:center;width:42px;height:42px;border:2px solid #9eb0bf;border-radius:50%;font-weight:700}.rating-choice input:checked+span{background:#1c9a70;color:#fff;border-color:#1c9a70}.checkbox-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:.65rem}.tag-list{display:flex;flex-wrap:wrap;gap:.5rem}.tag-list code{background:#eef3f7;padding:.3rem .5rem;border-radius:5px}.input--tiny{width:58px!important;padding:.35rem!important}.button--small{padding:.42rem .65rem;font-size:.85rem}.sticky-form-actions{position:sticky;bottom:0;background:rgba(255,255,255,.95);padding:1rem;border-top:1px solid #dce4eb;text-align:right}.flash--info{background:#eaf4ff;border-color:#8ec5ff}.flash--warning{background:#fff4d6;border-color:#f1c45c}@media(max-width:700px){.action-alert-panel .button{margin-left:0;width:100%}.public-form-card{padding:1rem}}

/* === StagePilot UI refinement: paramètres + modèles de courriels === */
.settings-overview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1rem}
.settings-overview-card{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;padding:1.15rem 1.25rem;border:1px solid #dce4eb;border-radius:12px;background:linear-gradient(180deg,#fbfdff 0%,#f4f8fb 100%)}
.settings-overview-card h2{margin:0 0 .35rem}
.settings-overview-card p{margin:0;color:#5f7387}
.settings-category-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.settings-category-card{display:flex;flex-direction:column;gap:1rem}
.settings-category-card--wide{grid-column:1/-1}
.settings-category-card__header h2{margin:0 0 .3rem}
.settings-category-card__header p{margin:0;color:#5f7387}
.settings-link-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.85rem}
.settings-link-list--three{grid-template-columns:repeat(3,minmax(0,1fr))}
.settings-link{display:flex;flex-direction:column;gap:.25rem;padding:1rem 1rem;border:1px solid #dce4eb;border-radius:12px;background:#fff;text-decoration:none;color:inherit;transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease}
.settings-link strong{color:#12344d}
.settings-link span{font-size:.92rem;color:#5f7387;line-height:1.4}
.settings-link:hover,.settings-link:focus-visible{border-color:#3a78f2;box-shadow:0 8px 18px rgba(12,48,87,.08);transform:translateY(-1px);outline:none}
.template-helper-panel{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,.8fr);gap:1rem;align-items:start}
.template-helper-panel__content h2{margin:0 0 .4rem}
.template-helper-panel__content p{margin:.2rem 0 0;color:#5f7387}
.template-helper-panel__aside{padding:1rem 1.1rem;border-radius:12px;background:#f7fafc;border:1px solid #dce4eb}
.template-helper-panel__aside h3{margin:0 0 .6rem;font-size:1rem}
.compact-list{margin:0;padding-left:1.15rem;color:#44566a}
.compact-list li+li{margin-top:.4rem}
.template-editor-form{display:flex;flex-direction:column;gap:1rem}
.template-editor-list{display:grid;grid-template-columns:1fr;gap:1rem}
.template-editor-card{display:flex;flex-direction:column;gap:1rem}
.template-editor-card__header{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}
.template-editor-card__header h2{margin:0 0 .35rem}
.template-editor-card__header p{margin:0;color:#5f7387}
.template-editor-card__badges{display:flex;gap:.5rem;flex-wrap:wrap;justify-content:flex-end}
.badge{display:inline-flex;align-items:center;padding:.3rem .6rem;border-radius:999px;font-size:.86rem;font-weight:600;background:#e9eef4;color:#24415a}
.badge--info{background:#e8f1ff;color:#2557b7}
.badge--soft{background:#eef7f2;color:#1c7a57}
.template-editor-meta{display:grid;grid-template-columns:minmax(240px,1fr) 220px;gap:1rem;align-items:end}
.template-editor-card label{display:flex;flex-direction:column;gap:.4rem}
.template-editor-card label>span{font-weight:600;color:#12344d}
.template-editor-card small{color:#6a7d90}
.template-editor-card textarea{min-height:220px;resize:vertical}

@media (max-width: 1100px){
  .settings-category-grid{grid-template-columns:1fr}
  .settings-link-list,.settings-link-list--three{grid-template-columns:1fr}
  .template-helper-panel{grid-template-columns:1fr}
}
@media (max-width: 760px){
  .settings-overview-card{flex-direction:column}
  .template-editor-card__header{flex-direction:column}
  .template-editor-card__badges{justify-content:flex-start}
  .template-editor-meta{grid-template-columns:1fr}
}

/* === Invitations sécurisées : rendu desktop et mobile === */
.public-response-page{min-height:100vh;background:#eef3f7;color:var(--text)}
.public-response-header{background:#173247;color:#fff;border-bottom:4px solid #2fae86}
.public-response-header__inner{width:min(1100px,calc(100% - 2rem));margin:0 auto;min-height:74px;display:flex;align-items:center;justify-content:space-between;gap:1rem}
.public-response-header .brand{color:#fff}
.public-response-header .brand__tagline{color:#c9d7e2}
.public-response-header__badge{display:inline-flex;align-items:center;padding:.4rem .75rem;border:1px solid rgba(255,255,255,.28);border-radius:999px;font-size:.86rem;font-weight:700;background:rgba(255,255,255,.08)}
.public-response-main{padding:2rem 0 3rem}
.public-response-footer{width:min(1100px,calc(100% - 2rem));margin:0 auto;padding:0 0 2rem;display:flex;justify-content:space-between;gap:1rem;color:#64788a;font-size:.86rem}
.public-form-shell{width:min(1040px,calc(100% - 2rem));max-width:none;margin:0 auto;padding:0}
.public-form-shell--compact{width:min(620px,calc(100% - 2rem))}
.public-form-card{padding:2rem 2.25rem;border-radius:16px;box-shadow:0 16px 40px rgba(17,45,67,.09)}
.public-test-banner{display:flex;align-items:center;gap:.6rem;margin-bottom:1.5rem}
.public-form-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:1.5rem;padding-bottom:1.4rem;border-bottom:1px solid var(--line)}
.public-form-kicker{margin:0 0 .4rem;color:#2a7b60;font-size:.86rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.public-form-heading h1{margin:0 0 .45rem;font-size:clamp(1.65rem,3vw,2.35rem)}
.public-form-context{display:flex;flex-wrap:wrap;gap:.4rem;margin:0;color:#4f6477}
.public-form-status{min-width:120px;padding:.75rem 1rem;border-radius:12px;background:#eef8f4;text-align:center;color:#1f6f54}
.public-form-status strong,.public-form-status span{display:block}
.public-form-status span{margin-top:.15rem;font-size:.86rem}
.public-form-intro{margin:1.25rem 0 0;padding:1rem 1.1rem;border-left:4px solid #3a78f2;border-radius:8px;background:#f3f7ff;color:#41576c}
.public-response-form{margin-top:1rem}
.response-field{padding:1.45rem 0;border-top:1px solid #dde5ec}
.response-field:first-of-type{border-top:0}
.response-field__heading{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;margin-bottom:.8rem}
.response-field__heading h2{margin:0;font-size:1.12rem}
.response-field__heading span{color:#708397;font-size:.86rem}
.public-response-textarea{display:block;width:100%;min-height:170px;box-sizing:border-box;padding:1rem 1.05rem;border:1px solid #bcc9d5;border-radius:10px;background:#fff;font:inherit;line-height:1.55;resize:vertical;transition:border-color .15s ease,box-shadow .15s ease}
.public-response-textarea:focus{border-color:#3a78f2;box-shadow:0 0 0 3px rgba(58,120,242,.14);outline:none}
.field-help{display:block;margin-top:.5rem;color:#6c7f91;line-height:1.4}
.public-domain-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.public-domain-grid label{min-height:54px;align-items:flex-start}
.public-domain-grid label span{line-height:1.35}
.public-form-footer-note{margin-top:.8rem;padding:1rem 1.1rem;border-radius:10px;background:#f7fafc;border:1px solid #dce4eb;color:#52677a}
.public-form-footer-note p{margin:0}
.public-form-actions{display:flex;justify-content:flex-end;margin-top:1.25rem}
.public-submit-button{min-width:190px}
.public-message-card{text-align:center;padding:2.5rem}
.public-message-card__icon{display:grid;place-items:center;width:60px;height:60px;margin:0 auto 1rem;border-radius:50%;background:#e7f6ef;color:#197450;font-size:2rem;font-weight:800}
.public-message-card__icon--warning{background:#fff3d5;color:#a26400}
.public-message-card h1{margin:0 0 .75rem}
.section-heading-row{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;margin-bottom:1rem}
.section-heading-row h2{margin:0 0 .3rem}
.section-heading-row p{margin:0;color:var(--muted)}
.invitation-create-form{display:flex;flex-direction:column;gap:1rem}
.invitation-create-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.invitation-create-grid label{display:flex;flex-direction:column;gap:.4rem}
.invitation-create-grid label>span{font-weight:700;color:var(--text)}
.input-with-suffix{display:grid;grid-template-columns:minmax(80px,1fr) auto;align-items:center}
.input-with-suffix input{border-radius:8px 0 0 8px}
.input-with-suffix span{align-self:stretch;display:grid;place-items:center;padding:0 .8rem;border:1px solid var(--line);border-left:0;border-radius:0 8px 8px 0;background:#f5f7fa;color:var(--muted)}
.invitation-create-footer{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding-top:1rem;border-top:1px solid var(--line)}
.compact-checkbox-option{display:flex;align-items:flex-start;gap:.75rem;cursor:pointer}
.compact-checkbox-option input{width:18px!important;height:18px!important;min-height:18px!important;flex:0 0 18px;margin:.15rem 0 0}
.compact-checkbox-option span{display:flex;flex-direction:column;gap:.15rem}
.compact-checkbox-option small{color:var(--muted);line-height:1.35}
.invitation-row-actions{align-items:center}
.resend-inline-form{display:flex;align-items:center;gap:.45rem}
.resend-inline-form label{margin:0}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

@media(max-width:760px){
  .public-response-header__inner{min-height:64px}
  .public-response-header__badge{display:none}
  .public-response-main{padding:1rem 0 2rem}
  .public-form-shell,.public-form-shell--compact{width:min(100% - 1rem,1040px)}
  .public-form-card{padding:1.15rem;border-radius:12px}
  .public-form-heading{flex-direction:column;gap:1rem}
  .public-form-status{width:100%;box-sizing:border-box;text-align:left}
  .public-form-status strong,.public-form-status span{display:inline}
  .public-form-status span::before{content:' · '}
  .response-field{padding:1.15rem 0}
  .response-field__heading{align-items:flex-start;flex-direction:column;gap:.25rem}
  .rating-choice{gap:.45rem}
  .rating-choice span{width:40px;height:40px}
  .public-domain-grid{grid-template-columns:1fr}
  .public-response-textarea{min-height:150px}
  .public-form-actions{justify-content:stretch}
  .public-submit-button{width:100%}
  .public-response-footer{flex-direction:column;padding-bottom:1.25rem}
  .invitation-create-grid{grid-template-columns:1fr}
  .invitation-create-footer{align-items:stretch;flex-direction:column}
  .invitation-create-footer .button{width:100%}
}

/* === Recherche étudiante gamifiée === */
.student-discovery-panel{display:grid;grid-template-columns:minmax(280px,.78fr) minmax(0,1.22fr);gap:18px;margin:18px 0;padding:22px;border:1px solid #d8e3ef;border-radius:18px;background:linear-gradient(135deg,#edf6ff 0%,#f8fbff 50%,#eefaf5 100%);box-shadow:0 14px 32px rgba(31,74,125,.08);position:relative;overflow:hidden}
.student-discovery-panel::after{content:"";position:absolute;width:220px;height:220px;border-radius:50%;right:-80px;top:-110px;background:rgba(45,126,247,.08);pointer-events:none}
.student-discovery-panel__intro{position:relative;z-index:1;display:flex;flex-direction:column;justify-content:center}
.student-discovery-panel__eyebrow{display:inline-flex;width:max-content;padding:.32rem .68rem;border-radius:999px;background:#1f73e8;color:#fff;font-size:.8rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;margin-bottom:.7rem}
.student-discovery-panel__intro h2{margin:0 0 .55rem;font-size:1.65rem;color:#14324b}
.student-discovery-panel__intro p{margin:0;color:#4f6477;line-height:1.55}
.student-discovery-panel__progress{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-top:1.15rem;padding:.8rem 1rem;border-radius:12px;background:#fff;border:1px solid rgba(31,115,232,.16)}
.student-discovery-panel__progress span{color:#617386;font-size:.9rem}
.student-discovery-panel__progress strong{color:#1f73e8}
.student-discovery-actions{position:relative;z-index:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.student-discovery-card{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:.8rem;padding:1rem;border-radius:14px;text-decoration:none;color:#1e3347;background:#fff;border:1px solid #dce7f2;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.student-discovery-card:hover,.student-discovery-card:focus-visible{transform:translateY(-2px);box-shadow:0 10px 20px rgba(29,65,104,.12);outline:none}
.student-discovery-card__icon{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:#eef5ff;font-size:1.3rem}
.student-discovery-card strong{display:block;color:#16344f;margin-bottom:.2rem}
.student-discovery-card small{display:block;color:#617386;line-height:1.35}
.student-discovery-card em{font-style:normal;font-size:1.25rem;font-weight:800;color:#7b8ea0}
.student-discovery-card--primary{border-color:#9fc3ff;background:linear-gradient(135deg,#fff 0%,#f2f7ff 100%)}
.student-discovery-card--primary .student-discovery-card__icon{background:#dfeeff}
.student-discovery-card--success{border-color:#a8dcc7;background:linear-gradient(135deg,#fff 0%,#f0faf5 100%)}
.student-discovery-card--success .student-discovery-card__icon{background:#daf2e6}
.student-discovery-panel__note{grid-column:1/-1;position:relative;z-index:1;padding:.8rem 1rem;border-left:4px solid #f3a72f;border-radius:8px;background:#fff9e9;color:#5b4b29;font-size:.92rem}

@media(max-width:980px){.student-discovery-panel{grid-template-columns:1fr}.student-discovery-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.student-discovery-panel{padding:16px;border-radius:14px}.student-discovery-panel__intro h2{font-size:1.35rem}.student-discovery-actions{grid-template-columns:1fr}.student-discovery-card{grid-template-columns:40px minmax(0,1fr) auto;padding:.85rem}.student-discovery-card__icon{width:40px;height:40px}.student-discovery-panel__progress{align-items:flex-start;flex-direction:column}}


/* Entreprises hors base et recherche étudiante */
.external-company-choice{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem;border:1px dashed #86a8c4;border-radius:12px;background:#f7fbff}.external-company-toggle{display:flex!important;align-items:flex-start!important;gap:.75rem}.external-company-toggle input{width:20px!important;height:20px!important;flex:0 0 auto;margin-top:.15rem}.external-company-toggle span{display:flex;flex-direction:column;gap:.2rem}.external-company-toggle small{font-weight:400;color:#5f7387}.external-company-panel{padding:1rem;border:1px solid #bdd5e8;border-radius:14px;background:#fbfdff}.mission-banner{display:flex;align-items:center;gap:1rem;padding:1rem;border-radius:14px;background:linear-gradient(135deg,#e8f3ff,#eefaf5);border:1px solid #bad7eb;margin-bottom:1rem}.mission-banner__step{display:inline-flex;padding:.35rem .7rem;border-radius:999px;background:#1f76e8;color:#fff;font-weight:700}.mission-banner p{margin:.2rem 0 0;color:#4d657a}.student-discovery-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:1.25rem;align-items:center;padding:1.4rem;margin-bottom:1rem;border-radius:16px;color:#fff;background:linear-gradient(135deg,#1368ce 0%,#1b9a72 100%);box-shadow:0 12px 30px rgba(20,77,129,.18)}.student-discovery-hero h2{margin:.25rem 0 .4rem}.student-discovery-hero p{margin:0;max-width:760px}.student-discovery-hero__eyebrow{font-size:.82rem;text-transform:uppercase;letter-spacing:.08em;font-weight:700}.student-discovery-progress{display:grid;grid-template-columns:auto auto;gap:.25rem .55rem;align-items:center}.student-discovery-progress strong{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:rgba(255,255,255,.22)}.student-discovery-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:1rem;align-items:end}.student-discovery-form label{display:flex;flex-direction:column;gap:.4rem}.student-discovery-form label>span{font-weight:600}.student-discovery-results{display:grid;gap:1rem}.discovery-company-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:1rem;align-items:center}.discovery-company-card__rank{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:#e8f1ff;color:#245fbe;font-weight:800;font-size:1.1rem}.discovery-company-card__head{display:flex;align-items:center;justify-content:space-between;gap:1rem}.discovery-company-card h2{margin:0}.discovery-company-card p{margin:.25rem 0}.proposed-company-list{display:grid;gap:1rem}.proposed-company-card header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.proposed-company-card h2{margin:0}.proposed-company-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin:1rem 0}.pill--warning{background:#fff1cc;color:#825500}.proposed-company-card .form-actions{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center}.proposed-company-card .form-actions form{margin:0}
@media(max-width:950px){.student-discovery-form{grid-template-columns:1fr 1fr}.student-discovery-form button{grid-column:1/-1}.student-discovery-hero{grid-template-columns:1fr}.proposed-company-grid{grid-template-columns:1fr}.discovery-company-card{grid-template-columns:auto 1fr}.discovery-company-card>.button{grid-column:1/-1}}
@media(max-width:650px){.student-discovery-form{grid-template-columns:1fr}.external-company-choice{align-items:stretch;flex-direction:column}.discovery-company-card{grid-template-columns:1fr}.discovery-company-card__rank{width:34px;height:34px}.discovery-company-card__head{align-items:flex-start;flex-direction:column}.student-discovery-progress{display:none}}

/* === Correctif UI recherche entreprise étudiante === */
.student-discovery-hero--refined{padding:1.6rem 1.75rem;border-radius:18px;background:linear-gradient(135deg,#135fc8 0%,#1b78e5 62%,#3a89ef 100%);box-shadow:0 16px 34px rgba(15,64,131,.16);align-items:stretch}
.student-discovery-hero__main{display:flex;flex-direction:column;gap:.6rem}
.student-discovery-hero--refined h2{margin:0;font-size:2rem;line-height:1.15}
.student-discovery-hero--refined p{opacity:.98;line-height:1.55}
.student-discovery-hero__tips{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.2rem}
.student-discovery-progress--cards{display:grid;grid-template-columns:1fr;gap:.55rem;min-width:180px}
.student-discovery-progress--cards>div{display:flex;align-items:center;gap:.65rem;padding:.55rem .75rem;border:1px solid rgba(255,255,255,.18);border-radius:12px;background:rgba(255,255,255,.1)}
.student-discovery-progress--cards strong{background:#fff;color:#1659bf;width:28px;height:28px}
.student-discovery-progress--cards span{font-weight:700}
.student-discovery-search-panel{padding:1.25rem 1.3rem 1.4rem;border-radius:18px;border:1px solid #dfe7f1;box-shadow:0 8px 24px rgba(22,53,91,.05)}
.student-discovery-search-panel__header{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;margin-bottom:1rem}
.student-discovery-search-panel__header h2{margin:0 0 .25rem;color:#17324a}
.student-discovery-search-panel__header p{margin:0;color:#5f7387;line-height:1.45;max-width:780px}
.student-discovery-search-panel__badge{padding:.55rem .85rem;border-radius:999px;background:#eef5ff;color:#2159b6;font-weight:700;white-space:nowrap}
.student-discovery-form--refined{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:1rem 1.15rem;align-items:start}
.student-discovery-field{grid-column:span 3;display:flex;flex-direction:column;gap:.35rem}
.student-discovery-field--wide{grid-column:span 6}
.student-discovery-field label{display:flex;flex-direction:column;gap:.38rem}
.student-discovery-field label>span{font-weight:700;color:#15344d}
.student-discovery-field select,.student-discovery-field input{width:100%;min-height:48px;padding:.72rem .85rem;border:1px solid #cfdbe8;border-radius:12px;background:#fff;box-shadow:inset 0 1px 1px rgba(0,0,0,.02)}
.student-discovery-field select:focus,.student-discovery-field input:focus{outline:none;border-color:#3a78f2;box-shadow:0 0 0 4px rgba(58,120,242,.12)}
.student-discovery-helper{color:#627589;line-height:1.45}
.student-discovery-form__actions{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding-top:.2rem}
.student-discovery-form__submit{min-width:260px}
.student-discovery-legend{margin:0;color:#607488;line-height:1.45;max-width:760px}
.student-discovery-empty-state{padding:2rem 1.5rem;border:1px dashed #c7d6e6;border-radius:16px;background:linear-gradient(180deg,#fbfdff 0%,#f6f9fd 100%)}
.student-discovery-loading{border-radius:16px}
.discovery-summary--refined{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 1.2rem;border-radius:14px;background:#f3f7fb;border:1px solid #dce6f0;color:#17324a}
.discovery-summary__hint{color:#5f7387;font-size:.95rem}
.discovery-result-group--refined{display:grid;gap:.85rem}
.discovery-result-group__heading h2{margin:0 0 .25rem;color:#17324a}
.discovery-result-group__heading p{margin:0;color:#607488}
.discovery-company-list{display:grid;gap:.85rem}
.discovery-company-card--refined{grid-template-columns:54px minmax(0,1fr) auto;gap:1.1rem;padding:1rem 1.1rem;border-radius:16px;border:1px solid #dfe7f1;box-shadow:0 8px 20px rgba(22,53,91,.04)}
.discovery-company-card--refined .discovery-company-card__rank{width:46px;height:46px;background:#edf4ff;color:#2159b6;font-size:1.08rem}
.discovery-company-card__content{display:grid;gap:.35rem}
.discovery-company-card--refined .discovery-company-card__head{align-items:flex-start}
.discovery-company-card--refined h3{margin:0;color:#17324a;font-size:1.15rem}
.discovery-company-card__place{margin:0;color:#42586f;font-weight:600}
.discovery-company-card__activity{margin:0;color:#52677a;line-height:1.45}
.discovery-company-card__meta{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap;color:#566c80}
.discovery-company-card__meta small{font-size:.92rem;color:#5f7387}
.discovery-company-card__actions{display:flex;align-items:center}
.pill--info{background:#eaf3ff;color:#1d5eb8}
.pill--score{background:#eef3f8;color:#334b63;font-weight:800}
@media(max-width:1100px){
  .student-discovery-form--refined{grid-template-columns:repeat(6,minmax(0,1fr))}
  .student-discovery-field{grid-column:span 3}
  .student-discovery-field--wide{grid-column:1/-1}
}
@media(max-width:860px){
  .student-discovery-hero--refined{padding:1.25rem}
  .student-discovery-hero--refined h2{font-size:1.65rem}
  .student-discovery-search-panel__header,.discovery-summary--refined,.student-discovery-form__actions{flex-direction:column;align-items:flex-start}
  .student-discovery-search-panel__badge{white-space:normal}
  .discovery-company-card--refined{grid-template-columns:46px 1fr}
  .discovery-company-card__actions{grid-column:1/-1}
}
@media(max-width:640px){
  .student-discovery-form--refined{grid-template-columns:1fr}
  .student-discovery-field,.student-discovery-field--wide{grid-column:1/-1}
  .student-discovery-form__submit{width:100%;min-width:0}
  .student-discovery-hero__tips{display:none}
  .student-discovery-progress--cards{grid-template-columns:repeat(2,minmax(0,1fr));min-width:0}
  .discovery-company-card--refined{grid-template-columns:1fr;padding:.95rem}
  .discovery-company-card--refined .discovery-company-card__rank{width:38px;height:38px}
}

/* === Recherche entreprise v3 : aide, détail, pagination, anti-doublon === */
.discovery-before-search{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:1rem;align-items:center;margin-bottom:1rem;border-left:5px solid #f2a531;background:#fffaf0}
.discovery-before-search__icon{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:#f2a531;color:#fff;font-weight:900;font-size:1.15rem}
.discovery-before-search h2{margin:0 0 .2rem;color:#17324a}.discovery-before-search p{margin:0;color:#5c6f80;line-height:1.45}
.context-help{display:inline-grid;place-items:center;width:19px;height:19px;padding:0;border:0;border-radius:50%;background:#e8f1fb;color:#234f82;font-size:.72rem;font-weight:900;line-height:1;cursor:help;vertical-align:middle;position:relative}
.context-help::after{content:attr(data-tooltip);position:absolute;z-index:100;left:50%;bottom:calc(100% + 9px);transform:translateX(-50%);width:min(300px,75vw);padding:.65rem .75rem;border-radius:10px;background:#183047;color:#fff;font-size:.82rem;font-weight:500;line-height:1.4;box-shadow:0 8px 22px rgba(0,0,0,.2);opacity:0;visibility:hidden;pointer-events:none}
.context-help:hover::after,.context-help:focus::after{opacity:1;visibility:visible}.context-help:focus{outline:3px solid rgba(48,116,210,.25)}
.discovery-company-card__actions{gap:.55rem;flex-wrap:wrap}.is-result-hidden{display:none!important}.discovery-show-more{justify-self:start;margin-top:.2rem}.discovery-show-more span{font-weight:500;opacity:.8}
.company-detail-dialog{width:min(760px,calc(100vw - 28px));max-height:calc(100vh - 28px);padding:0;border:0;border-radius:20px;background:transparent}.company-detail-dialog::backdrop{background:rgba(16,35,54,.62);backdrop-filter:blur(3px)}
.company-detail-dialog__shell{position:relative;padding:1.6rem;background:#fff;border-radius:20px;box-shadow:0 24px 70px rgba(0,0,0,.25);overflow:auto;max-height:calc(100vh - 28px)}
.company-detail-dialog__close{position:absolute;right:1rem;top:1rem;width:36px;height:36px;border:0;border-radius:50%;background:#eef3f8;color:#183047;font-size:1.5rem;cursor:pointer}.company-detail-dialog h2{margin:.35rem 3rem .2rem 0;color:#17324a}.company-detail-dialog__lead{margin:0 0 1.1rem;color:#647688}
.company-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.company-detail-grid>div{padding:.9rem;border:1px solid #dfe7f0;border-radius:13px;background:#f9fbfd}.company-detail-grid span{display:block;color:#637587;font-size:.86rem;margin-bottom:.28rem}.company-detail-grid strong{color:#17324a;line-height:1.4}
.company-detail-advice{margin:1rem 0;padding:1rem;border-radius:14px;background:#eef6ff;border-left:4px solid #2f74d0}.company-detail-advice p{margin:.25rem 0 0;color:#4f6578}.company-detail-actions{display:flex;gap:.65rem;flex-wrap:wrap}
.duplicate-prevention-note{display:flex;gap:.8rem;align-items:flex-start;padding:.9rem 1rem;border:1px solid #f1d38e;border-radius:13px;background:#fffaf0}.duplicate-prevention-note__icon{display:grid;place-items:center;flex:0 0 auto;width:30px;height:30px;border-radius:50%;background:#f2a531;color:#fff;font-weight:900}.duplicate-prevention-note p{margin:.2rem 0 0;color:#685c42;line-height:1.45}
.help-mission{border-top:5px solid #2e73ce;background:linear-gradient(180deg,#f5f9ff,#fff)}.help-mission__eyebrow{display:inline-flex;padding:.3rem .65rem;border-radius:999px;background:#e8f1ff;color:#215aa8;font-weight:800;font-size:.8rem;text-transform:uppercase;letter-spacing:.04em}.help-achievement{display:flex;gap:.75rem;align-items:center;margin-top:1rem;padding:.85rem 1rem;border-radius:12px;background:#eef9f3;border:1px solid #bee1cb}.help-achievement strong{color:#1d6844}.help-achievement span{color:#49675a}
@media(max-width:760px){.discovery-before-search{grid-template-columns:auto 1fr}.discovery-before-search .button{grid-column:1/-1;width:100%}.company-detail-grid{grid-template-columns:1fr}.company-detail-actions .button{width:100%}.company-detail-dialog__shell{padding:1.2rem}.context-help::after{left:auto;right:-12px;transform:none}.help-achievement{align-items:flex-start;flex-direction:column}}
.discovery-company-card__reason{margin:.2rem 0 .35rem;padding:.65rem .8rem;border-left:3px solid #4d7fd3;border-radius:8px;background:#f4f8fd;color:#314a63;line-height:1.45}
.discovery-company-card__reason strong{color:#17324a}

/* === Recherche entreprises v5 : onglets modernes et listes progressives === */
.discovery-tabs{display:flex;gap:.55rem;overflow-x:auto;padding:.35rem .15rem .75rem;margin:.15rem 0 1rem;scrollbar-width:thin}
.discovery-tab{display:inline-flex;align-items:center;gap:.55rem;flex:0 0 auto;padding:.72rem .9rem;border:1px solid #d6e2ee;border-radius:12px;background:#fff;color:#365069;font:inherit;font-weight:700;cursor:pointer;transition:border-color .15s ease,background .15s ease,color .15s ease,box-shadow .15s ease}
.discovery-tab:hover,.discovery-tab:focus-visible{border-color:#8eb4ec;box-shadow:0 5px 14px rgba(30,74,126,.08);outline:none}
.discovery-tab strong{display:grid;place-items:center;min-width:26px;height:26px;padding:0 .42rem;border-radius:999px;background:#edf3fa;color:#365069;font-size:.82rem}
.discovery-tab.is-active{border-color:#236ee8;background:#236ee8;color:#fff;box-shadow:0 7px 18px rgba(35,110,232,.2)}
.discovery-tab.is-active strong{background:rgba(255,255,255,.2);color:#fff}
.discovery-tab-panel{display:none}
.discovery-tab-panel.is-active{display:grid;gap:.9rem}
.discovery-tab-panels{min-width:0}
.discovery-list-actions{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap;margin-top:.85rem}
.discovery-list-actions>span{margin-left:auto;color:#607488;font-weight:700}
.discovery-list-actions .is-hidden{display:none!important}
@media(max-width:640px){.discovery-tab{padding:.62rem .72rem;border-radius:10px}.discovery-list-actions{align-items:stretch}.discovery-list-actions .button{flex:1 1 100%}.discovery-list-actions>span{margin-left:0;width:100%;text-align:center}}

/* === Charte StagePilot : bleu du menu comme couleur d'action principale === */
:root{--primary:#1d2f40;--primary-strong:#172637;--primary-soft:#e9eef3}
.button:not(.button--secondary):not(.button--danger),button.button:not(.button--secondary):not(.button--danger){background:var(--sidebar);border-color:var(--sidebar);color:#fff}
.button:not(.button--secondary):not(.button--danger):hover,.button:not(.button--secondary):not(.button--danger):focus-visible{background:var(--sidebar-strong);border-color:var(--sidebar-strong)}
.discovery-tab.is-active{background:var(--sidebar);border-color:var(--sidebar);color:#fff}
.student-discovery-hero--refined{background:linear-gradient(135deg,var(--sidebar-strong) 0%,var(--sidebar) 68%,#304b63 100%)}
.naf-reference-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:1.2rem;align-items:center;padding:1.4rem;margin-bottom:1rem;border-radius:16px;background:linear-gradient(135deg,#edf2f6,#f8fafc);border:1px solid #d6e0e9}
.naf-reference-hero h2{margin:.2rem 0 .45rem;color:var(--sidebar)}
.naf-reference-hero p{margin:0;max-width:820px;color:#53687b}
.naf-reference-hero__eyebrow{font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#c87816;font-size:.82rem}
@media(max-width:760px){.naf-reference-hero{grid-template-columns:1fr}.naf-reference-hero .button{width:100%}}

/* Référentiel NAF : codes inconnus et libellés longs */
.naf-unknown-panel{border-left:4px solid #d78a16}.naf-unknown-panel .panel-heading{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.naf-unknown-panel h2{margin-top:0}.naf-unknown-panel td:nth-child(2){max-width:760px;line-height:1.45}.enterprise-card dd a,.data-table td strong{overflow-wrap:anywhere}@media(max-width:720px){.naf-unknown-panel .panel-heading{flex-direction:column}.naf-unknown-panel .data-table{min-width:680px}}

/* === Annuaire entreprises : lisibilité NAF et statuts prudents === */
.enterprise-grid{grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:16px}
.enterprise-card{min-width:0;align-content:start}
.enterprise-card__facts{grid-template-columns:repeat(3,minmax(96px,1fr))}
.enterprise-card__facts>div:last-child{grid-column:1/-1}
.enterprise-card__facts dd{min-width:0;overflow-wrap:normal;word-break:normal}
.enterprise-naf{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.35rem;text-decoration:none;min-width:0;color:inherit}
.enterprise-naf strong{white-space:nowrap;color:var(--primary)}
.enterprise-naf span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.35;font-weight:700;word-break:normal;overflow-wrap:break-word}
.enterprise-naf--detail span{-webkit-line-clamp:3}
.enterprise-status{position:relative;cursor:help;white-space:nowrap}
.enterprise-status::after{content:attr(data-tooltip);position:absolute;z-index:120;right:0;bottom:calc(100% + 9px);width:min(340px,82vw);padding:.7rem .8rem;border-radius:10px;background:#183047;color:#fff;font-size:.82rem;font-weight:500;line-height:1.45;box-shadow:0 10px 24px rgba(0,0,0,.22);opacity:0;visibility:hidden;pointer-events:none;white-space:normal}
.enterprise-status:hover::after,.enterprise-status:focus::after{opacity:1;visibility:visible}
.enterprise-status:focus{outline:3px solid rgba(48,116,210,.25)}
.enterprise-card .tag-cloud{align-content:flex-start}
.enterprise-card .tag-cloud span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:1180px){.enterprise-grid{grid-template-columns:repeat(auto-fit,minmax(330px,1fr))}}
@media(max-width:760px){.enterprise-grid{grid-template-columns:1fr}.enterprise-card__facts{grid-template-columns:1fr 1fr}.enterprise-card__facts>div:last-child{grid-column:1/-1}.enterprise-status::after{right:auto;left:0}}
@media(max-width:480px){.enterprise-card__facts{grid-template-columns:1fr}.enterprise-card__facts>div:last-child{grid-column:auto}.enterprise-naf{grid-template-columns:1fr}.enterprise-naf strong{margin-bottom:-.15rem}}

/* === Annuaire entreprises : activité APE/NAF compacte et sans débordement === */
.enterprise-card__facts > div:last-child{
  padding:.65rem .72rem;
  min-height:0;
}
.enterprise-card__facts > div:last-child dt{
  margin-bottom:.28rem;
}
.enterprise-naf{
  grid-template-columns:auto minmax(0,1fr);
  gap:.3rem;
  align-items:baseline;
  max-width:100%;
  min-width:0;
  line-height:1.25;
}
.enterprise-naf strong{
  font-size:.82rem;
  line-height:1.25;
  font-weight:800;
}
.enterprise-naf span{
  min-width:0;
  max-width:100%;
  font-size:.82rem;
  line-height:1.28;
  font-weight:650;
  text-align:left;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  text-overflow:ellipsis;
  overflow-wrap:anywhere;
}
.enterprise-card .tag-cloud{
  min-width:0;
  max-width:100%;
}
.enterprise-card .tag-cloud span{
  display:inline-block;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  vertical-align:top;
}
@media(max-width:480px){
  .enterprise-naf{
    grid-template-columns:auto minmax(0,1fr);
  }
  .enterprise-naf strong{
    margin-bottom:0;
  }
}

/* === Annuaire étudiant : exploration des entreprises absentes de StagePilot === */
.enterprise-discovery-callout{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:1rem;align-items:center;margin:0 0 1rem;padding:1rem 1.1rem;border:1px solid #d7e2ec;border-left:5px solid #d78a16;border-radius:14px;background:linear-gradient(135deg,#fffaf1 0%,#fff 68%);box-shadow:0 7px 18px rgba(29,47,64,.05)}
.enterprise-discovery-callout__icon{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:#d78a16;color:#fff;font-size:1.45rem;font-weight:900}
.enterprise-discovery-callout__eyebrow{display:block;margin-bottom:.18rem;color:#a5620b;font-size:.78rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase}
.enterprise-discovery-callout h2{margin:0 0 .25rem;color:var(--sidebar);font-size:1.18rem}
.enterprise-discovery-callout p{margin:0;color:#53687b;line-height:1.45}
.enterprise-discovery-callout .button{white-space:nowrap}
@media(max-width:900px){.enterprise-discovery-callout{grid-template-columns:auto 1fr}.enterprise-discovery-callout .button{grid-column:1/-1;width:100%}}
@media(max-width:560px){.enterprise-discovery-callout{grid-template-columns:1fr;padding:.9rem}.enterprise-discovery-callout__icon{width:36px;height:36px}.enterprise-discovery-callout h2{font-size:1.05rem}}

/* === Parcours démarches et historique des actions === */
.demarche-coach-card{display:flex;gap:1rem;align-items:flex-start;margin:0 0 1rem;padding:1rem 1.15rem;border:1px solid #c9d8e6;border-radius:16px;background:linear-gradient(135deg,#f7fbff,#f3f8fc)}
.demarche-coach-card__icon{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:50%;background:#1d3c45;color:#fff;font-weight:900}
.demarche-coach-card strong{color:#17324a}.demarche-coach-card p{margin:.25rem 0 0;color:#5b7083;line-height:1.5}
.demarche-tabs{display:flex;gap:.55rem;margin:0 0 1rem;padding:.35rem;border:1px solid #d8e2ec;border-radius:14px;background:#fff;overflow-x:auto;scrollbar-width:thin}
.demarche-tab{display:inline-flex;align-items:center;gap:.45rem;white-space:nowrap;padding:.72rem 1rem;border:0;border-radius:10px;background:transparent;color:#40566b;font-weight:800;cursor:pointer}
.demarche-tab:hover,.demarche-tab:focus-visible{background:#edf3f8;outline:none}.demarche-tab.is-active{background:#1d3c45;color:#fff;box-shadow:0 8px 18px rgba(29,60,69,.18)}
.demarche-tab span{display:grid;place-items:center;min-width:22px;height:22px;padding:0 .35rem;border-radius:999px;background:rgba(255,255,255,.18);font-size:.8rem}
.demarche-tab-panel{animation:demarcheFade .18s ease}.demarche-tab-panel[hidden]{display:none!important}@keyframes demarcheFade{from{opacity:.5;transform:translateY(4px)}to{opacity:1;transform:none}}
.demarche-section-heading{display:flex;align-items:flex-start;gap:.9rem;margin-bottom:1rem}.demarche-section-heading>span{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:12px;background:#1d3c45;color:#fff;font-weight:900}.demarche-section-heading h2{margin:0;color:#17324a}.demarche-section-heading p{margin:.25rem 0 0;color:#607488}
.demarche-section--target{border-top:4px solid #1d3c45}.demarche-section--contact{border-top:4px solid #2d73c5}.demarche-section--next{border-top:4px solid #d58a1f}.demarche-section--validate{border-top:4px solid #2f8f69}.demarche-section--summary{border-top:4px solid #1d3c45}.demarche-section--company{border-top:4px solid #d58a1f}.demarche-section--notes{border-top:4px solid #6d5ca8}
.demarche-panel-actions{display:flex;justify-content:flex-end;gap:.75rem;margin-top:1.1rem;padding-top:1rem;border-top:1px solid #e2e9f0}
.demarche-quality-check{padding:1rem 1.15rem;border-radius:14px;background:#f3f8f5;border:1px solid #c9e2d4;color:#244b39}.demarche-quality-check ul{margin:.55rem 0 0;padding-left:1.25rem}.demarche-quality-check li{margin:.3rem 0}
.company-change-warning{margin-bottom:1rem;padding:1rem 1.1rem;border-left:4px solid #d58a1f;border-radius:10px;background:#fff8e9;color:#634d24}.company-change-warning p{margin:.25rem 0 0}.company-change-confirm{padding:1rem;border:1px solid #efc77e;border-radius:12px;background:#fffaf0}
.demarche-actions-layout{display:grid;grid-template-columns:minmax(320px,.78fr) minmax(0,1.22fr);gap:1rem}.demarche-action-form-panel,.demarche-timeline-panel{border-radius:16px}.demarche-timeline-panel>header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}.demarche-timeline-panel>header h2{margin:0}.demarche-timeline-panel>header p{margin:.2rem 0 0;color:#607488}
.demarche-timeline{position:relative;display:grid;gap:.85rem}.demarche-timeline::before{content:"";position:absolute;left:16px;top:8px;bottom:8px;width:2px;background:#d9e4ee}.demarche-timeline-item{position:relative;display:grid;grid-template-columns:34px minmax(0,1fr);gap:.8rem}.demarche-timeline-item__marker{position:relative;z-index:1;width:14px;height:14px;margin:9px auto 0;border:4px solid #eef4f8;border-radius:50%;background:#1d3c45;box-shadow:0 0 0 2px #1d3c45}.demarche-timeline-item__body{padding:.9rem 1rem;border:1px solid #dce6ef;border-radius:14px;background:#fff}.demarche-timeline-item__head{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem}.demarche-timeline-item__head strong{display:block;color:#17324a}.demarche-timeline-item__head time{display:block;margin-top:.15rem;color:#65798c;font-size:.88rem}.demarche-timeline-item__body>p{margin:.65rem 0;line-height:1.5}.demarche-timeline-item__meta{display:flex;flex-wrap:wrap;gap:.4rem}.demarche-timeline-item__meta span{padding:.28rem .55rem;border-radius:999px;background:#eef4f8;color:#425a70;font-size:.82rem}
@media(max-width:980px){.demarche-actions-layout{grid-template-columns:1fr}.demarche-tabs{position:sticky;top:0;z-index:20;box-shadow:0 6px 16px rgba(20,45,70,.08)}}
@media(max-width:650px){.demarche-coach-card{padding:.85rem}.demarche-tab{padding:.65rem .8rem}.demarche-panel-actions{flex-direction:column-reverse}.demarche-panel-actions .button{width:100%}.demarche-section-heading>span{width:34px;height:34px;flex-basis:34px}.demarche-timeline-item__head{align-items:flex-start}.demarche-timeline-item{grid-template-columns:28px minmax(0,1fr)}.demarche-timeline::before{left:13px}}

/* Démarches : confirmation compacte et proposition d’interlocuteur */
.company-change-confirm{display:flex;align-items:flex-start;gap:.75rem;padding:.9rem 1rem;border:1px solid #efc77e;border-radius:12px;background:#fffaf0;cursor:pointer;font-weight:400}.company-change-confirm input[type=checkbox]{appearance:auto;-webkit-appearance:checkbox;flex:0 0 auto;width:18px!important;height:18px!important;min-width:18px!important;margin:.15rem 0 0;padding:0;accent-color:#173f4a}.company-change-confirm__text{display:grid;gap:.22rem;line-height:1.35}.company-change-confirm__text strong{font-size:.96rem;color:#17324d}.company-change-confirm__text small{display:block;font-size:.83rem;font-weight:400;color:#5d6f80}
.contact-picker-field{display:grid;align-content:start;gap:.45rem}.contact-picker-field label{display:grid;gap:.35rem}.contact-picker-field small{font-size:.78rem;color:#617386}.contact-add-toggle{justify-self:start}.demarche-contact-create-panel{grid-column:1/-1;border-top:4px solid #4f86a6}.demarche-contact-create-panel[hidden]{display:none}.contact-quality-note{margin-top:1rem;padding:.85rem 1rem;border-left:4px solid #4f86a6;border-radius:10px;background:#f2f8fc}.contact-quality-note p{margin:.25rem 0 0;color:#526a7e}.demarche-actions-layout>.demarche-contact-create-panel{order:3}.demarche-actions-layout>.demarche-timeline-panel{order:2}
@media(max-width:700px){.company-change-confirm{gap:.6rem;padding:.8rem}.company-change-confirm__text strong{font-size:.91rem}.contact-add-toggle{width:100%}}


/* ==========================================================
   STAGEPILOT — COCKPIT ÉTUDIANT V1
   Amélioration visuelle ciblée du tableau de bord étudiant.
   ========================================================== */

.student-progress-panel {
    grid-template-columns:
        minmax(250px, .95fr)
        minmax(300px, 1.25fr)
        minmax(220px, .85fr);
    align-items: stretch;
    gap: 16px;
}

.student-progress-panel > article {
    min-width: 0;
    border-radius: 16px;
    border-color: #d8e4ef;
    box-shadow: 0 5px 20px rgba(29, 47, 64, .045);
}

.student-progress-panel > article h2 {
    margin-top: 0;
    color: #1d2f40;
    font-size: 1.3rem;
    letter-spacing: -.02em;
}

/* Carte de progression */

.student-progress-panel .student-progress-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 24px;
    padding: 28px;
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(56, 137, 201, .13),
            transparent 55%
        ),
        linear-gradient(145deg, #f0f7ff, #ffffff 76%);
    border-top: 4px solid #245779;
}

.student-progress-card > div:first-child {
    display: grid;
    gap: 8px;
}

.student-progress-card .metric-card__label {
    color: #536d82;
    font-weight: 700;
    font-size: .91rem;
}

.student-progress-card strong {
    color: #1d3c45;
    font-size: clamp(3rem, 4vw, 4.6rem);
    font-weight: 800;
    letter-spacing: -.06em;
    line-height: 1;
}

.student-progress-card small {
    color: #536d82;
    font-size: .94rem;
}

.student-progress-card .mini-progress {
    width: 100%;
    min-height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #dfe9f2;
}

.student-progress-card .mini-progress i {
    min-height: 12px;
    border-radius: inherit;
    background: linear-gradient(90deg, #245779, #23865e);
}

.student-progress-card > .button {
    width: 100%;
    min-height: 46px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 9px;
    background: #1d2f40;
    border-color: #1d2f40;
    font-weight: 700;
}

.student-progress-card > .button:hover,
.student-progress-card > .button:focus-visible {
    background: #245779;
    border-color: #245779;
}

/* Étapes clés */

.student-progress-panel > article:nth-child(2) {
    padding: 26px;
}

.student-progress-panel .checklist-list {
    gap: 8px;
}

.student-progress-panel .checklist-list li {
    border-radius: 10px;
}

.student-progress-panel .checklist-list li.is-done {
    background: #f1fbf6;
    border-color: #b8e4cc;
}

.student-progress-panel .checklist-list li.is-admin-step {
    background: #fff8ec;
    border-color: #f0d2a1;
}

/* Badges */

.student-progress-panel > article:nth-child(3) {
    padding: 26px;
    background: linear-gradient(160deg, #ffffff, #f5f9fd);
}

.student-progress-panel .badge-grid {
    display: flex;
    align-content: flex-start;
    align-items: flex-start;
    gap: 9px;
    flex-wrap: wrap;
}

.student-progress-panel .student-badge {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px dashed #c4d2e1;
    border-radius: 10px;
    background: #f7f9fc;
    color: #617389;
    font-weight: 700;
    font-size: .84rem;
    line-height: 1.35;
}

.student-progress-panel .student-badge.is-earned {
    border-style: solid;
    border-color: #b8e4cc;
    background: #e9f7ef;
    color: #176c4a;
    box-shadow: 0 3px 9px rgba(35, 134, 94, .07);
}

.student-progress-panel .student-badge.is-earned::before {
    content: "✓";
    display: inline-grid;
    place-items: center;
    width: 19px;
    height: 19px;
    margin-right: 7px;
    flex: 0 0 19px;
    border-radius: 50%;
    background: #23865e;
    color: #ffffff;
    font-size: 11px;
}

/* Adaptation tablette et mobile */

@media (max-width: 1100px) {
    .student-progress-panel {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1.2fr);
    }

    .student-progress-panel > article:nth-child(3) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .student-progress-panel {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .student-progress-panel > article:nth-child(3) {
        grid-column: auto;
    }

    .student-progress-panel .student-progress-card,
    .student-progress-panel > article:nth-child(2),
    .student-progress-panel > article:nth-child(3) {
        padding: 20px;
    }

    .student-progress-card strong {
        font-size: 3.4rem;
    }

    .student-progress-panel .student-badge {
        min-height: 40px;
    }
}

/* FIN STAGEPILOT — COCKPIT ÉTUDIANT V1 */


/* ==========================================================
   STAGEPILOT — COCKPIT ÉTUDIANT V2
   Progression et badges à gauche, étapes clés à droite.
   ========================================================== */

@media (min-width: 1101px) {

    .student-progress-panel {
        display: grid;
        grid-template-columns:
            minmax(280px, .85fr)
            minmax(420px, 1.55fr);
        grid-template-rows: auto auto;
        grid-template-areas:
            "progress steps"
            "badges steps";
        align-items: stretch;
        gap: 14px 18px;
    }

    .student-progress-panel > article:first-child {
        grid-area: progress;
    }

    .student-progress-panel > article:nth-child(2) {
        grid-area: steps;
    }

    .student-progress-panel > article:nth-child(3) {
        grid-area: badges;
    }

    .student-progress-panel .student-progress-card {
        justify-content: flex-start;
        gap: 16px;
        padding: 24px;
    }

    .student-progress-panel > article:nth-child(2) {
        padding: 24px;
    }

    .student-progress-panel > article:nth-child(3) {
        padding: 22px 24px;
    }

    .student-progress-panel > article:nth-child(3) h2 {
        margin-bottom: 14px;
    }
}

/* Une seule colonne lorsque les deux colonnes seraient étroites. */

@media (min-width: 761px) and (max-width: 1100px) {

    .student-progress-panel {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .student-progress-panel > article:nth-child(3) {
        grid-column: auto;
    }

    .student-progress-panel .student-progress-card {
        justify-content: flex-start;
    }
}

/* Sur mobile, conserver l'ordre naturel des trois cartes. */

@media (max-width: 760px) {

    .student-progress-panel {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .student-progress-panel > article {
        min-width: 0;
    }

    .student-progress-panel .student-progress-card {
        justify-content: flex-start;
        gap: 16px;
    }

    .student-progress-panel > article:nth-child(3) {
        grid-column: auto;
    }
}

/* FIN STAGEPILOT — COCKPIT ÉTUDIANT V2 */

/* StagePilot Cockpit V1 — scopes isolés : teacher monitoring and student mission HUD */
.sp-monitor { --sp-ink:#1d3040;--sp-line:#dbe5ef;--sp-muted:#60748b;--sp-blue:#2e78bd;--sp-green:#168e66;--sp-red:#dc5465;--sp-amber:#e3a346;max-width:1700px;margin:0 auto;color:var(--sp-ink); }
.sp-monitor-heading,.sp-student-header{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap;margin-bottom:22px}
.sp-monitor-heading h1,.sp-student-header h1{font-size:clamp(1.65rem,2.6vw,2.4rem);letter-spacing:-.04em;line-height:1.1;margin:6px 0}
.sp-monitor-heading p,.sp-student-header p{color:var(--sp-muted);margin:0}
.sp-eyebrow{font-size:.7rem;font-weight:800;letter-spacing:.14em;color:#397b9b}.sp-live{color:#17896d;letter-spacing:0;text-transform:none;margin-left:12px}
.sp-header-actions{display:flex;gap:8px;flex-wrap:wrap}.sp-header-actions .button{white-space:nowrap}
.sp-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:14px}
.sp-kpi{position:relative;display:flex;flex-direction:column;gap:5px;background:#fff;border:1px solid var(--sp-line);border-radius:11px;padding:17px 14px;text-decoration:none;color:var(--sp-ink);box-shadow:0 4px 12px rgba(28,58,88,.04);transition:transform .18s,box-shadow .18s}
.sp-kpi:hover{transform:translateY(-3px);box-shadow:0 12px 24px rgba(28,58,88,.12)}.sp-kpi:focus-visible{outline:3px solid #4e9ed1}
.sp-kpi small{font-weight:700;color:#38516b;font-size:.84rem;line-height:1.25;margin-top:13px}.sp-kpi strong{font-size:2.1rem;line-height:1.05;letter-spacing:-.045em}.sp-kpi em{font-size:.74rem;color:var(--sp-muted);font-style:normal}
.sp-kpi-icon{position:absolute;right:12px;top:10px;background:#e9f2fd;color:var(--sp-blue);border-radius:9px;min-width:30px;text-align:center;padding:4px;font-weight:900}.sp-kpi--red .sp-kpi-icon{background:#ffe9ec;color:var(--sp-red)}.sp-kpi--amber .sp-kpi-icon{background:#fff1dc;color:#bf8026}.sp-kpi--green .sp-kpi-icon{background:#e2f5ed;color:var(--sp-green)}
.sp-upper-grid,.sp-mid-grid,.sp-lower-grid{display:grid;gap:14px;margin-bottom:14px;grid-template-columns:1.15fr 1fr .9fr;align-items:stretch}.sp-mid-grid{grid-template-columns:1.18fr 1fr}.sp-final-grid{grid-template-columns:1.6fr 1fr}
.sp-panel{background:#fff;border:1px solid var(--sp-line);border-radius:12px;box-shadow:0 4px 14px rgba(21,49,77,.035);padding:18px 19px;min-width:0;scroll-margin-top:20px}.sp-panel-heading{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:7px}.sp-panel h2{font-size:1.04rem;font-weight:800;letter-spacing:-.015em;line-height:1.25;margin:0}.sp-panel-heading>span{color:#7c96ad;font-size:.78rem}.sp-subline{color:var(--sp-muted);font-size:.81rem;margin:3px 0 15px}.sp-donut-layout,.sp-stage-row{display:flex;align-items:center;gap:22px;margin-top:15px}.sp-donut{flex:0 0 154px;width:154px;height:154px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--sp-green) var(--sp-fill),#e5eef6 0)}.sp-donut>div{width:117px;height:117px;background:white;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center}.sp-donut strong{font-size:2rem;line-height:1}.sp-donut small{font-size:.72rem;color:var(--sp-muted);margin-top:7px}
.sp-legend{min-width:0;flex:1}.sp-legend>div{display:flex;align-items:center;gap:8px;border-bottom:1px solid #edf1f6;padding:9px 0;font-size:.8rem}.sp-legend i{width:9px;height:9px;border-radius:50%;flex:none}.sp-legend strong{margin-left:auto;font-size:.9rem}
.sp-priority-list{display:grid;gap:15px;margin-top:22px}.sp-priority{color:var(--sp-ink);text-decoration:none;display:grid;grid-template-columns:minmax(115px,1fr) minmax(60px,1fr) 24px;gap:11px;align-items:center;font-size:.79rem}.sp-priority:hover span:first-child{text-decoration:underline}.sp-priority strong{text-align:right}.sp-priority-track,.sp-promotion-track{height:8px;background:#e7edf5;border-radius:99px;overflow:hidden;display:block}.sp-priority-fill,.sp-promotion-track i{height:100%;border-radius:99px;display:block;background:#569bca}.sp-priority-fill--danger{background:#dc5465}.sp-priority-fill--warning{background:#ef9e34}.sp-priority-fill--primary{background:#2e78bd}
.sp-bars{display:flex;justify-content:space-between;align-items:stretch;gap:6px;height:170px;padding:7px 3px 0;border-bottom:1px solid #d9e4ef}.sp-bar-col{display:flex;flex-direction:column;justify-content:flex-end;align-items:center;flex:1;gap:5px;min-width:0}.sp-bar-col strong{font-size:.72rem;color:#376c9f}.sp-bar-col small{font-size:.68rem;color:var(--sp-muted)}.sp-bar-rail{height:120px;width:72%;min-width:7px;display:flex;align-items:flex-end;background:repeating-linear-gradient(to top,#eff4f9,#eff4f9 1px,transparent 1px,transparent 30px)}.sp-bar-rail i{width:100%;display:block;background:linear-gradient(#71b0ec,#3175ce);border-radius:5px 5px 0 0;min-height:2px}.sp-chart-foot{display:flex;justify-content:space-between;color:var(--sp-muted);font-size:.76rem;margin-top:14px}
.sp-tag{border-radius:6px;padding:3px 7px;display:inline-block;font-size:.68rem;font-weight:800;background:#eaf1fa;color:#386691;white-space:nowrap}.sp-tag--alert{background:#fee8e9;color:#b93241}.sp-tag--warning{background:#fff1d8;color:#a36a13}
.sp-table-scroll{overflow-x:auto}.sp-table{width:100%;border-collapse:collapse;font-size:.77rem}.sp-table th{text-align:left;background:#f1f6fc;color:#48647f;font-size:.7rem;white-space:nowrap}.sp-table th,.sp-table td{padding:10px 8px;border-bottom:1px solid #e9eff5;vertical-align:middle}.sp-table td:first-child{white-space:nowrap}.sp-table .sp-empty-row{text-align:center;padding:25px;color:var(--sp-muted)}.sp-small-button{display:inline-flex;justify-content:center;padding:5px 9px;border-radius:6px;border:1px solid #a6bfd7;color:#245c9c;text-decoration:none;font-weight:700;font-size:.72rem;white-space:nowrap}.sp-small-button:hover{background:#eaf4ff}.sp-panel-link{display:inline-block;font-weight:700;font-size:.78rem;margin-top:14px}
.sp-monitor-list{list-style:none;padding:0;margin:12px 0 0}.sp-monitor-list li{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #edf1f6;padding:10px 0;font-size:.8rem}.sp-monitor-list li:last-child{border-bottom:0}.sp-monitor-list li strong,.sp-monitor-list li small{display:block}.sp-monitor-list li small{font-size:.72rem;color:var(--sp-muted);margin-top:4px}.sp-mini-donut{flex:none;width:115px;height:115px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#169b6a var(--sp-fill),#e5edf5 0)}.sp-mini-donut strong{background:white;border-radius:50%;width:83px;height:83px;display:grid;place-items:center;font-size:1.8rem}.sp-promotion{border-top:1px solid #edf1f6;padding:14px 0}.sp-promotion>div:first-child{display:flex;justify-content:space-between;gap:5px;font-size:.8rem}.sp-promotion>div:first-child span,.sp-promotion small{color:var(--sp-muted);font-size:.75rem}.sp-promotion-track{margin:10px 0}.sp-promotion-track i{background:linear-gradient(90deg,#168e66,#529dd4)}.sp-workflow{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-top:15px}.sp-workflow a{display:flex;flex-direction:column;gap:7px;background:#f1f7fd;border:1px solid #c9dcf1;padding:13px 10px;border-radius:9px;color:#1e3d5d;text-decoration:none;min-height:140px}.sp-workflow a:nth-child(3){background:#eff9f3;border-color:#bee0cd}.sp-workflow a:nth-child(5){background:#f8f3fe;border-color:#decaf6}.sp-workflow a:hover{transform:translateY(-2px);box-shadow:0 6px 14px #1b467a15}.sp-workflow b{color:#2e78bd;font-size:1.2rem}.sp-workflow strong{font-size:.82rem;line-height:1.3}.sp-workflow small{font-size:.72rem;color:var(--sp-muted)}.sp-timeline{max-height:280px;overflow-y:auto}.sp-timeline li{justify-content:flex-start;align-items:flex-start}.sp-timeline time{font-size:.72rem;color:#2e78bd;font-weight:800;min-width:72px}.sp-scope{margin-bottom:22px}.sp-scope p{margin:7px 0 0;color:var(--sp-muted);font-size:.85rem}.sp-empty{padding:28px}
/* Student cockpit — professional monitoring aesthetic with game-like missions */
.sp-student-monitor{max-width:1700px;margin:0 auto}.sp-student-header{background:linear-gradient(120deg,#1d3040,#234e69);border-radius:12px;padding:24px;color:#fff;margin-bottom:13px}.sp-student-header h1{color:#fff}.sp-student-header p{color:#cadee9}.sp-student-header .sp-eyebrow{color:#72d9c5}.sp-student-hud{display:grid;grid-template-columns:1fr 1fr 1.3fr;gap:11px;margin-bottom:15px}.sp-student-hud>div{background:#fff;border:1px solid #cce0f1;border-top:3px solid #2c8abb;border-radius:9px;padding:13px 17px;display:flex;flex-direction:column;gap:3px}.sp-student-hud small{font-size:.68rem;letter-spacing:.07em;font-weight:800;color:#587e98}.sp-student-hud strong{font-size:1.55rem;color:#18465e}.sp-student-hud span,.sp-student-hud a{font-size:.77rem}.sp-student-monitor .student-progress-card{border-top:4px solid #15a77f}.sp-student-monitor .weekly-plan{border-top:3px solid #2c8abb}.sp-student-monitor .student-discovery-panel{box-shadow:0 12px 30px #1778b414}
@media(max-width:1350px){.sp-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.sp-upper-grid{grid-template-columns:1fr 1fr}.sp-upper-grid>.sp-panel:last-child{grid-column:1/-1}.sp-lower-grid{grid-template-columns:1fr 1fr}.sp-lower-grid>.sp-panel:last-child{grid-column:1/-1}.sp-final-grid{grid-template-columns:1fr}.sp-workflow{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:850px){.sp-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.sp-upper-grid,.sp-mid-grid,.sp-lower-grid{grid-template-columns:minmax(0,1fr)}.sp-upper-grid>.sp-panel:last-child,.sp-lower-grid>.sp-panel:last-child{grid-column:auto}.sp-workflow{grid-template-columns:repeat(2,minmax(0,1fr))}.sp-student-hud{grid-template-columns:1fr}.sp-donut-layout{flex-wrap:wrap}}
@media(max-width:480px){.sp-kpis{grid-template-columns:1fr 1fr;gap:8px}.sp-kpi{padding:11px}.sp-kpi small{margin-top:16px}.sp-kpi strong{font-size:1.65rem}.sp-panel{padding:13px}.sp-priority{grid-template-columns:minmax(100px,1fr) minmax(35px,1fr) 18px;gap:6px}.sp-workflow{grid-template-columns:1fr 1fr}}
