/* OCLEI Hub — interface ludique, responsive, accessibilité */
:root {
  --bg-deep: #0c0618;
  --bg: #12081f;
  --surface: rgba(28, 16, 48, 0.78);
  --surface-solid: #1c1030;
  --border: rgba(168, 85, 247, 0.22);
  --text: #f4edff;
  --muted: #a89bc2;
  --accent: #c084fc;
  --accent2: #22d3ee;
  --success: #4ade80;
  --warn: #fbbf24;
  --danger: #fb7185;
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Outfit", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
  --glow: 0 0 40px rgba(192, 132, 252, 0.15);
  --focus-ring: 0 0 0 3px rgba(34, 211, 238, 0.35);
}

html {
  color-scheme: dark;
}

::selection {
  background: rgba(168, 85, 247, 0.45);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.hidden {
  display: none !important;
}

/* --- Login --- */
.view-login {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(168, 85, 247, 0.35), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(34, 211, 238, 0.12), transparent),
    radial-gradient(ellipse 50% 30% at 0% 80%, rgba(192, 132, 252, 0.15), transparent),
    var(--bg-deep);
  z-index: 0;
}

.login-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23a855f7' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.9;
  pointer-events: none;
}

.login-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(100%, 480px);
}

.login-brand {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  margin-bottom: 1.35rem;
  animation: fadeUp 0.6s ease both;
}

.login-brand-text {
  min-width: 0;
}

.login-tagline {
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent2);
  opacity: 0.95;
}

.login-brand h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  background: linear-gradient(135deg, #fff 0%, #e9d5ff 45%, #a5f3fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-intro {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 52ch;
}

.login-intro strong {
  color: var(--text);
  font-weight: 600;
}

/* Connexion / Inscription — sélecteur */
.auth-segment {
  display: flex;
  gap: 0.35rem;
  padding: 0.35rem;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  animation: fadeUp 0.6s 0.04s ease both;
}

.auth-segment-btn {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.auth-segment-btn:hover {
  color: var(--text);
  background: rgba(168, 85, 247, 0.1);
}

.auth-segment-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.45), rgba(34, 211, 238, 0.2));
  box-shadow: 0 2px 16px rgba(168, 85, 247, 0.25);
}

.auth-segment-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-ring {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(145deg, #a855f7 0%, #7c3aed 50%, #22d3ee 100%);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.12rem;
  color: #fff;
  box-shadow: var(--glow), 0 4px 20px rgba(124, 58, 237, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.logo-ring.sm {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 0.85rem;
}

.login-card {
  padding: 1.75rem 1.85rem;
  border-radius: var(--radius);
  animation: fadeUp 0.6s 0.1s ease both;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0.9;
  border-radius: var(--radius) var(--radius) 0 0;
}

.login-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.fine-print {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

.auth-switch {
  margin: 1rem 0 0;
  text-align: center;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent2);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-link:hover {
  color: var(--accent);
}

.btn-link:focus-visible {
  outline: none;
  border-radius: 4px;
  box-shadow: var(--focus-ring);
}

.nav-item .nav-badge {
  margin-left: auto;
  flex-shrink: 0;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 99px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-badge.hidden {
  display: none;
}

.signup-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.signup-card {
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.signup-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.signup-card .meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.signup-card .block {
  font-size: 0.88rem;
  margin: 0.5rem 0;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--accent);
}

.signup-card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.card-elevated {
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--glow);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.card-elevated:hover {
  border-color: rgba(168, 85, 247, 0.35);
}

/* --- App shell --- */
.view-app {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(28, 16, 48, 0.98), rgba(12, 6, 24, 0.98));
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1rem 0.75rem;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 40;
  transition: transform 0.25s ease;
}

.sidebar-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.sidebar-head strong {
  display: block;
  font-size: 0.95rem;
}

.sidebar-head small {
  color: var(--muted);
  font-size: 0.75rem;
}

.sidebar-close {
  margin-left: auto;
  display: none;
}

.nav-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 0.5rem 0.75rem 0.35rem;
}

.sidebar-nav .nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
  padding: 0.65rem 0.85rem;
  margin: 0.15rem 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav .nav-item:hover {
  background: rgba(168, 85, 247, 0.12);
  color: var(--text);
}

.sidebar-nav .nav-item.active {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.25), transparent);
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: calc(0.85rem - 3px);
}

.sidebar-nav .nav-item:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.nav-ico {
  font-size: 1.1rem;
  line-height: 1;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.user-chip {
  font-size: 0.78rem;
  color: var(--text);
  padding: 0.5rem 0.75rem;
  word-break: break-word;
  border-radius: 10px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.22);
  line-height: 1.35;
}

.main-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: linear-gradient(160deg, var(--bg) 0%, #0a0514 100%);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(22, 10, 38, 0.95), rgba(18, 8, 31, 0.88));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.topbar-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.btn-icon:hover {
  border-color: var(--accent);
}

.btn-icon:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.content {
  padding: 1.15rem 1.15rem 2.5rem;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .content {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Scrollbar (WebKit) */
html::-webkit-scrollbar,
.select-multi::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html::-webkit-scrollbar-thumb,
.select-multi::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.35);
  border-radius: 99px;
}

html::-webkit-scrollbar-track,
.select-multi::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.panel-section {
  animation: fadeUp 0.35s ease both;
}

/* KPI */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.kpi-card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0.85;
}

.kpi-val {
  font-size: 1.65rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.kpi-lbl {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.partner-rank {
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.partner-rank h3 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.rank-bar {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.rank-bar > span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #a855f7, #22d3ee);
  transition: width 0.4s ease;
}

/* Cards */
.card {
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-title {
  margin: 0;
  font-size: 1.1rem;
}

.card-sub {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.assign-grid .full-row {
  grid-column: 1 / -1;
}

.assign-grid {
  align-items: start;
}

/* Forms */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.floating-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.floating-label span {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.floating-label input,
.floating-label textarea,
.floating-label select {
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.floating-label input:hover,
.floating-label textarea:hover,
.floating-label select:hover {
  border-color: rgba(168, 85, 247, 0.35);
}

.floating-label input:focus,
.floating-label textarea:focus,
.floating-label select:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: var(--focus-ring);
  background: rgba(0, 0, 0, 0.38);
}

.floating-label:focus-within span {
  color: var(--accent2);
}

.floating-label textarea {
  resize: vertical;
  min-height: 88px;
}

.lbl {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.select-multi {
  width: 100%;
  min-height: 220px;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: inherit;
}

.input-search {
  padding: 0.55rem 0.85rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  width: min(100%, 280px);
  font-family: inherit;
}

.file-drop {
  position: relative;
  display: block;
  padding: 2rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.file-drop:hover,
.file-drop:focus-within {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.04);
}

.file-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-drop-label {
  color: var(--muted);
  font-size: 0.9rem;
}

kbd {
  font-family: var(--mono);
  font-size: 0.75em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.12s, filter 0.12s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 55%, #6d28d9 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.45), var(--focus-ring);
}

.btn-secondary {
  background: rgba(34, 211, 238, 0.15);
  color: var(--accent2);
  border: 1px solid rgba(34, 211, 238, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--accent);
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  width: 100%;
}

.btn-glow:hover {
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.45);
}

/* Table */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-modern {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.table-modern th,
.table-modern td {
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.table-modern th {
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.table-modern tr:hover td {
  background: rgba(168, 85, 247, 0.04);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-pending {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warn);
}

.badge-answered {
  background: rgba(74, 222, 128, 0.15);
  color: var(--success);
}

.badge-cat {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  text-transform: none;
  font-weight: 500;
}

/* Partner hero */
.hero-partner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(34, 211, 238, 0.05));
}

.hero-partner-text h2 {
  margin: 0 0 0.35rem;
  font-size: 1.4rem;
}

.hero-partner-text p {
  margin: 0;
  color: var(--muted);
  max-width: 42ch;
}

.progress-ring-wrap {
  flex-shrink: 0;
}

.progress-ring-wrap svg {
  display: block;
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.35));
}

.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.cat-pill {
  padding: 0.4rem 0.75rem;
  border-radius: 99px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--muted);
}

.cat-pill strong {
  color: var(--accent2);
  font-weight: 700;
}

.quick-actions .qa-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

/* Question cards */
.question-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.q-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-solid);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.q-card:hover {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: var(--glow);
}

.q-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  cursor: pointer;
  list-style: none;
}

.q-card-head::-webkit-details-marker {
  display: none;
}

.q-card-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.q-card-body {
  padding: 0 1.15rem 1.15rem;
  border-top: 1px solid var(--border);
}

.q-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

/* Doc grid partner */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.doc-tile {
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.doc-tile a {
  align-self: flex-start;
}

/* Checklist */
.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  padding-left: 1.75rem;
  position: relative;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent2);
  font-weight: 800;
}

.checklist li:last-child {
  border-bottom: none;
}

/* Toast */
.toast-root {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(90vw, 380px);
  pointer-events: none;
}

.toast {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  pointer-events: auto;
  animation: toastIn 0.35s ease;
}

.toast.ok {
  border-color: rgba(74, 222, 128, 0.45);
}

.toast.err {
  border-color: rgba(251, 113, 133, 0.5);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-inline {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
}

.toast-inline.ok {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #86efac;
}

.toast-inline.err {
  background: rgba(251, 113, 133, 0.12);
  border: 1px solid rgba(251, 113, 133, 0.35);
  color: #fda4af;
}

/* Mobile sidebar */
.sidebar-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 35;
  backdrop-filter: blur(2px);
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.5);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: grid;
  }

  .topbar .btn-icon#btn-menu {
    display: grid;
  }
}

@media (min-width: 901px) {
  .topbar .btn-icon#btn-menu {
    display: none;
  }

  .sidebar-close {
    display: none !important;
  }
}
