/* NeoLearn Review — styles */
:root {
  --nlr-bg:           #f5f6fa;
  --nlr-card:         #fff;
  --nlr-border:       #dde1e7;
  --nlr-primary:      #00478d;
  --nlr-primary-light:#eff3fb;
  --nlr-danger:       #950014;
  --nlr-ok:           #006c49;
  --nlr-text:         #0b1c30;
  --nlr-muted:        #6b7280;
  --nlr-pending:      #6b7280;
  --nlr-validated:    #006c49;
  --nlr-rejected:     #950014;
  --nlr-sidebar-w:    230px;
}

/* ── Gate (login / name) ──────────────────────────────────────────────────── */
.nlr-gate {
  display: flex; align-items: center; justify-content: center;
  min-height: 60vh; padding: 24px;
}
.nlr-gate-box {
  background: var(--nlr-card); border: 1px solid var(--nlr-border);
  border-radius: 12px; padding: 36px 32px; max-width: 420px; width: 100%;
  box-shadow: 0 4px 24px #0001;
}
.nlr-gate-box h2 { font-size: 1.2rem; margin-bottom: 8px; color: var(--nlr-text); }
.nlr-gate-box p  { color: var(--nlr-muted); font-size: .9rem; margin-bottom: 20px; }
.nlr-gate-box label { display: block; font-size: .85rem; font-weight: 600;
  color: var(--nlr-muted); margin-bottom: 6px; margin-top: 14px; }
.nlr-gate-box input[type=text],
.nlr-gate-box input[type=password] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--nlr-border);
  border-radius: 8px; font: inherit; font-size: .95rem;
}
.nlr-gate-box input:focus { outline: 2px solid var(--nlr-primary); border-color: transparent; }
.nlr-error   { color: var(--nlr-danger);  font-size: .85rem; margin: 8px 0; }
.nlr-success { color: var(--nlr-ok);      font-size: .85rem; margin: 8px 0; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
button, .nlr-btn-primary, .nlr-btn-outline, .nlr-btn-danger {
  cursor: pointer; border: none; border-radius: 8px;
  padding: 9px 18px; font: inherit; font-size: .9rem; font-weight: 600;
}
.nlr-btn-primary { background: var(--nlr-primary); color: #fff; margin-top: 16px; }
.nlr-btn-outline { background: #fff; color: var(--nlr-primary);
  border: 1.5px solid var(--nlr-primary); }
.nlr-btn-danger  { background: var(--nlr-danger); color: #fff; }
button:hover { opacity: .85; }

/* ── Admin panel ──────────────────────────────────────────────────────────── */
.nlr-admin-panel {
  background: #fffbeb; border: 1px solid #f0d070; border-radius: 10px;
  padding: 14px 20px; margin-bottom: 24px; font-size: .9rem;
}
.nlr-admin-panel summary { cursor: pointer; font-weight: 600; color: var(--nlr-primary); }
.nlr-admin-sections { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 16px; }
.nlr-admin-sections section { flex: 1; min-width: 220px; }
.nlr-admin-sections h3 { font-size: .9rem; margin-bottom: 10px; color: var(--nlr-text); }
.nlr-admin-sections input[type=file],
.nlr-admin-sections input[type=password] {
  display: block; margin-bottom: 8px; font: inherit; font-size: .85rem;
  border: 1px solid var(--nlr-border); border-radius: 6px; padding: 6px 10px; width: 100%;
}
.nlr-admin-danger {
  border-top: 1px solid #fca5a5; padding-top: 16px; margin-top: 8px;
  flex-basis: 100%;
}
.nlr-admin-danger h3 { color: var(--nlr-danger) !important; }
.nlr-admin-danger p { color: #6b1c1c; font-size: .85rem; margin-bottom: 12px; }

/* ── App layout ───────────────────────────────────────────────────────────── */
#neolearn-review-app {
  display: flex; min-height: 80vh; font-family: system-ui, sans-serif;
  color: var(--nlr-text); background: var(--nlr-bg);
}
#nlr-sidebar {
  width: var(--nlr-sidebar-w); flex-shrink: 0;
  background: var(--nlr-card); border-right: 1px solid var(--nlr-border);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; z-index: 10;
}
#nlr-sidebar-header { padding: 12px 14px 10px; border-bottom: 1px solid var(--nlr-border); }
.nlr-back-link {
  display: inline-block; font-size: .78rem; color: var(--nlr-muted); text-decoration: none;
  margin-bottom: 8px; padding: 3px 0;
}
.nlr-back-link:hover { color: var(--nlr-primary); }
.nlr-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  background: var(--nlr-primary); color: #fff; text-decoration: none;
  border-radius: 8px; font-size: .9rem; font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: background .15s, box-shadow .15s;
}
#nlr-back-btn-above {
  text-align: center; margin-bottom: 16px;
}
.nlr-back-btn:hover { opacity: .88; box-shadow: 0 4px 14px rgba(0,0,0,.18); color: #fff; }
#nlr-sidebar-title  { font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--nlr-muted); margin-bottom: 4px; }
#nlr-sidebar-label  { font-size: .85rem; font-weight: 600; color: var(--nlr-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nlr-nav-summary { font-style: italic; }

#nlr-sidebar-search { padding: 8px 12px; border-bottom: 1px solid var(--nlr-border); }
#nlr-sidebar-search input {
  width: 100%; padding: 6px 10px; border: 1px solid var(--nlr-border);
  border-radius: 6px; font: inherit; font-size: .82rem;
}
#nlr-nav-list { flex: 1; overflow-y: auto; padding: 6px 0; }

.nlr-nav-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 14px;
  cursor: pointer; font-size: .82rem; color: var(--nlr-muted);
  border-left: 3px solid transparent; transition: background .1s, border-color .1s;
  text-decoration: none;
}
.nlr-nav-item:hover { background: var(--nlr-bg); color: var(--nlr-text); }
.nlr-nav-item.active {
  border-left-color: var(--nlr-primary); background: var(--nlr-primary-light);
  color: var(--nlr-primary); font-weight: 600;
}
.nlr-nav-num   { font-size: .7rem; font-weight: 700; min-width: 22px;
  text-align: right; opacity: .55; }
.nlr-nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nlr-nav-dot   { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.nlr-nav-state { font-size: .75rem; }

#nlr-sidebar-footer {
  padding: 10px 14px; border-top: 1px solid var(--nlr-border);
  font-size: .78rem; color: var(--nlr-muted); display: flex; flex-direction: column; gap: 6px;
}
#nlr-sidebar-footer a, #nlr-sidebar-footer button {
  font-size: .8rem; padding: 6px 10px; width: 100%;
  background: var(--nlr-bg); border: 1px solid var(--nlr-border);
  border-radius: 6px; color: var(--nlr-text); text-align: left; text-decoration: none; display: block;
}

/* ── Main area ────────────────────────────────────────────────────────────── */
#nlr-main { flex: 1; padding: 28px 32px; overflow-y: auto; }

/* ── Index page ───────────────────────────────────────────────────────────── */
#nlr-index-header { margin-bottom: 32px; }
#nlr-index-header h1 { font-size: 1.5rem; margin-bottom: 4px; }
.nlr-index-sub { color: var(--nlr-muted); font-size: .9rem; margin-top: 4px; }

/* Global KPI strip */
#nlr-index-kpi { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
#nlr-index-kpi .nlr-kpi-card { min-width: 100px; }

/* Session sections */
.nlr-session-group {
  margin-bottom: 6px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--nlr-border);
  transition: box-shadow .2s;
}
.nlr-session-group:has(.nlr-session-title[aria-expanded="true"]) {
  border-color: var(--nlr-primary);
  box-shadow: 0 2px 12px #00478d22;
}
.nlr-session-title {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  font-size: 1rem; font-weight: 700;
  color: var(--nlr-text); background: #fff; border: none;
  border-left: 5px solid transparent;
  padding: 14px 16px; cursor: pointer; text-align: left;
  font-family: inherit;
  transition: color .2s, background .2s, border-color .2s;
}
.nlr-session-title:hover {
  background: #dce8f7;
  color: var(--nlr-primary);
  border-left-color: #80aad4;
}
.nlr-session-title[aria-expanded="true"] {
  color: #fff;
  background: var(--nlr-primary);
  border-left-color: #002f60;
}
.nlr-session-title::after {
  content: '›'; font-size: 1.4rem; line-height: 1; flex-shrink: 0;
  transform: rotate(90deg); transition: transform .3s cubic-bezier(.4,0,.2,1); display: inline-block;
}
.nlr-session-title[aria-expanded="true"]::after {
  transform: rotate(-90deg);
  filter: brightness(2);
}
.nlr-session-name { flex: 1; }
.nlr-session-summary {
  font-size: .75rem; font-weight: 400; font-style: italic;
  color: #6b7f99;
  padding-right: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nlr-session-title[aria-expanded="true"] .nlr-session-summary {
  color: rgba(255,255,255,.75);
}
.nlr-session-summary--alert {
  font-weight: 600; font-style: normal;
  color: #c47a00;
}
.nlr-session-title[aria-expanded="true"] .nlr-session-summary--alert {
  color: #ffd166;
}
.nlr-session-body {
  overflow: hidden;
  background: #fff;
  /* transition set by JS to allow different open/close durations */
}
.nlr-session-body-inner {
  padding: 16px 16px 24px;
}

/* Group (QCM / Cas cliniques within a session) */
.nlr-group { margin-bottom: 24px; }
.nlr-group-header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.nlr-group-name {
  font-size: .82rem; font-weight: 700; color: var(--nlr-muted);
  text-transform: uppercase; letter-spacing: .06em;
}
.nlr-group-meta { font-size: .75rem; color: var(--nlr-muted); }

/* Cards grid */
.nlr-quiz-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.nlr-quiz-card {
  background: var(--nlr-card); border: 1px solid var(--nlr-border);
  border-radius: 10px; padding: 16px 18px; cursor: pointer;
  text-decoration: none; color: inherit; transition: box-shadow .15s, border-color .15s; display: block;
}
.nlr-quiz-card:hover { box-shadow: 0 4px 16px #0001; border-color: var(--nlr-primary); }
.nlr-quiz-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.nlr-quiz-card-title { font-weight: 600; font-size: .9rem; line-height: 1.4; margin-bottom: 10px; color: var(--nlr-text); }
.nlr-q-count { font-size: .75rem; color: var(--nlr-muted); }

/* Format badges */
.nlr-fmt-badge {
  font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; white-space: nowrap;
}
.nlr-fmt-cases { background: var(--nlr-primary); color: #fff; }
.nlr-fmt-qcm   { background: var(--nlr-muted);   color: #fff; }
.nlr-progress-bar    { height: 6px; border-radius: 3px; background: var(--nlr-border); overflow: hidden; }
.nlr-progress-bar-inner { height: 100%; display: flex; }
.nlr-bar-validated { background: var(--nlr-validated); }
.nlr-bar-rejected  { background: var(--nlr-rejected); }
.nlr-bar-pending   { background: var(--nlr-border); }
.nlr-progress-counts { display: flex; gap: 12px; margin-top: 6px; font-size: .75rem; }
.nlr-count-validated { color: var(--nlr-validated); }
.nlr-count-rejected  { color: var(--nlr-rejected); }
.nlr-count-pending   { color: var(--nlr-muted); }

/* ── KPI dashboard ────────────────────────────────────────────────────────── */
#nlr-kpi { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.nlr-kpi-row-separator { flex-basis: 100%; height: 0; }
.nlr-periode-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; width: 100%; }
.nlr-periode-pill { font-size: .82em; }
.nlr-pill-count { display: inline-block; background: rgba(0,0,0,.1); border-radius: 10px; padding: 0 6px; font-size: .9em; margin-left: 4px; }
.nlr-periode-pill.active .nlr-pill-count { background: rgba(255,255,255,.25); }
.nlr-kpi-card {
  background: var(--nlr-card); border: 1px solid var(--nlr-border);
  border-radius: 8px; padding: 14px 18px; min-width: 120px;
}
.nlr-kpi-value { font-size: 1.6rem; font-weight: 700; color: var(--nlr-primary); }
.nlr-kpi-label { font-size: .75rem; color: var(--nlr-muted); margin-top: 2px; }

/* ── Filter bar ───────────────────────────────────────────────────────────── */
#nlr-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.nlr-filter-label { font-size: .78em; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--nlr-muted, #5a7591); white-space: nowrap; }
.nlr-filter-btn {
  padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--nlr-border);
  background: var(--nlr-card); font-size: .82rem; cursor: pointer; color: var(--nlr-muted);
}
.nlr-filter-btn.active { border-color: var(--nlr-primary); background: var(--nlr-primary-light);
  color: var(--nlr-primary); font-weight: 600; }
.nlr-validate-all-btn {
  margin-left: auto;
  padding: 6px 16px; border-radius: 20px; border: 1.5px solid var(--nlr-ok);
  background: #f0faf5; color: var(--nlr-ok); font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.nlr-validate-all-btn:hover { background: #d1fae5; }
.nlr-validate-all-btn:disabled { opacity: .5; cursor: default; }

/* ── Question cards ───────────────────────────────────────────────────────── */
.nlr-q-card {
  background: var(--nlr-card); border: 1px solid var(--nlr-border);
  border-radius: 10px; margin-bottom: 14px; overflow: hidden;
  transition: opacity .15s, box-shadow .15s;
}
/* When any card is expanded, dim the others */
#nlr-questions:has(.nlr-q-card.expanded) .nlr-q-card:not(.expanded) {
  opacity: .45;
}
#nlr-questions:has(.nlr-q-card.expanded) .nlr-q-card:not(.expanded):hover {
  opacity: .8;
}
.nlr-q-card.expanded {
  box-shadow: 0 4px 24px #00478d22;
  border-color: var(--nlr-primary);
  opacity: 1 !important;
}
.nlr-q-card-header {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  cursor: pointer; user-select: none; overflow: hidden;
}
.nlr-q-card-header:hover { background: var(--nlr-bg); }
.nlr-q-num   { font-size: .75rem; font-weight: 700; color: var(--nlr-muted); min-width: 26px; flex-shrink: 0; }
.nlr-q-excerpt { flex: 1; min-width: 0; font-size: .88rem; color: var(--nlr-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nlr-q-badges { display: flex; gap: 6px; align-items: center; flex-shrink: 0; flex-wrap: nowrap; }
.nlr-badge { white-space: nowrap; }
.nlr-badge {
  font-size: .7rem; padding: 2px 8px; border-radius: 20px; font-weight: 600;
  background: var(--nlr-bg); color: var(--nlr-muted); border: 1px solid var(--nlr-border);
}
.nlr-badge-easy         { background: #ecfdf5; color: #065f46; border-color: #6ee7b7; }
.nlr-badge-intermediate { background: #eff6ff; color: #1e40af; border-color: #93c5fd; }
.nlr-badge-difficult    { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.nlr-badge-verydifficult{ background: #fef2f2; color: #991b1b; border-color: #fca5a5; }
.nlr-badge-session      { background: #f5f3ff; color: #5b21b6; border-color: #c4b5fd; font-size: .78rem; padding: 3px 10px; }
.nlr-kpi-session        { align-items: center; justify-content: center; }

.nlr-state-icon { font-size: 1rem; flex-shrink: 0; }
.nlr-state-pending   .nlr-state-icon::before { content: '·'; color: var(--nlr-muted); font-size: 1.4rem; }
.nlr-state-validated .nlr-state-icon::before { content: '✓'; color: var(--nlr-validated); }
.nlr-state-rejected  .nlr-state-icon::before { content: '✗'; color: var(--nlr-rejected); }

/* ── Type badge (QCU / QCM) ───────────────────────────────────────────────── */
.nlr-type-badge {
  font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 4px;
  letter-spacing: .04em; white-space: nowrap; flex-shrink: 0;
}
.nlr-type-qcu { background: #f0f4ff; color: #3451b2; border: 1px solid #c3cef6; }
.nlr-type-qcm { background: #fdf4ff; color: #7c3aed; border: 1px solid #ddd6fe; }

/* ── Correct answer badges (collapsed row) ────────────────────────────────── */
.nlr-correct-badge {
  font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 4px;
  background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; white-space: nowrap;
}
.nlr-correct-none {
  background: #fef2f2; color: var(--nlr-danger); border-color: #fca5a5; cursor: default;
}

/* ── Type row (QCU/QCM radios inside card body) ───────────────────────────── */
.nlr-type-row {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 10px 0 4px; border-bottom: 1px solid var(--nlr-border); margin-bottom: 4px;
}
.nlr-type-radio { font-size: .88rem; color: var(--nlr-text); cursor: pointer; display: flex; align-items: center; gap: 5px; }
.nlr-type-radio input { cursor: pointer; }

/* ── No-correct warning ───────────────────────────────────────────────────── */
.nlr-no-correct-warn {
  color: var(--nlr-danger); font-weight: 700; font-size: .78rem; margin-left: 6px;
}

/* ── Expanded card body ───────────────────────────────────────────────────── */
.nlr-q-body { padding: 0 18px 18px; display: none; }
.nlr-q-card.expanded .nlr-q-body { display: block; }
.nlr-q-card.expanded .nlr-q-card-header { border-bottom: 1px solid var(--nlr-border); }

#nlr-vignette-wrap {
  background: var(--nlr-primary-light); border-left: 3px solid var(--nlr-primary);
  border-radius: 0 8px 8px 0; margin: 0 0 20px; padding: 14px 16px;
}
#nlr-vignette-wrap textarea {
  width: 100%; border: 1px solid var(--nlr-border); border-radius: 8px;
  padding: 10px 12px; font: inherit; font-size: .9rem; resize: vertical;
  min-height: 80px; margin-top: 8px; background: #fff;
}
#nlr-vignette-wrap textarea:focus { outline: 2px solid var(--nlr-primary); border-color: transparent; }
.nlr-vignette-header { display: flex; align-items: center; gap: 12px; }

.nlr-field-label {
  font-size: .78rem; font-weight: 600; color: var(--nlr-muted);
  text-transform: uppercase; letter-spacing: .05em;
  margin-top: 14px; margin-bottom: 6px; display: block;
}
.nlr-q-body textarea {
  width: 100%; border: 1px solid var(--nlr-border); border-radius: 8px;
  padding: 10px 12px; font: inherit; font-size: .9rem; resize: vertical; min-height: 80px;
}
.nlr-q-body textarea:focus { outline: 2px solid var(--nlr-primary); border-color: transparent; }

/* ── Options list ─────────────────────────────────────────────────────────── */
.nlr-options-list { margin-top: 6px; }
.nlr-option-row {
  display: grid; grid-template-columns: 28px 1fr 34px 28px;
  gap: 8px; align-items: center; margin-bottom: 8px;
}
.nlr-opt-id { font-weight: 700; text-align: center; color: var(--nlr-muted); font-size: .85rem; }
.nlr-opt-correct {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--nlr-border); display: flex; align-items: center;
  justify-content: center; cursor: pointer; font-size: .9rem;
  user-select: none; border: none; flex-shrink: 0;
}
.nlr-opt-correct.active { background: var(--nlr-ok); color: #fff; }
.nlr-opt-del {
  background: none; border: none; color: var(--nlr-danger);
  font-size: 1rem; cursor: pointer; padding: 0; line-height: 1;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; flex-shrink: 0;
}
.nlr-opt-del:hover { background: #fef2f2; }
.nlr-add-opt {
  background: none; border: 1.5px dashed var(--nlr-border); border-radius: 6px;
  color: var(--nlr-muted); width: 100%; padding: 6px; cursor: pointer;
  font-size: .82rem; margin-top: 4px;
}
.nlr-add-opt:hover { border-color: var(--nlr-primary); color: var(--nlr-primary); background: var(--nlr-primary-light); }

/* ── Rationale ────────────────────────────────────────────────────────────── */
.nlr-rationale {
  background: #f0faf5; border-left: 3px solid var(--nlr-ok);
  padding: 10px 14px; border-radius: 0 8px 8px 0; margin-top: 8px;
}

/* ── Validation buttons ───────────────────────────────────────────────────── */
.nlr-val-row {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--nlr-border);
  align-items: center;
}
.nlr-val-btn {
  padding: 7px 16px; border-radius: 8px; border: 1.5px solid var(--nlr-border);
  background: var(--nlr-card); font: inherit; font-size: .85rem; cursor: pointer;
  color: var(--nlr-muted); font-weight: 600;
}
.nlr-val-btn.active-pending   { border-color: var(--nlr-muted);    color: var(--nlr-muted); background: var(--nlr-bg); }
.nlr-val-btn.active-validated { border-color: var(--nlr-validated); color: var(--nlr-validated); background: #ecfdf5; }
.nlr-val-btn.active-rejected  { border-color: var(--nlr-rejected);  color: var(--nlr-rejected); background: #fef2f2; }
.nlr-save-status { font-size: .78rem; color: var(--nlr-muted); margin-right: auto; }

/* ── Last action mention ──────────────────────────────────────────────────── */
.nlr-last-action {
  font-size: .78rem; color: var(--nlr-muted); margin-top: 14px;
  padding: 6px 10px; background: var(--nlr-bg); border-radius: 6px;
  border-left: 3px solid var(--nlr-border);
}
.nlr-save-status.saving  { color: var(--nlr-primary); }
.nlr-save-status.saved   { color: var(--nlr-ok); }
.nlr-save-status.error   { color: var(--nlr-danger); }

/* ── Diff colors for option types ─────────────────────────────────────────── */
.nlr-diff-easy         { background-color: #06b96c; }
.nlr-diff-intermediate { background-color: #3b82f6; }
.nlr-diff-difficult    { background-color: #f97316; }
.nlr-diff-verydifficult{ background-color: #ef4444; }

/* ── Loading / empty states ───────────────────────────────────────────────── */
#neolearn-loading { padding: 60px; text-align: center; color: var(--nlr-muted); }
.nlr-empty { padding: 40px; text-align: center; color: var(--nlr-muted); font-size: .95rem; }

/* ── Admin: back-label preview ────────────────────────────────────────────── */
.nlr-back-label-preview { margin-bottom: 10px; }
.nlr-back-label-preview .nlr-back-btn { pointer-events: none; }
.nlr-muted-note { font-size: .85rem; color: var(--nlr-muted); font-style: italic; }

/* ── WYSIWYG dialog ───────────────────────────────────────────────────────── */
.nlr-wysiwyg-dlg { border: none; border-radius: 14px; padding: 0; max-width: 520px; width: 94%;
  box-shadow: 0 8px 48px rgba(0,0,0,.22); }
.nlr-wysiwyg-dlg::backdrop { background: rgba(0,0,0,.45); }
.nlr-wysiwyg-inner { display: flex; flex-direction: column; }
.nlr-wysiwyg-header { display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px; border-bottom: 1px solid var(--nlr-border);
  font-weight: 600; font-size: .95rem; color: var(--nlr-text); }
.nlr-wysiwyg-close { background: none; border: none; cursor: pointer; font-size: 1rem;
  color: var(--nlr-muted); padding: 4px 6px; border-radius: 6px; }
.nlr-wysiwyg-close:hover { background: var(--nlr-bg); color: var(--nlr-text); }
.nlr-wysiwyg-toolbar { display: flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-bottom: 1px solid var(--nlr-border); background: var(--nlr-bg); }
.nlr-wy-btn { background: none; border: 1px solid transparent; border-radius: 5px;
  padding: 4px 9px; cursor: pointer; font-size: .85rem; color: var(--nlr-text); }
.nlr-wy-btn:hover { background: #fff; border-color: var(--nlr-border); }
.nlr-wy-sep { width: 1px; background: var(--nlr-border); height: 20px; margin: 0 4px; }
.nlr-wysiwyg-editor { min-height: 80px; max-height: 200px; overflow-y: auto;
  padding: 14px 16px; outline: none; font-size: .95rem; line-height: 1.55;
  color: var(--nlr-text); border-bottom: 1px solid var(--nlr-border); }
.nlr-wysiwyg-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  #nlr-sidebar { display: none; }
  #nlr-main { padding: 16px; }
  .nlr-quiz-card { width: 100%; }
}

/* ── Integrity check dialog ──────────────────────────────────────────────── */
.nlr-integrity-dialog {
  border: none; border-radius: 14px; padding: 0;
  width: min(560px, 94vw); max-height: 80vh;
  box-shadow: 0 8px 48px rgba(0,0,0,.22);
  overflow: hidden;
}
.nlr-integrity-dialog[open] {
  display: flex; flex-direction: column;
}
.nlr-integrity-dialog::backdrop { background: rgba(0,0,0,.35); }
.nlr-integrity-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--nlr-border);
  font-weight: 600; font-size: 1rem; color: var(--nlr-text);
}
.nlr-integrity-close {
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; color: var(--nlr-muted); padding: 2px 6px;
  border-radius: 6px; line-height: 1;
}
.nlr-integrity-close:hover { background: var(--nlr-border); }
.nlr-integrity-body {
  flex: 1; overflow-y: auto; padding: 18px 22px;
}
.nlr-integrity-progress { margin-bottom: 14px; }
.nlr-integrity-bar-wrap {
  height: 6px; background: var(--nlr-border); border-radius: 99px; overflow: hidden; margin-bottom: 8px;
}
.nlr-integrity-bar {
  height: 100%; width: 0%; background: var(--nlr-primary);
  border-radius: 99px; transition: width .3s ease;
}
.nlr-integrity-status {
  font-size: .82rem; color: var(--nlr-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nlr-integrity-rows { display: flex; flex-direction: column; gap: 4px; }
.nlr-integrity-row {
  display: grid; grid-template-columns: 1.4rem 1fr auto;
  align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 8px; font-size: .86rem;
}
.nlr-integrity-row--ok  { background: #f0faf5; }
.nlr-integrity-row--error { background: #fff2f3; }
.nlr-integrity-row-icon  { font-size: .95rem; text-align: center; }
.nlr-integrity-row-label { color: var(--nlr-text); font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nlr-integrity-row-detail { color: var(--nlr-muted); font-size: .8rem; white-space: nowrap; }
.nlr-integrity-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid var(--nlr-border);
  gap: 12px;
}
.nlr-integrity-summary { font-size: .88rem; }
.nlr-integrity-ok  { color: var(--nlr-ok); font-weight: 600; }
.nlr-integrity-err { color: var(--nlr-danger); font-weight: 600; }

/* ── QCM Stats dialog ────────────────────────────────────────────────────── */
.nlr-qcm-stats-dialog {
    border: none; border-radius: 14px; padding: 0;
    width: min(1720px, 96vw); max-height: 90vh;
    box-shadow: 0 8px 48px rgba(0,0,0,.22);
    overflow: hidden;
}
.nlr-qcm-stats-dialog[open] { display: flex; flex-direction: column; }
.nlr-qcm-stats-dialog::backdrop { background: rgba(0,0,0,.35); }

.nlr-qcm-stats-body {
    flex: 1; overflow-y: auto; padding: 20px 22px 10px;
}
.nlr-qcm-stats-loading {
    color: var(--nlr-muted); font-size: .88rem; padding: 16px 0;
}
.nlr-qcm-stats-empty {
    color: var(--nlr-muted); font-size: .88rem; margin-top: 12px;
}

/* KPI row */
.nlr-qcm-stats-kpis {
    display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.nlr-qcm-stat-kpi {
    flex: 1; min-width: 80px;
    background: var(--nlr-bg); border: 1px solid var(--nlr-border);
    border-radius: 10px; padding: 12px 14px; text-align: center;
}
.nlr-qcm-stat-kpi .nlr-kpi-value {
    font-size: 1.7rem; font-weight: 700; line-height: 1.1; color: var(--nlr-text);
}
.nlr-qcm-stat-kpi .nlr-kpi-label {
    font-size: .72rem; color: var(--nlr-muted); text-transform: uppercase;
    letter-spacing: .06em; margin-top: 2px;
}
.nlr-qcm-stat-kpi--ok    .nlr-kpi-value { color: var(--nlr-ok); }
.nlr-qcm-stat-kpi--pending .nlr-kpi-value { color: var(--nlr-muted); }
.nlr-qcm-stat-kpi--rej   .nlr-kpi-value { color: var(--nlr-danger); }

/* Global progress bar */
.nlr-qcm-stats-global-bar {
    display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
}
.nlr-qcm-stats-global-bar .nlr-progress-bar { flex: 1; height: 8px; }
.nlr-qcm-stats-pct {
    font-size: .82rem; color: var(--nlr-ok); font-weight: 600; white-space: nowrap;
}

/* Bar charts */
.nlr-qcm-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.nlr-chart-card {
    background: var(--nlr-bg);
    border: 1px solid var(--nlr-border);
    border-radius: 10px;
    padding: 10px 12px 6px;
    min-width: 0;
}
.nlr-chart-title {
    font-size: .75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    margin-bottom: 6px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
    display: flex; align-items: center; gap: 6px;
}
.nlr-chart-title-total {
    font-size: .8rem; font-weight: 800;
    border-radius: 20px; padding: 1px 7px;
    flex-shrink: 0;
}
.nlr-chart-svg {
    display: block; width: 100%; height: auto;
    overflow: visible;
}

/* Sessions */
.nlr-qcm-stats-sessions { display: flex; flex-direction: column; gap: 8px; }

.nlr-qcm-stats-session {
    border: 1px solid var(--nlr-border); border-radius: 9px; overflow: hidden;
}
.nlr-qcm-stats-session[open] { border-color: var(--nlr-primary); }

.nlr-qcm-stats-session-hd {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; cursor: pointer;
    background: var(--nlr-bg); list-style: none;
    user-select: none;
    transition: background .12s;
}
.nlr-qcm-stats-session-hd:hover { background: #dce8f7; }
.nlr-qcm-stats-session[open] > .nlr-qcm-stats-session-hd {
    background: var(--nlr-primary); color: #fff;
}
.nlr-qcm-stats-session-hd::-webkit-details-marker { display: none; }

.nlr-qcm-stats-session-name {
    font-weight: 600; font-size: .88rem; flex: 1; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.nlr-qcm-stats-badges { display: flex; gap: 4px; flex-shrink: 0; }
.nlr-qcm-stat-badge {
    font-size: .7rem; font-weight: 700; padding: 2px 6px;
    border-radius: 5px; white-space: nowrap;
    background: var(--nlr-border); color: var(--nlr-text);
}
.nlr-qcm-stat-badge--ok      { background: #d1fae5; color: var(--nlr-ok); }
.nlr-qcm-stat-badge--pending  { background: #f3f4f6; color: var(--nlr-muted); }
.nlr-qcm-stat-badge--rej      { background: #fee2e2; color: var(--nlr-danger); }
.nlr-qcm-stats-session[open] .nlr-qcm-stat-badge--ok      { background: #006c4933; color: #b6f5d5; }
.nlr-qcm-stats-session[open] .nlr-qcm-stat-badge--pending  { background: #ffffff33; color: #c8d8ec; }
.nlr-qcm-stats-session[open] .nlr-qcm-stat-badge--rej      { background: #95001433; color: #ffc0c0; }

.nlr-qcm-stats-mini-bar { flex: 0 0 60px; height: 5px !important; margin: 0; }
.nlr-qcm-stats-mini-bar .nlr-progress-bar-inner { height: 100%; }
.nlr-qcm-stats-sess-pct {
    font-size: .72rem; font-weight: 600; color: var(--nlr-ok);
    white-space: nowrap; min-width: 28px; text-align: right;
}
.nlr-qcm-stats-session[open] .nlr-qcm-stats-sess-pct { color: #b6f5d5; }

/* Quiz rows */
.nlr-qcm-stats-quizzes {
    padding: 6px 0; border-top: 1px solid var(--nlr-border);
}
.nlr-qcm-stats-quiz-row {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 14px;
    font-size: .82rem;
    border-bottom: 1px solid var(--nlr-bg);
}
.nlr-qcm-stats-quiz-row:last-child { border-bottom: none; }
.nlr-qcm-stats-quiz-row:hover { background: var(--nlr-primary-light); }
.nlr-qcm-stats-quiz-label {
    flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: var(--nlr-text);
}
.nlr-qcm-stats-quiz-counts { display: flex; gap: 4px; flex-shrink: 0; }
.nlr-qcm-stats-quiz-pct {
    font-size: .72rem; font-weight: 600; color: var(--nlr-ok);
    white-space: nowrap; min-width: 28px; text-align: right;
}

/* ── Hidden for non-admins: difficulty, category, type, nav dot, diff KPI ── */
#neolearn-review-app:not(.nlr-is-admin) .nlr-badge-easy,
#neolearn-review-app:not(.nlr-is-admin) .nlr-badge-intermediate,
#neolearn-review-app:not(.nlr-is-admin) .nlr-badge-difficult,
#neolearn-review-app:not(.nlr-is-admin) .nlr-badge-verydifficult,
#neolearn-review-app:not(.nlr-is-admin) .nlr-nav-dot,
#neolearn-review-app:not(.nlr-is-admin) .nlr-kpi-diff,
#neolearn-review-app:not(.nlr-is-admin) .nlr-badge-category,
#neolearn-review-app:not(.nlr-is-admin) .nlr-type-badge { display: none; }

/* ── Admin: source metadata on index card ───────────────────────────────── */
.nlr-index-source {
  position: relative;
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  font-size: .72rem;
  color: var(--nlr-muted);
  cursor: default;
}
.nlr-index-source--warn {
  color: #b45309;
  font-weight: 600;
  cursor: default;
}
.nlr-src-icon { flex-shrink: 0; }
.nlr-src-pill {
  display: inline-block;
  background: #eef0f4;
  border: 1px solid #d4d8e0;
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 700;
  color: var(--nlr-primary);
  line-height: 1.5;
}
/* Single tooltip on the whole zone */
.nlr-src-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: #0b1c30;
  color: #fff;
  font-size: .78rem;
  font-family: monospace;
  white-space: pre;
  max-width: 340px;
  padding: 8px 12px;
  border-radius: 7px;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nlr-index-source:hover .nlr-src-tooltip,
.nlr-index-source:focus .nlr-src-tooltip { display: block; }

/* ── Admin: quiz-level metadata cartridge (quiz view) ───────────────────── */
.nlr-quiz-meta {
  margin-bottom: 16px;
  border: 1px solid #c5cfe8;
  border-radius: 8px;
  background: #f5f8ff;
  font-size: .82rem;
}
.nlr-quiz-meta--warn {
  margin-bottom: 16px;
  padding: 8px 12px;
  color: #b45309;
  font-size: .82rem;
  font-weight: 600;
}
.nlr-quiz-meta-toggle {
  cursor: pointer;
  padding: 8px 12px;
  color: var(--nlr-primary);
  font-weight: 700;
  user-select: none;
  list-style: none;
}
.nlr-quiz-meta-toggle::-webkit-details-marker { display: none; }
.nlr-quiz-meta-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 3px 16px;
  margin: 0;
  padding: 6px 14px 12px;
  border-top: 1px solid #c5cfe8;
}
.nlr-quiz-meta-list dt {
  color: var(--nlr-primary);
  font-weight: 700;
  white-space: nowrap;
}
.nlr-quiz-meta-list dd {
  margin: 0;
  color: var(--nlr-text);
  font-family: monospace;
  font-size: .78rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Delete confirmation dialog ─────────────────────────────────────────── */
.nlr-del-dialog {
  border: none;
  border-radius: 12px;
  padding: 24px 28px 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,.22);
  min-width: 260px;
}
.nlr-del-dialog::backdrop { background: rgba(0,0,0,.35); }
.nlr-del-msg {
  margin: 0 0 18px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--nlr-text);
}
.nlr-del-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── Admin: per-option explanation ──────────────────────────────────────── */
.nlr-opt-explanation {
  grid-column: 1 / -1;
  font-size: .78rem;
  color: var(--nlr-muted);
  font-style: italic;
  padding: 2px 0 4px 28px;
  line-height: 1.4;
}
.nlr-opt-explanation--correct {
  color: var(--nlr-ok);
  font-style: normal;
  font-weight: 500;
}

/* ── Admin metadata block ────────────────────────────────────────────────── */
.nlr-admin-meta {
  margin: 10px 0 4px;
  border: 1px dashed var(--nlr-border);
  border-radius: 6px;
  background: #f8f9fb;
  font-size: .82rem;
}
.nlr-admin-meta-toggle {
  cursor: pointer;
  padding: 6px 10px;
  color: var(--nlr-muted);
  font-weight: 600;
  user-select: none;
  list-style: none;
}
.nlr-admin-meta-toggle::-webkit-details-marker { display: none; }
.nlr-admin-meta-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 3px 12px;
  margin: 0;
  padding: 6px 12px 10px;
  border-top: 1px dashed var(--nlr-border);
}
.nlr-admin-meta-list dt {
  color: var(--nlr-muted);
  font-weight: 600;
  white-space: nowrap;
}
.nlr-admin-meta-list dd {
  margin: 0;
  color: var(--nlr-text);
}

/* ── "Importer comme quiz natif" button ──────────────────────────────────── */
#nlr-import-native-wrap {
  display: flex;
  justify-content: flex-end;
  margin: 8px 0 4px;
}
.nlr-import-native-btn {
  background: #fff;
  color: var(--nlr-primary);
  border: 1.5px solid var(--nlr-primary);
  border-radius: 8px;
  padding: 7px 16px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.nlr-import-native-btn:hover {
  background: var(--nlr-primary);
  color: #fff;
  opacity: 1;
}

/* ── Import dialog ───────────────────────────────────────────────────────── */
.nlr-import-dlg {
  border: none;
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 8px 40px #0003;
  max-width: 520px;
  width: 95vw;
  max-height: 90vh;
  overflow: hidden;
}
.nlr-import-dlg::backdrop {
  background: #0005;
}
.nlr-import-dlg-inner {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}
.nlr-import-dlg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--nlr-border);
  flex-shrink: 0;
}
.nlr-import-dlg-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--nlr-text);
  margin: 0;
}
.nlr-import-dlg-close {
  background: none;
  border: none;
  color: var(--nlr-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.nlr-import-dlg-close:hover { background: var(--nlr-bg); opacity: 1; }
.nlr-import-dlg-body {
  padding: 18px 22px;
  overflow-y: auto;
  flex: 1;
}
.nlr-import-field {
  margin-bottom: 16px;
}
.nlr-import-label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  color: var(--nlr-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 0;
}
.nlr-import-input {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--nlr-border);
  border-radius: 8px;
  font: inherit;
  font-size: .92rem;
  box-sizing: border-box;
}
.nlr-import-input:focus { outline: 2px solid var(--nlr-primary); border-color: transparent; }

/* Two-column taxonomy grid */
.nlr-import-taxo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.nlr-import-taxo-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.nlr-taxo-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.nlr-taxo-count {
  font-size: .75rem;
  font-weight: 600;
  color: var(--nlr-primary);
  white-space: nowrap;
  min-width: 0;
}
.nlr-taxo-search {
  width: 100%;
  padding: 5px 9px;
  border: 1px solid var(--nlr-border);
  border-radius: 6px;
  font: inherit;
  font-size: .82rem;
  box-sizing: border-box;
  background: var(--nlr-bg);
}
.nlr-taxo-search:focus { outline: 2px solid var(--nlr-primary); border-color: transparent; background: #fff; }
.nlr-term-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 180px;
  overflow-y: auto;
  padding: 4px 2px;
}
.nlr-term-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--nlr-border);
  border-radius: 7px;
  padding: 6px 11px;
  font-size: .85rem;
  cursor: pointer;
  transition: border-color .1s, background .1s;
  user-select: none;
}
.nlr-term-chip::before {
  content: '';
  width: 15px;
  height: 15px;
  border: 2px solid var(--nlr-border);
  border-radius: 4px;
  flex-shrink: 0;
  transition: background .1s, border-color .1s;
}
.nlr-term-chip input[type=checkbox] { display: none; }
.nlr-term-chip:has(input:checked) {
  background: var(--nlr-primary-light);
  border-color: var(--nlr-primary);
  color: var(--nlr-primary);
  font-weight: 600;
}
.nlr-term-chip:has(input:checked)::before {
  background: var(--nlr-primary);
  border-color: var(--nlr-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%23fff' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 10px;
  background-repeat: no-repeat;
  background-position: center;
}
.nlr-term-chip:hover { border-color: var(--nlr-primary); background: var(--nlr-primary-light); }

/* Selection summary */
.nlr-import-selection {
  background: var(--nlr-primary-light);
  border: 1px solid #c7d9f0;
  border-radius: 8px;
  padding: 9px 13px;
  margin-bottom: 10px;
  font-size: .82rem;
}
.nlr-sel-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 4px; }
.nlr-sel-row:last-child { margin-bottom: 0; }
.nlr-sel-taxo-label { font-weight: 700; color: var(--nlr-primary); white-space: nowrap; }
.nlr-sel-chip {
  background: #fff;
  border: 1px solid var(--nlr-primary);
  color: var(--nlr-primary);
  border-radius: 12px;
  padding: 2px 9px;
  font-size: .78rem;
  font-weight: 600;
}

/* ── New term row ────────────────────────────────────────────────────────── */
.nlr-new-term-row {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}
.nlr-new-term-input {
  flex: 1;
  min-width: 0;
  padding: 5px 9px;
  border: 1px dashed var(--nlr-border);
  border-radius: 6px;
  font: inherit;
  font-size: .82rem;
  background: var(--nlr-bg);
}
.nlr-new-term-input:focus { outline: 2px solid var(--nlr-primary); border-color: transparent; background: #fff; }
.nlr-new-term-btn {
  padding: 5px 11px;
  background: var(--nlr-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.nlr-new-term-btn:disabled { opacity: .5; cursor: default; }
.nlr-new-term-btn:not(:disabled):hover { opacity: .85; }
.nlr-new-term-msg {
  font-size: .75rem;
  margin: 3px 0 0;
  min-height: 1em;
  color: var(--nlr-muted);
}
.nlr-new-term-msg--ok  { color: var(--nlr-ok); }
.nlr-new-term-msg--err { color: var(--nlr-danger); }

.nlr-import-loading { color: var(--nlr-muted); font-size: .85rem; }
.nlr-import-empty   { color: var(--nlr-muted); font-size: .82rem; font-style: italic; padding: 4px 2px; }
.nlr-import-error   { color: var(--nlr-danger); font-size: .82rem; }
.nlr-import-note {
  font-size: .83rem;
  color: var(--nlr-muted);
  margin: 4px 0 0;
}
.nlr-import-note--warn  { color: #b45309; }
.nlr-import-note--error { color: var(--nlr-danger); }
.nlr-import-dlg-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--nlr-border);
  flex-shrink: 0;
}
.nlr-import-split-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: var(--nlr-muted);
}
.nlr-import-split-input {
  width: 58px;
  padding: 4px 6px;
  border: 1px solid var(--nlr-border);
  border-radius: 6px;
  font: inherit;
  font-size: .85rem;
  text-align: center;
}
.nlr-import-split-preview {
  color: var(--nlr-muted);
  font-size: .82rem;
  font-style: italic;
}
.nlr-import-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.nlr-import-confirm-btn {
  background: var(--nlr-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 20px;
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
}
.nlr-import-confirm-btn:disabled { opacity: .55; cursor: default; }
.nlr-import-confirm-btn:not(:disabled):hover { opacity: .88; }

/* ── Success toast ───────────────────────────────────────────────────────── */
.nlr-import-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #0b1c30;
  color: #fff;
  padding: 11px 24px;
  border-radius: 24px;
  font-size: .88rem;
  font-family: sans-serif;
  z-index: 200001;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
  white-space: normal;
  max-width: 600px;
  text-align: center;
}
.nlr-import-toast.visible { opacity: 1; pointer-events: auto; }
.nlr-import-toast a { color: #93c5fd; text-decoration: underline; }

/* ── Période radio row ───────────────────────────────────────────────────── */
.nlr-periode-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--nlr-bg-alt, #f0f4f8);
  border-radius: 8px;
  font-size: .85rem;
}
.nlr-periode-row--hidden { display: none; }
.nlr-periode-label { font-weight: 600; color: var(--nlr-muted, #5a7591); margin-right: 4px; }
.nlr-periode-option { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.nlr-periode-option input { cursor: pointer; accent-color: var(--nlr-primary, #1a6eac); }

/* ── Index période KPI ───────────────────────────────────────────────────── */
.nlr-kpi-section-title {
  grid-column: 1 / -1;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--nlr-muted, #5a7591);
  padding: 12px 0 2px;
}

/* ── Deadline countdown card ──────────────────────────────────────────────── */
.nlr-kpi-card--deadline {
  border-color: #c0392b;
  background: #fff5f5;
  min-width: 160px;
}
.nlr-countdown-value {
  font-size: 1.8rem;
  font-variant-numeric: tabular-nums;
  color: #c0392b;
  letter-spacing: .04em;
}
.nlr-kpi-card--deadline .nlr-kpi-label {
  color: #c0392b;
  font-weight: 600;
}
@keyframes nlr-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}
.nlr-kpi-card--deadline-urgent {
  animation: nlr-pulse 1s ease-in-out infinite;
  border-color: #8b0000;
  background: #ffe0e0;
}
.nlr-kpi-card--deadline-urgent .nlr-countdown-value { color: #8b0000; }
.nlr-kpi-card--deadline-expired .nlr-countdown-value {
  font-size: 1.2rem;
  color: #555;
}

