﻿* {
  box-sizing: border-box;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
}

:root {
  --bg: #0b1218;
  --card: #131d28;
  --card-2: #1b2834;
  --row-a: #2a323c;
  --row-b: #313a45;
  --text: #edf5ff;
  --muted: #a8b6c7;
  --green: #8fe15a;
  --green-2: #56c271;
  --orange: #f6a623;
  --red: #ff4d4f;
  --red-dark: #a63b3d;
  --yellow: #ffb347;
  --line: rgba(164, 211, 255, 0.09);
  --line-soft: rgba(164, 211, 255, 0.16);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
  --axis-s: #2ea043;
  --axis-q: #2f81f7;
  --axis-c: #f39c12;
  --axis-m: #f39c12;
  --axis-d: #e03131;
  --axis-p: #a855f7;
  --qrqc: #ef4444;
}

html,
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(149,209,69,0.1), transparent 22%),
    radial-gradient(circle at 88% 8%, rgba(79,140,255,0.1), transparent 20%),
    radial-gradient(circle at 50% 90%, rgba(79,140,255,0.06), transparent 28%),
    linear-gradient(180deg, #080f18 0%, #0b1420 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

body {
  overflow-y: auto;
}

/* Variables de design globales :
   palette, ombres et couleurs fonctionnelles réutilisées dans tous les modules. */

body,
.app-shell {
  overflow-x: hidden;
}

/* ══════════════════════════════════════════════════════════════════════
   AUTH SHELL — Split-screen login (brand left / forms right)
   ══════════════════════════════════════════════════════════════════════ */

@keyframes orb-drift-1 {
  0%,100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(28px, -18px) scale(1.08); }
  66%      { transform: translate(-14px, 22px) scale(0.94); }
}
@keyframes orb-drift-2 {
  0%,100% { transform: translate(0, 0) scale(1); }
  40%      { transform: translate(-22px, 16px) scale(1.1); }
  75%      { transform: translate(18px, -24px) scale(0.92); }
}
@keyframes grid-fade {
  0%,100% { opacity: 0.22; }
  50%      { opacity: 0.38; }
}
@keyframes tag-pop {
  from { opacity: 0; transform: translateY(6px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes stat-slide {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Auth shell: fullscreen brand + centered overlay form ──────────── */
.auth-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #080e14;
}

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

/* ── Brand: fullscreen fixed background ─────────────────────────────── */
.auth-brand {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  transition: opacity 0.5s ease, filter 0.5s ease, transform 0.5s ease;
  background: linear-gradient(145deg, #080e14 0%, #0b1620 50%, #0d1c2c 100%);
}

/* Blur brand when form overlay is open */
.auth-shell.is-form-open .auth-brand {
  opacity: 0.25;
  filter: blur(6px);
  transform: scale(1.04);
  pointer-events: none;
}

.auth-brand__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.auth-brand__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}
.auth-brand__orb--1 {
  width: 580px; height: 580px;
  top: -140px; left: -140px;
  background: radial-gradient(circle, rgba(149,209,69,0.2) 0%, rgba(149,209,69,0.05) 60%, transparent 100%);
  animation: orb-drift-1 16s ease-in-out infinite;
}
.auth-brand__orb--2 {
  width: 460px; height: 460px;
  bottom: -100px; right: -80px;
  background: radial-gradient(circle, rgba(79,140,255,0.2) 0%, rgba(79,140,255,0.05) 60%, transparent 100%);
  animation: orb-drift-2 20s ease-in-out infinite;
}
.auth-brand__orb--3 {
  width: 320px; height: 320px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(149,209,69,0.06) 0%, transparent 70%);
  animation: orb-drift-1 24s ease-in-out infinite reverse;
}

.auth-brand__grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(164,211,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(164,211,255,0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  animation: grid-fade 10s ease-in-out infinite;
}
.auth-brand__grid-lines::before,
.auth-brand__grid-lines::after {
  content: '';
  position: absolute;
  width: 44px; height: 44px;
  border-color: rgba(149,209,69,0.4);
  border-style: solid;
}
.auth-brand__grid-lines::before { top: 32px; left: 32px; border-width: 2px 0 0 2px; }
.auth-brand__grid-lines::after  { bottom: 32px; right: 32px; border-width: 0 2px 2px 0; }

/* Centered brand content */
.auth-brand__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 680px;
}

.auth-brand__logo {
  width: 88px; height: 88px;
  margin: 0 auto 32px;
  display: block;
  filter: drop-shadow(0 0 28px rgba(149,209,69,0.45));
}

.auth-brand__title {
  margin: 0 0 14px;
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1px;
  background: linear-gradient(130deg, #edf5ff 0%, #95d145 50%, #4f8cff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-brand__subtitle {
  margin: 0 0 40px;
  font-size: 17px;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.auth-brand__modules {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 52px;
  justify-content: center;
}

.auth-module-tag {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: rgba(149,209,69,0.95);
  background: rgba(149,209,69,0.1);
  border: 1px solid rgba(149,209,69,0.3);
  animation: tag-pop 0.4s ease both;
}
.auth-module-tag:nth-child(2) { animation-delay: 0.08s; color: rgba(79,140,255,0.95);  background: rgba(79,140,255,0.1);  border-color: rgba(79,140,255,0.3); }
.auth-module-tag:nth-child(3) { animation-delay: 0.16s; color: rgba(239,68,68,0.9);   background: rgba(239,68,68,0.08);  border-color: rgba(239,68,68,0.25); }
.auth-module-tag:nth-child(4) { animation-delay: 0.24s; color: rgba(246,166,35,0.9);  background: rgba(246,166,35,0.08); border-color: rgba(246,166,35,0.25); }

.auth-brand__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.auth-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 28px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  animation: stat-slide 0.5s ease both;
  min-width: 130px;
}
.auth-stat:nth-child(2) { animation-delay: 0.1s; }
.auth-stat:nth-child(3) { animation-delay: 0.2s; }
.auth-stat strong { font-size: 14px; font-weight: 700; color: var(--text); }
.auth-stat span   { font-size: 12px; color: var(--muted); }

/* Footer bar + launch button */
.auth-brand__footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 40px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(to top, rgba(8,14,20,0.7), transparent);
}

.auth-brand__footer-copy {
  font-size: 12px;
  color: rgba(168,182,199,0.5);
  letter-spacing: 0.3px;
}

/* "Se connecter" launch button */
.auth-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 28px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  background: linear-gradient(135deg, #7ec832 0%, #95d145 50%, #5ea82a 100%);
  color: #0b1218;
  box-shadow: 0 4px 24px rgba(149,209,69,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.auth-launch-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 36px rgba(149,209,69,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
.auth-launch-btn svg {
  width: 20px; height: 20px;
  transition: transform 0.25s;
}
.auth-launch-btn:hover svg { transform: translateX(4px); }

/* ── Forms: centered overlay ────────────────────────────────────────── */
.auth-forms {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 48px;
  overflow-y: auto;
  /* Hidden by default */
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96) translateY(16px);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(8,14,20,0.7);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
}

.auth-shell.is-form-open .auth-forms {
  opacity: 1;
  pointer-events: all;
  transform: scale(1) translateY(0);
}

/* "← Retour" close button */
.auth-forms__close {
  position: absolute;
  top: 24px;
  left: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.auth-forms__close:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
  border-color: rgba(255,255,255,0.18);
}
.auth-forms__close svg { width: 16px; height: 16px; }

.auth-forms__inner {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Auth card ──────────────────────────────────────────────────────── */
.auth-card {
  display: grid;
  gap: 16px;
  padding: 32px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(19,29,40,0.98) 0%, rgba(15,23,33,0.98) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 0 0 1px rgba(149,209,69,0.04),
    0 24px 64px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.06);
  transition: box-shadow 0.3s;
}
.auth-card:hover {
  box-shadow:
    0 0 0 1px rgba(149,209,69,0.08),
    0 28px 72px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.07);
}
.auth-card.hidden { display: none; }
.auth-card-login, .auth-card-side { width: 100%; }
.auth-card-wide { grid-column: 1 / -1; }

.auth-card__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
}
.auth-card__icon {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(149,209,69,0.15), rgba(79,140,255,0.1));
  border: 1px solid rgba(149,209,69,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #95d145;
}
.auth-card__icon svg { width: 22px; height: 22px; }
.auth-card__header h2 { margin: 0 0 3px; font-size: 20px; font-weight: 700; color: var(--text); }
.auth-card__header p  { margin: 0; font-size: 13px; color: var(--muted); }

.auth-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.auth-grid--single  { grid-template-columns: minmax(0, 680px); justify-content: center; }
.auth-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ── Form fields ────────────────────────────────────────────────────── */
.auth-field { display: flex; flex-direction: column; gap: 7px; }

.auth-field__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-field__wrap { position: relative; display: flex; align-items: center; }

.auth-field__icon {
  position: absolute;
  left: 14px;
  width: 16px; height: 16px;
  color: rgba(168,182,199,0.5);
  pointer-events: none;
  flex-shrink: 0;
  transition: color 0.2s;
}

.auth-field__wrap input {
  width: 100%;
  height: 46px;
  padding: 0 16px 0 42px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.auth-field__wrap:not(:has(.auth-field__icon)) input { padding-left: 16px; }
.auth-field__wrap input::placeholder { color: rgba(168,182,199,0.35); }
.auth-field__wrap input:focus {
  border-color: rgba(149,209,69,0.5);
  background: rgba(149,209,69,0.04);
  box-shadow: 0 0 0 3px rgba(149,209,69,0.1);
}
.auth-field__wrap:focus-within .auth-field__icon { color: rgba(149,209,69,0.8); }

/* ── Buttons ────────────────────────────────────────────────────────── */
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  letter-spacing: 0.2px;
  width: 100%;
}

.auth-btn--primary {
  background: linear-gradient(135deg, #7ec832 0%, #95d145 50%, #5ea82a 100%);
  color: #0b1218;
  box-shadow: 0 4px 20px rgba(149,209,69,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}
.auth-btn--primary:hover {
  background: linear-gradient(135deg, #8fd43a 0%, #a2dd52 50%, #6bb82e 100%);
  box-shadow: 0 6px 28px rgba(149,209,69,0.45), inset 0 1px 0 rgba(255,255,255,0.25);
  transform: translateY(-1px);
}
.auth-btn--primary:active { transform: translateY(0); }
.auth-btn--primary svg { width: 18px; height: 18px; transition: transform 0.2s; }
.auth-btn--primary:hover svg { transform: translateX(3px); }

.auth-btn--ghost {
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.09);
}
.auth-btn--ghost:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border-color: rgba(255,255,255,0.16);
}

/* ── Inline actions row ─────────────────────────────────────────────── */
.auth-inline-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.auth-inline-actions .auth-btn { flex: 1 1 160px; height: 40px; font-size: 13px; }
.auth-inline-actions .btn { flex: 1 1 220px; }

/* ── Messages ───────────────────────────────────────────────────────── */
.auth-message {
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(31,50,74,0.92);
  font-size: 13.5px;
  line-height: 1.45;
}
.auth-message.hidden    { display: none; }
.auth-message.is-error  { background: rgba(122,31,31,0.92); border-color: rgba(239,68,68,0.25); }
.auth-message.is-success{ background: rgba(29,111,66,0.92); border-color: rgba(143,225,90,0.25); }

.auth-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .auth-shell { flex-direction: column; }
  .auth-brand { flex: none; padding: 36px 28px 28px; }
  .auth-brand__stats { flex-direction: row; flex-wrap: wrap; }
  .auth-stat { flex: 1 1 130px; }
  .auth-forms { padding: 32px 20px; border-left: none; border-top: 1px solid rgba(255,255,255,0.05); }
  .auth-forms__inner { max-width: 100%; }
}

/* Barre de session fixe en haut à droite */
.session-bar {
  position: fixed;
  top: 8px;
  right: 18px;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(10,20,34,0.97), rgba(13,24,40,0.96));
  border: 1px solid rgba(149,209,69,0.2);
  box-shadow: var(--shadow), 0 0 0 1px rgba(149,209,69,0.05), inset 0 1px 0 rgba(255,255,255,0.05);
  max-width: calc(100vw - 120px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.session-bar.hidden {
  display: none;
}

.session-bar__identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.session-bar__identity strong {
  font-size: 13px;
  line-height: 1.1;
}

.session-bar__identity span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-bar__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.session-bar .btn {
  height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 14px;
}

.admin-panel-section + .admin-panel-section {
  margin-top: 26px;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-row {
  display: grid;
  gap: 16px;
  padding: 18px 18px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

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

.admin-row__meta {
  display: grid;
  gap: 4px;
}

.admin-row__meta strong {
  font-size: 16px;
}

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

.admin-row__summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-role-badge,
.admin-password-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.admin-role-badge.is-admin {
  background: rgba(149, 209, 69, 0.16);
  border-color: rgba(149, 209, 69, 0.34);
  color: #dff7b8;
}

.admin-row__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.admin-role-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
}

.admin-role-toggle input {
  accent-color: var(--green);
}

.admin-row__access {
  display: grid;
  gap: 12px;
}

.admin-row__groups {
  display: grid;
  gap: 10px;
}

.admin-row__groups-title {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-row__buttons {
  display: grid;
  gap: 10px;
  align-content: start;
}

.admin-group-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  min-width: min(100%, 720px);
}

.admin-group-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
}

.admin-group-check input {
  accent-color: var(--green);
}

/* ══ Admin Panel — Membres (refonte) ══ */
.admin-search-bar {
  margin-bottom: 16px;
}

.admin-search-input {
  width: 100%;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(100, 126, 168, 0.22);
  background: rgba(10, 20, 38, 0.8);
  color: #eef5ff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s;
  box-sizing: border-box;
}
.admin-search-input:focus { border-color: rgba(79, 140, 255, 0.5); }

.admin-member-card {
  border: 1px solid rgba(100, 126, 168, 0.16);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(12, 22, 42, 0.97), rgba(8, 16, 30, 0.97));
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.admin-member-card[open] {
  border-color: rgba(79, 140, 255, 0.3);
}

.admin-member-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.admin-member-summary::-webkit-details-marker { display: none; }
.admin-member-summary:hover { background: rgba(79, 140, 255, 0.05); }

.admin-member-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.admin-member-info {
  flex: 1;
  min-width: 0;
}
.admin-member-info strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #eef5ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-member-info span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-member-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.admin-role-badge {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(79, 140, 255, 0.15);
  color: #7fb4ff;
  border: 1px solid rgba(79, 140, 255, 0.2);
}
.admin-role-badge.is-admin {
  background: rgba(149, 209, 69, 0.15);
  color: #9ae63a;
  border-color: rgba(149, 209, 69, 0.25);
}

.admin-pass-badge {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  background: rgba(255, 100, 100, 0.1);
  color: #ff8080;
  border: 1px solid rgba(255, 100, 100, 0.18);
}
.admin-pass-badge.has-pass {
  background: rgba(149, 209, 69, 0.08);
  color: #9ae63a;
  border-color: rgba(149, 209, 69, 0.15);
}

.admin-member-chevron {
  font-size: 20px;
  color: var(--muted);
  transition: transform 0.22s ease;
  flex-shrink: 0;
}
.admin-member-card[open] .admin-member-chevron {
  transform: rotate(90deg);
}

.admin-member-body {
  padding: 0 18px 16px;
  border-top: 1px solid rgba(100, 126, 168, 0.1);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-member-section {
  padding-top: 14px;
}

.admin-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-toggle-label {
  font-size: 13px;
  color: #b0c4d8;
  font-weight: 600;
}

.admin-pill-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.admin-pill-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.admin-pill-track {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: rgba(100, 126, 168, 0.25);
  border: 1px solid rgba(100, 126, 168, 0.2);
  position: relative;
  transition: background 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
}
.admin-pill-toggle input:checked + .admin-pill-track {
  background: rgba(149, 209, 69, 0.25);
  border-color: rgba(149, 209, 69, 0.4);
}
.admin-pill-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(168, 182, 199, 0.7);
  position: absolute;
  left: 3px;
  transition: left 0.2s, background 0.2s;
}
.admin-pill-toggle input:checked + .admin-pill-track .admin-pill-thumb {
  left: 22px;
  background: #9ae63a;
}

.admin-perimeters-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
}

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

.admin-stats-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.admin-stat-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(100, 126, 168, 0.18);
  background: rgba(10, 20, 38, 0.7);
  font-size: 13px;
  color: #b0c4d8;
}
.admin-stat-chip strong {
  color: #eef5ff;
  font-weight: 800;
}
/* ══ Fin Admin Panel ══ */

.home-context-strip {
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 0 0 18px;
  padding: 18px 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(17, 29, 49, 0.94), rgba(18, 31, 52, 0.86));
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.home-context-strip__copy {
  display: grid;
  gap: 4px;
}

.home-context-strip__copy strong {
  font-size: 16px;
}

.home-context-strip__copy span {
  font-size: 13px;
  color: var(--muted);
}

.home-context-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.home-context-admin-actions {
  display: flex;
  justify-content: flex-end;
}

.home-context-chip,
.context-badge {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  color: #edf5ff;
  font-weight: 700;
}

.home-context-chip {
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.home-context-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(149, 209, 69, 0.24);
}

.home-context-chip.is-active {
  background: linear-gradient(135deg, rgba(149, 209, 69, 0.28), rgba(110, 198, 255, 0.18));
  border-color: rgba(149, 209, 69, 0.42);
  box-shadow: inset 0 0 0 1px rgba(149, 209, 69, 0.14);
}

.home-context-select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
  min-width: 220px;
  max-width: 320px;
  padding: 0 40px 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(149, 209, 69, 0.32);
  background: linear-gradient(135deg, rgba(149, 209, 69, 0.14), rgba(110, 198, 255, 0.08)) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2395d145' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") right 12px center / 18px 18px no-repeat;
  color: #e8f5d0;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.16s, box-shadow 0.16s;
  box-shadow: 0 2px 12px rgba(149, 209, 69, 0.1);
}

.home-context-select:focus {
  outline: none;
  border-color: rgba(149, 209, 69, 0.6);
  box-shadow: 0 0 0 3px rgba(149, 209, 69, 0.12);
}

.home-context-select option {
  background: #0f1e30;
  color: #e8edf2;
  font-weight: 600;
}

.app-shell {
  padding: 14px;
  min-height: 100vh;
}

.page {
  display: none;
}

.sync-shell {
  display: grid;
  grid-template-columns: minmax(360px, 460px) minmax(0, 1fr);
  gap: 16px;
}

.sync-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 20px;
}

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

.sync-settings-row {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.sync-settings-note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sync-settings-note strong {
  font-size: 14px;
}

.sync-settings-note span {
  font-size: 13px;
  color: var(--muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.field-wide {
  grid-column: 1 / -1;
}

.path-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.path-picker textarea {
  min-height: 120px;
  resize: vertical;
}

.sync-source-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

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

.sync-source-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.sync-source-item__path {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

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

.sync-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

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

.sync-job-card {
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(11, 20, 32, 0.92), rgba(13, 24, 36, 0.98));
  padding: 16px;
}

.sync-job-card.is-active {
  border-color: rgba(149, 209, 69, 0.4);
  box-shadow: 0 0 0 1px rgba(149, 209, 69, 0.12) inset;
}

.sync-job-card__head,
.sync-job-card__body,
.sync-job-card__actions {
  display: flex;
  gap: 12px;
}

.sync-job-card__head {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.sync-job-card__head strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.sync-job-card__head span,
.sync-job-path span,
.sync-job-meta span,
.sync-empty-state p,
.sync-job-description {
  color: var(--muted);
  font-size: 13px;
}

.sync-job-card__body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.sync-job-path,
.sync-job-meta {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 12px;
  min-width: 0;
}

.sync-job-path strong,
.sync-job-meta strong {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  word-break: break-word;
}

.sync-job-message {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(124, 199, 255, 0.08);
  color: #cfe8ff;
  font-size: 13px;
}

.sync-progress-card {
  width: min(560px, calc(100vw - 32px));
  max-height: min(78vh, 720px);
}

.sync-progress-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sync-progress-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.sync-progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.sync-progress-bar__fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7cc7ff, #95d145);
  transition: width 0.18s ease;
}

.sync-progress-message {
  font-size: 14px;
  font-weight: 600;
}

.sync-progress-queue {
  max-height: 180px;
  overflow: auto;
  display: grid;
  gap: 8px;
}

.sync-progress-queue-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: var(--muted);
}

.sync-progress-queue-item.is-active {
  border-color: rgba(124, 199, 255, 0.35);
  color: #eef6ff;
}

.sync-progress-queue-item.is-done {
  border-color: rgba(149, 209, 69, 0.26);
  color: #cfecc0;
}

.sync-sharepoint-field.is-hidden {
  display: none;
}

.sync-empty-state {
  padding: 28px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 18px;
}

.danger-soft {
  border-color: rgba(255, 109, 122, 0.28);
  color: #ffb7be;
}

.danger-soft:hover {
  border-color: rgba(255, 109, 122, 0.48);
}

.settings-block-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.settings-block-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-block-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.sqcdp-columns-manager {
  display: grid;
  gap: 10px;
}

.sqcdp-column-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1.5fr) 140px 110px 120px;
  gap: 10px;
  align-items: center;
}

.sqcdp-column-order {
  display: flex;
  gap: 8px;
}

.admin-password-card {
  width: min(420px, calc(100vw - 32px));
}

.admin-password-error {
  margin: 8px 0 0;
  color: #ff9aa2;
  font-size: 13px;
}

.check-pill.compact {
  min-height: 40px;
  padding: 0 10px;
}

.is-disabled {
  opacity: 0.55;
}

/* Grand header visuel de l'accueil et des pages modules. */
.hero {
  min-height: 220px;
  border-radius: 28px;
  padding: 34px;
  margin-bottom: 18px;
  background:
    radial-gradient(circle at 12% 70%, rgba(149,209,69,0.13), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(79,140,255,0.14), transparent 26%),
    radial-gradient(circle at 55% 95%, rgba(79,140,255,0.07), transparent 30%),
    linear-gradient(135deg, #0d1a2a 0%, #142238 50%, #0f1d31 100%);
  border: 1px solid rgba(149,209,69,0.12);
  box-shadow: var(--shadow), 0 0 0 1px rgba(149,209,69,0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}
/* Precision grid overlay on hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(164,211,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(164,211,255,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  border-radius: inherit;
  pointer-events: none;
}
/* Corner accent marks on hero */
.hero::after {
  content: '';
  position: absolute;
  top: 18px; right: 18px;
  width: 28px; height: 28px;
  border: 1.5px solid rgba(149,209,69,0.35);
  border-left: none; border-bottom: none;
  border-radius: 0 4px 0 0;
  pointer-events: none;
}

.hero-actions-menu {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  font-size: 54px;
  font-weight: 800;
  color: #dde5ee;
}

.hero-subtitle {
  min-height: 32px;
}

.home-global-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.home-kpi-card,
.powerbi-card,
.shortcuts-card,
.qrqc-kpis-card,
.qrqc-case-card,
.qrqc-visual-card,
.qrqc-actions-card {
  background: linear-gradient(160deg, rgba(17,27,38,0.97) 0%, rgba(12,20,30,0.99) 100%);
  border: 1px solid rgba(164,211,255,0.09);
  border-radius: 24px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.04);
}

.home-kpi-card {
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.home-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: linear-gradient(180deg, rgba(149,209,69,0.6), rgba(79,140,255,0.3));
}
.home-kpi-card:hover {
  border-color: rgba(149,209,69,0.2);
  box-shadow: var(--shadow), 0 0 0 1px rgba(149,209,69,0.06), inset 0 1px 0 rgba(255,255,255,0.06);
}

.home-kpi-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.home-kpi-card strong {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(130deg, #edf5ff, #adc9e8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.menu-section {
  margin-top: 18px;
}

.menu-section-title {
  margin-bottom: 14px;
}

.menu-section-title h2 {
  margin: 0 0 6px 0;
  font-size: 22px;
}

.menu-section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

/* Tuiles principales du hub : catégories, accès formulaires, A3, etc. */
.menu-tile {
  background: linear-gradient(160deg, rgba(14,22,33,0.97) 0%, rgba(10,16,26,0.99) 100%);
  border: 1px solid rgba(164,211,255,0.09);
  border-radius: 22px;
  padding: 18px;
  min-height: 118px;
  color: white;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.03);
}

.menu-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(149,209,69,0.3);
  background: linear-gradient(160deg, rgba(18,28,42,0.98) 0%, rgba(13,21,33,0.99) 100%);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 0 1px rgba(149,209,69,0.08);
}

.menu-tile-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.menu-tile-body strong {
  font-size: 16px;
  color: #f4f8fd;
}

.menu-tile-body span {
  font-size: 13px;
  color: var(--muted);
}

.menu-tile-arrow {
  color: #7f92a8;
  font-size: 18px;
  font-weight: 700;
}

.menu-tile-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex: 0 0 64px;
}

.menu-tile-sqcdp {
  border-color: rgba(149, 209, 69, 0.25);
}

.menu-tile-qrqc {
  border-color: rgba(239, 68, 68, 0.28);
}

.menu-tile-qrqc:hover {
  border-color: rgba(239, 68, 68, 0.45);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(14,22,35,0.96), rgba(10,18,29,0.98));
  border: 1px solid rgba(149,209,69,0.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.04);
  position: relative;
  overflow: hidden;
}
.topbar::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(164,211,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(164,211,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.topbar-left,
.title-wrap,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-brand {
  font-weight: 800;
  color: var(--green);
  font-size: 20px;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
}

.topbar p {
  margin: 3px 0 0 0;
  color: var(--muted);
  font-size: 13px;
}

.context-select,
.filters-bar input,
.filters-bar select,
.actions-table input,
.actions-table select,
.actions-table textarea,
.modal-body select,
.modal-body input,
textarea {
  width: 100%;
  border: 1px solid var(--line-soft);
  background: #111821;
  color: white;
  border-radius: 14px;
  padding: 10px 12px;
}

select option {
  background: #1f2731;
  color: #ffffff;
}

.context-select,
.filters-bar input,
.filters-bar select,
.actions-table input,
.actions-table select,
.modal-body select,
.modal-body input {
  height: 42px;
}

input[type="date"] {
  color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.95;
  cursor: pointer;
}

.actions-table textarea {
  min-height: 46px;
  resize: none;
  overflow: hidden;
  line-height: 1.35;
}

.sqcdp-textarea {
  transition:
    min-height 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.sqcdp-textarea--action {
  min-height: 58px;
}

.sqcdp-textarea--commentaire {
  min-height: 72px;
}

.save-status {
  font-size: 13px;
  color: var(--orange);
  background: rgba(246, 166, 35, 0.1);
  border: 1px solid rgba(246, 166, 35, 0.16);
  padding: 10px 14px;
  border-radius: 14px;
}

.btn {
  height: 42px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 16px;
  cursor: pointer;
  color: white;
  font-weight: 700;
  background: linear-gradient(180deg, #2b3540, #23303d);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  transition: all 0.18s;
}
.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(135deg, #7ec832 0%, #95d145 50%, #5ea82a 100%);
  color: #0b1218;
  box-shadow: 0 3px 14px rgba(149,209,69,0.28), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn.primary:hover {
  background: linear-gradient(135deg, #8fd43a 0%, #a2dd52 50%, #6bb82e 100%);
  box-shadow: 0 6px 20px rgba(149,209,69,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
}

.btn.ghost {
  background: linear-gradient(180deg, rgba(43,53,64,0.9), rgba(36,48,60,0.9));
  border-color: rgba(164,211,255,0.12);
}
.btn.ghost:hover {
  border-color: rgba(164,211,255,0.22);
  background: linear-gradient(180deg, rgba(50,62,76,0.95), rgba(42,56,70,0.95));
}

.btn.large {
  height: 52px;
  padding: 0 22px;
}

.btn-small {
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
}

.btn-danger-lite {
  border-color: rgba(255, 77, 79, 0.35);
  color: #ffd5d5;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.powerbi-card {
  overflow: hidden;
  margin-bottom: 16px;
}

.powerbi-frame-wrap {
  position: relative;
  padding: 20px;
}

.powerbi-frame-wrap-full {
  min-height: 900px;
}

#powerBiFrame,
#categoryPowerBiFrame {
  border: none;
  border-radius: 22px;
  background: #0f1419;
}

.powerbi-placeholder {
  position: absolute;
  inset: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: linear-gradient(135deg, #202831, #121920);
  border: 1px dashed rgba(149, 209, 69, 0.25);
}

.placeholder-box {
  text-align: center;
  max-width: 460px;
  padding: 24px;
}

.section-header {
  padding: 18px 20px 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.section-header h2 {
  margin: 0;
  font-size: 20px;
}

.section-header p {
  margin: 5px 0 0 0;
  font-size: 13px;
  color: var(--muted);
}

.section-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: #26303a;
}

.check-pill input {
  accent-color: var(--green);
}

.filters-bar {
  padding: 0 20px 16px 20px;
  display: grid;
  grid-template-columns: 1.35fr 220px 1fr;
  gap: 12px;
}

.search-group__controls {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: nowrap;
}

.search-group {
  min-width: 0;
}

.search-group__controls input {
  flex: 1 1 auto;
  min-width: 0;
}

.search-group__controls .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-size: 13px;
  color: var(--muted);
}

.axis-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.axis-chip {
  height: 40px;
  min-width: 54px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: #2b3540;
  color: white;
  cursor: pointer;
  font-weight: 700;
}

.axis-chip-s,
.axis-select-s,
.axis-text-s {
  color: var(--axis-s);
}

.axis-chip-q,
.axis-select-q,
.axis-text-q {
  color: var(--axis-q);
}

.axis-chip-c,
.axis-select-c,
.axis-text-c {
  color: var(--axis-c);
}

.axis-chip-m,
.axis-select-m,
.axis-text-m {
  color: var(--axis-m);
}

.axis-chip-d,
.axis-select-d,
.axis-text-d {
  color: var(--axis-d);
}

.axis-chip-p,
.axis-select-p,
.axis-text-p {
  color: var(--axis-p);
}

.axis-chip-s.active {
  background: rgba(46, 160, 67, 0.18);
  border-color: rgba(46, 160, 67, 0.45);
}

.axis-chip-q.active {
  background: rgba(47, 129, 247, 0.18);
  border-color: rgba(47, 129, 247, 0.45);
}

.axis-chip-c.active {
  background: rgba(243, 156, 18, 0.18);
  border-color: rgba(243, 156, 18, 0.45);
}

.axis-chip-m.active {
  background: rgba(243, 156, 18, 0.18);
  border-color: rgba(243, 156, 18, 0.45);
}

.axis-chip-d.active {
  background: rgba(224, 49, 49, 0.18);
  border-color: rgba(224, 49, 49, 0.45);
}

.axis-chip-p.active {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.45);
}

.table-wrap {
  padding: 0 20px 18px 20px;
  overflow: auto;
}

.actions-table {
  width: 100%;
  min-width: 1760px;
  border-collapse: separate;
  border-spacing: 0;
}

.actions-table thead th {
  position: sticky;
  top: 0;
  background: #1c242d;
  color: #eef5ff;
  text-align: left;
  padding: 12px 10px;
  font-size: 13px;
  border-bottom: 1px solid var(--line-soft);
  z-index: 2;
}

#tableWrap[data-axis-theme="S"] .actions-table thead th {
  background: linear-gradient(180deg, rgba(46, 160, 67, 0.9), rgba(34, 117, 50, 0.92));
}

#tableWrap[data-axis-theme="Q"] .actions-table thead th {
  background: linear-gradient(180deg, rgba(47, 129, 247, 0.9), rgba(34, 94, 180, 0.92));
}

#tableWrap[data-axis-theme="C"] .actions-table thead th {
  background: linear-gradient(180deg, rgba(243, 156, 18, 0.9), rgba(182, 113, 10, 0.92));
}

#tableWrap[data-axis-theme="M"] .actions-table thead th {
  background: linear-gradient(180deg, rgba(243, 156, 18, 0.9), rgba(182, 113, 10, 0.92));
}

#tableWrap[data-axis-theme="D"] .actions-table thead th {
  background: linear-gradient(180deg, rgba(224, 49, 49, 0.9), rgba(153, 31, 31, 0.92));
}

#tableWrap[data-axis-theme="P"] .actions-table thead th {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.9), rgba(117, 54, 184, 0.92));
}

.actions-table tbody tr:nth-child(odd) {
  background: #2a323c;
}

.actions-table tbody tr:nth-child(even) {
  background: #313a45;
}

.actions-table tbody td {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.col-action {
  min-width: 460px;
}

.col-comment {
  min-width: 420px;
}

.row-danger {
  background: rgba(217, 83, 79, 0.18) !important;
}

.row-done {
  background: rgba(73, 182, 117, 0.2) !important;
}

.priority-critique {
  background: rgba(255, 77, 79, 0.22) !important;
  border-color: rgba(255, 77, 79, 0.55) !important;
  color: #ffd8d8 !important;
}

.priority-haute {
  background: rgba(166, 59, 61, 0.22) !important;
  border-color: rgba(166, 59, 61, 0.55) !important;
  color: #ffd6d6 !important;
}

.priority-moyenne {
  background: rgba(255, 179, 71, 0.22) !important;
  border-color: rgba(255, 179, 71, 0.55) !important;
  color: #ffe6bf !important;
}

.priority-basse {
  background: rgba(73, 182, 117, 0.22) !important;
  border-color: rgba(73, 182, 117, 0.55) !important;
  color: #d6ffe7 !important;
}

.status-a-faire {
  border-color: rgba(246, 166, 35, 0.55) !important;
  color: #ffd37f;
}

.deadline-today {
  background: rgba(224, 49, 49, 0.25) !important;
  border-color: rgba(224, 49, 49, 0.65) !important;
  color: #ffe3e3 !important;
}

.deadline-late {
  background: rgba(166, 59, 61, 0.25) !important;
  border-color: rgba(166, 59, 61, 0.55) !important;
  color: #ffd6d6 !important;
}

.delete-btn {
  background: rgba(217, 83, 79, 0.18);
  border: 1px solid rgba(217, 83, 79, 0.28);
  color: white;
  border-radius: 12px;
  height: 38px;
  padding: 0 12px;
  cursor: pointer;
}

.bottom-kpis {
  border-top: 1px solid var(--line-soft);
  padding: 16px 20px 20px 20px;
  display: grid;
  grid-template-columns: repeat(5, 120px) 1fr;
  gap: 12px;
  align-items: stretch;
}

.mini-kpi {
  background: #222b35;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 12px;
}

.mini-kpi span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.mini-kpi strong {
  font-size: 24px;
}

.summary-inline {
  background: #222b35;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  color: #dbe7ff;
  font-size: 13px;
}

.summary-inline-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: stretch;
}

.sqcdp-inline-counters {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.sqcdp-letter-box {
  min-width: 74px;
  background: #222b35;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.axis-box-s {
  border-color: rgba(46, 160, 67, 0.35);
}

.axis-box-q {
  border-color: rgba(47, 129, 247, 0.35);
}

.axis-box-c {
  border-color: rgba(243, 156, 18, 0.35);
}

.axis-box-m {
  border-color: rgba(243, 156, 18, 0.35);
}

.actions-table .sqcdp-col--escalate {
  width: 148px;
  min-width: 148px;
}

.sqcdp-escalate-btn {
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.sqcdp-escalate-btn.is-escalated {
  background: rgba(178, 106, 35, 0.44);
  border-color: rgba(236, 177, 114, 0.45);
  color: #fff0d6;
}

.row-escalated td {
  background: rgba(129, 82, 24, 0.16) !important;
}

.context-parent-select {
  min-width: 180px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #111821;
  color: #edf5ff;
  padding: 0 12px;
}

.context-create-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
}

.context-create-card__header {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.context-create-card__header strong {
  font-size: 15px;
}

.context-create-card__header span {
  color: var(--muted);
  font-size: 13px;
}

.context-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, 220px) auto;
  gap: 10px;
  align-items: center;
}

.axis-box-d {
  border-color: rgba(224, 49, 49, 0.35);
}

.axis-box-p {
  border-color: rgba(168, 85, 247, 0.35);
}

.sqcdp-letter {
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
  margin-bottom: 6px;
}

.sqcdp-letter-box strong {
  font-size: 22px;
  line-height: 1;
}

.actions-table .sqcdp-col--dateOuverture {
  width: 132px;
  min-width: 132px;
}

.actions-table .sqcdp-col--categorie {
  width: 154px;
  min-width: 154px;
}

.actions-table .sqcdp-col--axe {
  width: 92px;
  min-width: 92px;
}

.actions-table .sqcdp-col--action {
  width: 360px;
  min-width: 360px;
}

.actions-table .sqcdp-col--responsable {
  width: 138px;
  min-width: 138px;
}

.actions-table .sqcdp-col--priorite {
  width: 124px;
  min-width: 124px;
}

.actions-table .sqcdp-col--statut {
  width: 122px;
  min-width: 122px;
}

.actions-table .sqcdp-col--echeance {
  width: 132px;
  min-width: 132px;
}

.actions-table .sqcdp-col--avancement {
  width: 84px;
  min-width: 84px;
}

.actions-table .sqcdp-col--commentaire {
  width: 390px;
  min-width: 390px;
}

.actions-table .sqcdp-col--delete {
  width: 96px;
  min-width: 96px;
}

.actions-table .sqcdp-cell:focus-within {
  background: rgba(17, 26, 39, 0.72);
  box-shadow: inset 0 0 0 1px rgba(149, 209, 69, 0.2);
}

.actions-table .sqcdp-cell:focus-within input,
.actions-table .sqcdp-cell:focus-within select,
.actions-table .sqcdp-cell:focus-within textarea {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 14px 32px rgba(0, 0, 0, 0.26);
  transform: translateY(-1px);
}

.actions-table .sqcdp-cell:focus-within .sqcdp-textarea--action {
  min-height: 90px;
}

.actions-table .sqcdp-cell:focus-within .sqcdp-textarea--commentaire {
  min-height: 124px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 18, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal-overlay.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.modal-card {
  width: min(920px, 100%);
  max-height: calc(100vh - 40px);
  background: #202830;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal-card-wide {
  width: min(1120px, 100%);
}

.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-header h3 {
  margin: 0;
}

.modal-header p {
  margin: 6px 0 0 0;
  color: var(--muted);
  font-size: 13px;
}

.modal-body {
  padding: 20px;
}

.modal-body-scroll {
  overflow-y: auto;
  max-height: calc(100vh - 150px);
}

.modal-body label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.settings-block {
  margin-bottom: 16px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.split-actions {
  justify-content: flex-start;
}

.shortcut-actions {
  justify-content: space-between;
}

textarea {
  min-height: 160px;
}

.category-list-manager {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-manager-row {
  background: #1b2430;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.category-manager-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-manager-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #2b3540;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.category-manager-icon svg,
.menu-tile-icon svg,
.edge-nav__item-badge svg {
  width: 24px;
  height: 24px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-tile-icon--rich svg {
  width: 30px;
  height: 30px;
}

.category-manager-icon--rich svg {
  width: 22px;
  height: 22px;
}

.category-icon-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.category-manager-texts {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-manager-texts strong {
  font-size: 15px;
}

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

.category-manager-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.shortcuts-card {
  padding: 18px 20px 20px 20px;
}

.shortcuts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.shortcuts-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.shortcuts-header h2 {
  margin: 0;
  font-size: 20px;
}

.shortcuts-header p {
  margin: 5px 0 0 0;
  color: var(--muted);
  font-size: 13px;
}

.compact-field {
  min-width: 220px;
}

.compact-field input,
.compact-field select {
  min-width: 220px;
}

.my-actions-date-tools {
  display: flex;
  align-items: end;
  gap: 10px;
}

.category-table-wrap {
  margin-top: 10px;
}

.empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 18px 12px;
}

.my-actions-table-wrap {
  padding-top: 4px;
}

.my-actions-table {
  min-width: 1180px;
}

.my-actions-table thead th {
  background: linear-gradient(180deg, #202a34, #1a232d);
}

.my-actions-table tbody tr:nth-child(odd) {
  background: rgba(34, 43, 53, 0.86);
}

.my-actions-table tbody tr:nth-child(even) {
  background: rgba(28, 36, 45, 0.9);
}

.my-actions-table td {
  vertical-align: middle;
}

.my-actions-cell-title strong {
  display: block;
  color: #f4f8ff;
  font-size: 14px;
  line-height: 1.35;
}

.my-actions-cell-comment {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.my-actions-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.my-actions-badge.source-sqcdp {
  background: rgba(149, 209, 69, 0.18);
  color: #dff4be;
  border-color: rgba(149, 209, 69, 0.28);
}

.my-actions-badge.source-category {
  background: rgba(79, 140, 255, 0.16);
  color: #d9e8ff;
  border-color: rgba(79, 140, 255, 0.26);
}

.my-actions-badge.source-qrqc {
  background: rgba(239, 68, 68, 0.16);
  color: #ffd8d8;
  border-color: rgba(239, 68, 68, 0.28);
}

.my-actions-badge.priority-critique,
.my-actions-badge.priority-haute {
  background: rgba(224, 49, 49, 0.16);
  color: #ffd9d9;
  border-color: rgba(224, 49, 49, 0.24);
}

.my-actions-badge.priority-moyenne {
  background: rgba(243, 156, 18, 0.16);
  color: #ffe2b4;
  border-color: rgba(243, 156, 18, 0.24);
}

.my-actions-badge.priority-basse {
  background: rgba(46, 160, 67, 0.16);
  color: #d7f5de;
  border-color: rgba(46, 160, 67, 0.24);
}

.my-actions-badge.status-à-faire,
.my-actions-badge.status-a-faire {
  background: rgba(243, 156, 18, 0.14);
  color: #ffe2b4;
  border-color: rgba(243, 156, 18, 0.22);
}

.my-actions-badge.status-en-cours {
  background: rgba(79, 140, 255, 0.16);
  color: #d9e8ff;
  border-color: rgba(79, 140, 255, 0.24);
}

.my-actions-badge.status-bloqué,
.my-actions-badge.status-bloque {
  background: rgba(224, 49, 49, 0.16);
  color: #ffd8d8;
  border-color: rgba(224, 49, 49, 0.24);
}

.my-actions-badge.status-terminé,
.my-actions-badge.status-termine {
  background: rgba(46, 160, 67, 0.16);
  color: #d7f5de;
  border-color: rgba(46, 160, 67, 0.24);
}

/* Sous-groupes et formulaires utilisent la même grille de cartes cliquables. */
.shortcut-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

/* ── Hub shortcut cards (redesign) ───────────────────── */
.shortcut-list--hub {
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.sg-hub-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(140deg, rgba(20, 30, 48, 0.97), rgba(12, 20, 34, 0.97));
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.sg-hub-card:hover {
  transform: translateY(-3px);
  border-color: rgba(149, 209, 69, 0.35);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(149, 209, 69, 0.1);
}

.sg-hub-card:hover .sg-hub-card__arrow {
  opacity: 1;
  transform: translateX(2px);
  color: #95d145;
}

.sg-hub-card__glow {
  position: absolute;
  top: -30px;
  left: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  opacity: 0.1;
  filter: blur(28px);
  pointer-events: none;
}

.sg-hub-card__icon {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.sg-hub-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sg-hub-card__title {
  font-size: 16px;
  font-weight: 700;
  color: #f0f6ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sg-hub-card:hover .sg-hub-card__title {
  color: #c8ff9a;
}

.sg-hub-card__sub {
  font-size: 12px;
  color: #8fa0b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sg-hub-card__arrow {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: #4a607a;
  opacity: 0.6;
  transition: opacity 0.18s, transform 0.18s, color 0.18s;
}

.sg-hub-card__arrow svg {
  width: 100%;
  height: 100%;
}

/* Editable section title */
.shortcut-section-editable-title {
  cursor: pointer;
  transition: color 0.14s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.shortcut-section-editable-title::after {
  content: "✏";
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.14s;
}

.shortcut-section-editable-title:hover {
  color: #c8ff9a;
}

.shortcut-section-editable-title:hover::after {
  opacity: 0.6;
}

.shortcut-section-title-input {
  font-size: inherit;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(149, 209, 69, 0.4);
  border-radius: 8px;
  color: #f0f6ff;
  padding: 2px 10px;
  outline: none;
  min-width: 160px;
}

.shortcut-list--settings {
  grid-template-columns: 1fr;
}

.shortcut-row {
  background: #1b2430;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.shortcut-row--card {
  min-height: 170px;
  align-items: stretch;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  background: linear-gradient(180deg, rgba(27, 36, 48, 0.96), rgba(20, 28, 39, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  text-align: left;
  color: inherit;
}

.shortcut-row--hub {
  min-height: 200px;
  justify-content: center;
  border-color: rgba(143, 225, 90, 0.18);
  background:
    radial-gradient(circle at 18% 18%, rgba(143, 225, 90, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(17, 26, 38, 0.98), rgba(12, 19, 29, 0.98));
}

.shortcut-row--hub:hover {
  border-color: rgba(143, 225, 90, 0.34);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.shortcut-row--card.is-active {
  border-color: rgba(149, 209, 69, 0.42);
  box-shadow: 0 0 0 1px rgba(149, 209, 69, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.shortcut-row--manager {
  min-height: 0;
  background: linear-gradient(180deg, rgba(18, 27, 38, 0.96), rgba(14, 21, 31, 0.98));
}

.shortcut-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.shortcut-main--card {
  width: 100%;
  min-height: 108px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.shortcut-card-icon {
  width: 74px;
  height: 74px;
  flex-shrink: 0;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.shortcut-card-icon svg {
  display: block;
  width: 40px;
  height: 40px;
  filter:
    saturate(1.18)
    brightness(1.12)
    contrast(1.08)
    drop-shadow(0 3px 8px rgba(0, 0, 0, 0.26));
}

.shortcut-card-icon .category-icon-text {
  font-size: 22px;
}

.shortcut-main--card:hover strong {
  color: #c8ff9a;
}

.shortcut-main--card strong {
  font-size: 18px;
  color: #f7fbff;
}

.shortcut-main--card span {
  white-space: normal;
  line-height: 1.45;
  font-size: 12px;
}

.shortcut-row--hub .shortcut-main--card > strong {
  font-size: 16px;
  line-height: 1.3;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.shortcut-row--hub .shortcut-main--card > span:not(.shortcut-card-icon) {
  font-size: 13px;
  color: #b8c8d8;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.shortcut-main strong,
.shortcut-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.shortcut-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.shortcut-empty {
  background: #1b2430;
  border: 1px dashed var(--line-soft);
  border-radius: 16px;
  padding: 16px;
  color: var(--muted);
  grid-column: 1 / -1;
}

/* QRQC */

.qrqc-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qrqc-kpis-card,
.qrqc-case-card,
.qrqc-visual-card,
.qrqc-actions-card {
  overflow: hidden;
}

.qrqc-kpis-card {
  padding: 18px 20px 20px 20px;
}

.qrqc-kpis-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.qrqc-case-grid {
  padding: 0 20px 8px 20px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.qrqc-description-block {
  margin: 0 20px 20px 20px;
}

#qrqcDescriptionInput {
  min-height: 120px;
}

.qrqc-milestone-cards {
  padding: 0 20px 18px 20px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.qrqc-milestone-card {
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  background: #202934;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qrqc-milestone-card-ok {
  box-shadow: inset 0 0 0 1px rgba(46, 160, 67, 0.12);
}

.qrqc-milestone-card-late {
  background: rgba(166, 59, 61, 0.18);
  border-color: rgba(255, 77, 79, 0.3);
}

.qrqc-milestone-card-overflow {
  background: linear-gradient(180deg, rgba(47, 129, 247, 0.18), rgba(47, 129, 247, 0.08));
  border-color: rgba(47, 129, 247, 0.34);
}

.qrqc-milestone-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.qrqc-milestone-top strong {
  font-size: 18px;
}

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

.qrqc-milestone-date {
  font-size: 24px;
  font-weight: 800;
  color: #f4f8fd;
}

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

.qrqc-timeline-wrap {
  padding: 0 20px 20px 20px;
  overflow-x: auto;
}

.qrqc-timeline-head,
.qrqc-timeline-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  align-items: stretch;
}

.qrqc-timeline-head {
  margin-bottom: 10px;
}

.qrqc-timeline-row {
  margin-bottom: 10px;
}

.qrqc-timeline-label {
  background: #1c242d;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 12px;
  min-height: 62px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.qrqc-timeline-label strong {
  font-size: 15px;
}

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

.qrqc-timeline-grid {
  min-width: 960px;
  display: grid;
  grid-template-columns: repeat(30, minmax(28px, 1fr));
  gap: 6px;
}

.qrqc-timeline-grid-overflow {
  min-width: 960px;
}

.qrqc-day-head,
.qrqc-timeline-cell {
  min-height: 62px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.qrqc-day-head {
  min-height: 44px;
  background: #1c242d;
  color: #dfe8f4;
  font-size: 12px;
  font-weight: 700;
}

.qrqc-day-head-current {
  border-color: rgba(47, 129, 247, 0.55);
  box-shadow: inset 0 0 0 1px rgba(47, 129, 247, 0.3);
}

.qrqc-timeline-cell {
  padding: 4px;
  flex-wrap: wrap;
  gap: 4px;
}

.qrqc-timeline-cell-overflow {
  grid-column: 1 / -1;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(47, 129, 247, 0.16), rgba(47, 129, 247, 0.08));
}

.qrqc-timeline-cell-green {
  background: linear-gradient(180deg, rgba(46, 160, 67, 0.16), rgba(46, 160, 67, 0.08));
}

.qrqc-timeline-cell-red {
  background: linear-gradient(180deg, rgba(224, 49, 49, 0.16), rgba(224, 49, 49, 0.08));
}

.qrqc-timeline-cell-current {
  outline: 2px solid rgba(255, 255, 255, 0.22);
  outline-offset: -2px;
}

.qrqc-action-badge {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.qrqc-action-badge-open {
  background: #2f81f7;
}

.qrqc-action-badge-done {
  background: #2ea043;
}

.qrqc-action-badge-late {
  background: #e03131;
}

.qrqc-overflow-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #16202b;
  color: #f4f8fd;
  padding: 6px 10px 6px 6px;
  cursor: pointer;
}.qrqc-timeline-grid-31 {
  grid-template-columns: repeat(31, minmax(28px, 1fr));
  min-width: 1040px;
}

.qrqc-day-head-overflow {
  background: linear-gradient(180deg, rgba(224, 49, 49, 0.22), rgba(224, 49, 49, 0.1));
}

.qrqc-row-soon {
  box-shadow: inset 4px 0 0 0 rgba(245, 159, 0, 0.75);
}

.qrqc-table-toolbar {
  flex-wrap: wrap;
}

.qrqc-date-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qrqc-date-stack-inline {
  display: flex;
  gap: 6px;
  align-items: center;
}

.qrqc-date-compact,
.qrqc-mini-input,
.qrqc-date-stack input {
  min-width: 108px;
}

.qrqc-ok-btn {
  padding: 6px 10px;
}

.qrqc-rich-editor {
  min-height: 54px;
  max-height: 76px;
  overflow: hidden;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: #121922;
  color: #f4f8fd;
  line-height: 1.35;
}

.qrqc-rich-editor.is-expanded,
.qrqc-rich-editor:focus {
  min-height: 160px;
  max-height: 340px;
  overflow: auto;
  outline: 2px solid rgba(47, 129, 247, 0.25);
}

.qrqc-rich-editor-problem {
  min-width: 260px;
}

.qrqc-rich-editor-actions {
  min-width: 390px;
}

.qrqc-stage-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.qrqc-stage-pill-open {
  background: rgba(47, 129, 247, 0.16);
  color: #d7e7ff;
}

.qrqc-stage-pill-late {
  background: rgba(224, 49, 49, 0.18);
  color: #ffd7d7;
}

.qrqc-stage-pill-done {
  background: rgba(46, 160, 67, 0.18);
  color: #d6f5df;
}

.qrqc-actions-table-template {
  min-width: 2550px;
}

.qrqc-actions-table-template textarea {
  min-height: 88px;
}

.qrqc-actions-table-template th:nth-child(1),
.qrqc-actions-table-template td:nth-child(1) {
  min-width: 52px;
}

.qrqc-actions-table-template th:nth-child(2),
.qrqc-actions-table-template td:nth-child(2),
.qrqc-actions-table-template th:nth-child(4),
.qrqc-actions-table-template td:nth-child(4),
.qrqc-actions-table-template th:nth-child(5),
.qrqc-actions-table-template td:nth-child(5),
.qrqc-actions-table-template th:nth-child(6),
.qrqc-actions-table-template td:nth-child(6),
.qrqc-actions-table-template th:nth-child(7),
.qrqc-actions-table-template td:nth-child(7),
.qrqc-actions-table-template th:nth-child(14),
.qrqc-actions-table-template td:nth-child(14) {
  min-width: 94px;
}

.qrqc-actions-table-template th:nth-child(3),
.qrqc-actions-table-template td:nth-child(3) {
  min-width: 170px;
}

.qrqc-actions-table-template th:nth-child(8),
.qrqc-actions-table-template td:nth-child(8) {
  min-width: 90px;
}

.qrqc-actions-table-template th:nth-child(9),
.qrqc-actions-table-template td:nth-child(9),
.qrqc-actions-table-template th:nth-child(12),
.qrqc-actions-table-template td:nth-child(12),
.qrqc-actions-table-template th:nth-child(13),
.qrqc-actions-table-template td:nth-child(13) {
  min-width: 170px;
}

.qrqc-actions-table-template .col-problem,
.qrqc-actions-table-template td:nth-child(10) {
  min-width: 280px;
}

.qrqc-actions-table-template .col-action,
.qrqc-actions-table-template td:nth-child(11) {
  min-width: 420px;
}

.qrqc-summary-board {
  margin: 16px 20px 20px 20px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line-soft);
  background: #1b2430;
}

.qrqc-summary-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 14px;
}

.qrqc-summary-header h3 {
  margin: 0;
  font-size: 18px;
}

.qrqc-summary-header p,
.qrqc-summary-total {
  margin: 4px 0 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.qrqc-summary-card {
  border-radius: 16px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  background: #202934;
}

.qrqc-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.qrqc-summary-card strong {
  display: block;
  font-size: 28px;
  margin-bottom: 10px;
}

.qrqc-summary-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.qrqc-summary-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #2f81f7;
}

.qrqc-summary-card-danger .qrqc-summary-bar i {
  background: #e03131;
}

.qrqc-summary-card-done .qrqc-summary-bar i {
  background: #2ea043;
}

.qrqc-summary-card-warning .qrqc-summary-bar i {
  background: #f59f00;
}
.qrqc-actions-table {
  min-width: 1700px;
}

.qrqc-actions-table th:nth-child(1),
.qrqc-actions-table td:nth-child(1) {
  min-width: 60px;
}

.qrqc-actions-table th:nth-child(2),
.qrqc-actions-table td:nth-child(2) {
  min-width: 120px;
}

.qrqc-actions-table th:nth-child(3),
.qrqc-actions-table td:nth-child(3),
.qrqc-actions-table th:nth-child(4),
.qrqc-actions-table td:nth-child(4) {
  min-width: 130px;
}

.qrqc-actions-table th:nth-child(6),
.qrqc-actions-table td:nth-child(6) {
  min-width: 150px;
}

.qrqc-actions-table th:nth-child(7),
.qrqc-actions-table td:nth-child(7),
.qrqc-actions-table th:nth-child(8),
.qrqc-actions-table td:nth-child(8) {
  min-width: 130px;
}

.qrqc-actions-table th:nth-child(9),
.qrqc-actions-table td:nth-child(9) {
  min-width: 90px;
}

.qrqc-row-late {
  box-shadow: inset 4px 0 0 0 rgba(255, 77, 79, 0.75);
}

.qrqc-row-focus {
  animation: qrqcRowPulse 1.2s ease;
}

@keyframes qrqcRowPulse {
  0% {
    box-shadow: inset 0 0 0 0 rgba(47, 129, 247, 0.75);
  }
  25% {
    box-shadow: inset 0 0 0 9999px rgba(47, 129, 247, 0.12);
  }
  100% {
    box-shadow: inset 0 0 0 0 rgba(47, 129, 247, 0);
  }
}
@media (max-width: 1450px) {
  .menu-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .qrqc-kpis-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .qrqc-milestone-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .home-global-kpis {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .bottom-kpis {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .qrqc-kpis-grid,
  .qrqc-milestone-cards,
  .qrqc-case-grid {
    grid-template-columns: 1fr;
  }

  .qrqc-timeline-head,
  .qrqc-timeline-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero,
  .topbar,
  .category-manager-row,
  .shortcut-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-left,
  .topbar-right,
  .title-wrap {
    flex-wrap: wrap;
  }

  .filters-bar,
  .summary-inline-wrap {
    grid-template-columns: 1fr;
  }

  .sqcdp-inline-counters {
    flex-wrap: wrap;
  }

  .qrqc-kpis-grid,
  .home-global-kpis {
    grid-template-columns: 1fr;
  }
}








.qrqc-overflow-chip {
  cursor: pointer;
}

.qrqc-timeline-grid-31 {
  grid-template-columns: repeat(31, minmax(28px, 1fr));
  min-width: 1040px;
}

.qrqc-date-compact,
.qrqc-mini-input,
.qrqc-date-stack input {
  min-width: 0;
  width: 100%;
}

.qrqc-rich-editor-problem {
  min-width: 220px;
}

.qrqc-rich-editor-actions {
  min-width: 300px;
}

.qrqc-actions-table-template {
  min-width: 2080px;
  table-layout: fixed;
}

.qrqc-actions-table-template td {
  vertical-align: top;
}

.qrqc-actions-table-template th:nth-child(2),
.qrqc-actions-table-template td:nth-child(2),
.qrqc-actions-table-template th:nth-child(4),
.qrqc-actions-table-template td:nth-child(4),
.qrqc-actions-table-template th:nth-child(5),
.qrqc-actions-table-template td:nth-child(5),
.qrqc-actions-table-template th:nth-child(6),
.qrqc-actions-table-template td:nth-child(6),
.qrqc-actions-table-template th:nth-child(7),
.qrqc-actions-table-template td:nth-child(7),
.qrqc-actions-table-template th:nth-child(14),
.qrqc-actions-table-template td:nth-child(14) {
  min-width: 94px;
}

.qrqc-actions-table-template th:nth-child(3),
.qrqc-actions-table-template td:nth-child(3) {
  min-width: 150px;
}

.qrqc-actions-table-template th:nth-child(8),
.qrqc-actions-table-template td:nth-child(8) {
  min-width: 72px;
}

.qrqc-actions-table-template th:nth-child(9),
.qrqc-actions-table-template td:nth-child(9),
.qrqc-actions-table-template th:nth-child(12),
.qrqc-actions-table-template td:nth-child(12),
.qrqc-actions-table-template th:nth-child(13),
.qrqc-actions-table-template td:nth-child(13) {
  min-width: 132px;
}

.qrqc-actions-table-template .col-problem,
.qrqc-actions-table-template td:nth-child(10) {
  min-width: 230px;
}

.qrqc-actions-table-template .col-action,
.qrqc-actions-table-template td:nth-child(11) {
  min-width: 320px;
}

.qrqc-actions-table-template th:nth-child(14),
.qrqc-actions-table-template td:nth-child(14) {
  position: sticky;
  right: 52px;
  z-index: 2;
  background: #18212b;
}

.qrqc-actions-table-template th:nth-child(15),
.qrqc-actions-table-template td:nth-child(15) {
  position: sticky;
  right: 0;
  z-index: 3;
  min-width: 52px;
  width: 52px;
  background: #18212b;
}

.qrqc-visual-card .section-header p,
.qrqc-actions-card .section-header p {
  max-width: 620px;
}

.qrqc-milestone-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 20px 22px;
}

.qrqc-milestone-card {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(120, 146, 170, 0.34);
  background: linear-gradient(180deg, rgba(29, 41, 56, 0.96), rgba(22, 31, 43, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.qrqc-milestone-card-ok {
  border-color: rgba(90, 138, 154, 0.55);
}

.qrqc-milestone-card-late,
.qrqc-milestone-card-overflow {
  border-color: rgba(157, 82, 92, 0.6);
}

.qrqc-milestone-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.qrqc-milestone-top strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.qrqc-milestone-top span {
  font-size: 13px;
  color: #b8cae0;
}

.qrqc-milestone-date {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.qrqc-milestone-meta {
  font-size: 13px;
  color: #b7c4d3;
}

.qrqc-timeline-wrap {
  margin: 0 20px 20px;
  padding: 12px;
  border-radius: 22px;
  border: 1px solid rgba(100, 124, 147, 0.26);
  background: linear-gradient(180deg, rgba(24, 34, 47, 0.96), rgba(17, 24, 34, 0.98));
  overflow-x: auto;
}

.qrqc-timeline-head,
.qrqc-timeline-row {
  display: grid;
  grid-template-columns: 160px minmax(1080px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.qrqc-timeline-head {
  margin-bottom: 12px;
}

.qrqc-timeline-rows {
  display: grid;
  gap: 10px;
}

.qrqc-timeline-label {
  min-height: 72px;
  padding: 14px 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(95, 118, 144, 0.3);
  background: linear-gradient(180deg, rgba(24, 36, 50, 0.98), rgba(20, 30, 42, 0.98));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.qrqc-timeline-label-head {
  justify-content: center;
}

.qrqc-timeline-label strong {
  font-size: 14px;
}

.qrqc-timeline-label span {
  font-size: 12px;
  color: #b8c7d8;
}

.qrqc-timeline-grid,
.qrqc-timeline-grid-31 {
  min-width: 1080px;
  display: grid;
  grid-template-columns: repeat(31, minmax(46px, 1fr));
  gap: 8px;
}

.qrqc-day-head {
  min-height: 60px;
  border-radius: 16px;
  border: 1px solid rgba(98, 121, 146, 0.34);
  background: linear-gradient(180deg, rgba(23, 34, 48, 0.98), rgba(20, 31, 43, 0.98));
  color: #eef5ff;
  font-size: 18px;
  font-weight: 800;
}

.qrqc-day-head-overflow {
  background: linear-gradient(180deg, rgba(58, 37, 46, 0.95), rgba(78, 34, 42, 0.9));
}

.qrqc-day-head-current {
  border-color: rgba(59, 130, 246, 0.7);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.45);
}

.qrqc-timeline-cell {
  min-height: 188px;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 8px 6px;
  gap: 6px;
  border-radius: 16px;
  border: 1px solid rgba(98, 121, 146, 0.34);
}

.qrqc-timeline-cell-green {
  background: linear-gradient(180deg, rgba(24, 67, 54, 0.78), rgba(24, 56, 47, 0.56));
}

.qrqc-timeline-cell-red {
  background: linear-gradient(180deg, rgba(72, 37, 48, 0.78), rgba(61, 33, 43, 0.58));
}

.qrqc-timeline-cell-overflow {
  align-items: flex-start;
  justify-content: flex-start;
  padding: 10px;
}

.qrqc-action-badge {
  width: 26px;
  height: 26px;
  font-size: 12px;
  box-shadow: 0 8px 16px rgba(8, 15, 25, 0.26);
}

.qrqc-overflow-chip {
  gap: 10px;
  padding: 8px 12px 8px 8px;
  background: rgba(13, 20, 30, 0.86);
}

.qrqc-table-toolbar {
  align-items: center;
  gap: 10px;
}

.qrqc-table-toolbar .context-select,
.qrqc-table-toolbar input[type="date"] {
  min-height: 42px;
}

.qrqc-actions-card .table-wrap {
  margin: 0 20px;
  border-radius: 20px;
  border: 1px solid rgba(100, 124, 147, 0.24);
  background: rgba(20, 29, 41, 0.82);
  overflow: auto;
}

.qrqc-actions-table-template {
  min-width: 2340px;
  width: 2340px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.qrqc-actions-table-template thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 14px 12px;
  background: linear-gradient(180deg, rgba(20, 30, 43, 0.98), rgba(17, 26, 37, 0.98));
  font-size: 12px;
  line-height: 1.2;
  text-transform: none;
}

.qrqc-actions-table-template tbody td {
  padding: 10px 10px 12px;
  background: rgba(44, 56, 72, 0.9);
  border-top: 1px solid rgba(96, 114, 134, 0.18);
  vertical-align: top;
  overflow: hidden;
}

.qrqc-actions-table-template tbody tr:nth-child(even) td {
  background: rgba(50, 62, 78, 0.92);
}

.qrqc-actions-table-template tbody tr:hover td {
  background: rgba(58, 72, 91, 0.96);
}

.qrqc-actions-table-template th:nth-child(1),
.qrqc-actions-table-template td:nth-child(1) { width: 54px; min-width: 54px; }
.qrqc-actions-table-template th:nth-child(2),
.qrqc-actions-table-template td:nth-child(2) { width: 146px; min-width: 146px; }
.qrqc-actions-table-template th:nth-child(3),
.qrqc-actions-table-template td:nth-child(3) { width: 144px; min-width: 144px; }
.qrqc-actions-table-template th:nth-child(4),
.qrqc-actions-table-template td:nth-child(4),
.qrqc-actions-table-template th:nth-child(5),
.qrqc-actions-table-template td:nth-child(5),
.qrqc-actions-table-template th:nth-child(6),
.qrqc-actions-table-template td:nth-child(6),
.qrqc-actions-table-template th:nth-child(7),
.qrqc-actions-table-template td:nth-child(7) { width: 134px; min-width: 134px; }
.qrqc-actions-table-template th:nth-child(8),
.qrqc-actions-table-template td:nth-child(8) { width: 98px; min-width: 98px; }
.qrqc-actions-table-template th:nth-child(9),
.qrqc-actions-table-template td:nth-child(9) { width: 146px; min-width: 146px; }
.qrqc-actions-table-template th:nth-child(10),
.qrqc-actions-table-template td:nth-child(10) { width: 148px; min-width: 148px; }
.qrqc-actions-table-template th:nth-child(11),
.qrqc-actions-table-template td:nth-child(11) { width: 176px; min-width: 176px; }
.qrqc-actions-table-template th:nth-child(12),
.qrqc-actions-table-template td:nth-child(12) { width: 110px; min-width: 110px; }
.qrqc-actions-table-template th:nth-child(13),
.qrqc-actions-table-template td:nth-child(13) { width: 146px; min-width: 146px; }
.qrqc-actions-table-template th:nth-child(14),
.qrqc-actions-table-template td:nth-child(14) { width: 120px; min-width: 120px; position: static; }
.qrqc-actions-table-template th:nth-child(15),
.qrqc-actions-table-template td:nth-child(15) { width: 84px; min-width: 84px; position: static; }

.qrqc-actions-table-template input,
.qrqc-actions-table-template select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.qrqc-date-stack {
  gap: 8px;
}

.qrqc-date-stack > input {
  text-align: center;
  font-weight: 700;
}

.qrqc-date-stack-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 6px;
  align-items: center;
}

.qrqc-ok-btn {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
}

.qrqc-stage-pill {
  width: 100%;
  min-height: 38px;
  justify-content: center;
  text-align: center;
  padding: 8px 10px;
  white-space: normal;
}

.qrqc-rich-editor {
  display: block;
  width: 100%;
  min-height: 110px;
  max-height: 110px;
  box-sizing: border-box;
  font-weight: 700;
}

.qrqc-rich-editor.is-expanded,
.qrqc-rich-editor:focus {
  min-height: 180px;
  max-height: 340px;
}

.qrqc-rich-editor-problem,
.qrqc-rich-editor-actions {
  min-width: 0;
}

.qrqc-actions-table-template td:nth-child(12) select,
.qrqc-actions-table-template td:nth-child(13) input,
.qrqc-actions-table-template td:nth-child(14) input {
  min-height: 42px;
}

.qrqc-summary-board {
  margin-top: 18px;
}

@media (max-width: 1200px) {
  .qrqc-milestone-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .qrqc-milestone-cards {
    grid-template-columns: 1fr;
  }

  .qrqc-timeline-head,
  .qrqc-timeline-row {
    grid-template-columns: 1fr;
  }
}

.qrqc-actions-table-template th:nth-child(1),
.qrqc-actions-table-template td:nth-child(1) {
  width: 40px;
  min-width: 40px;
}

.qrqc-actions-table-template th:nth-child(2),
.qrqc-actions-table-template td:nth-child(2) {
  width: 122px;
  min-width: 122px;
}

.qrqc-actions-table-template th:nth-child(3),
.qrqc-actions-table-template td:nth-child(3) {
  width: 122px;
  min-width: 122px;
}

.qrqc-actions-table-template td:nth-child(1) {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.qrqc-actions-table-template thead th:nth-child(1),
.qrqc-actions-table-template thead th:nth-child(2),
.qrqc-actions-table-template thead th:nth-child(3) {
  font-size: 11px;
}

.qrqc-stage-pill {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.15;
}

.qrqc-date-compact {
  min-height: 40px;
  font-size: 12px;
}

.qrqc-timeline-cell-overflow {
  grid-column: auto;
  min-height: 188px;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 8px 6px;
}

.qrqc-day-head-overflow,
.qrqc-timeline-cell-overflow {
  border-color: rgba(157, 82, 92, 0.62);
}

.qrqc-date-pill-ok {
  color: #dff8ea;
  box-shadow: inset 0 0 0 1px rgba(54, 179, 126, 0.28);
  background: linear-gradient(180deg, rgba(15, 49, 39, 0.98), rgba(11, 38, 31, 0.98));
}

.qrqc-date-pill-late {
  color: #ffe2e2;
  box-shadow: inset 0 0 0 1px rgba(224, 87, 87, 0.3);
  background: linear-gradient(180deg, rgba(73, 25, 33, 0.98), rgba(56, 19, 26, 0.98));
}

.qrqc-date-pill-done {
  color: #e9fff3;
  box-shadow: inset 0 0 0 1px rgba(82, 194, 136, 0.34);
  background: linear-gradient(180deg, rgba(21, 66, 50, 0.98), rgba(15, 50, 38, 0.98));
}

.qrqc-stage-pill {
  flex-direction: column;
  gap: 2px;
}

.qrqc-stage-pill small {
  display: block;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.95;
}

.qrqc-actions-table-template th:nth-child(15),
.qrqc-actions-table-template td:nth-child(15) {
  width: 84px;
  min-width: 84px;
  position: static;
}

.qrqc-actions-table-template th:nth-child(16),
.qrqc-actions-table-template td:nth-child(16) {
  width: 126px;
  min-width: 126px;
  position: static;
}

.qrqc-date-created {
  font-size: 11px;
  opacity: 0.9;
}

.qrqc-rich-editor {
  cursor: pointer;
}

.qrqc-rich-modal-card {
  max-width: 1080px;
}

.qrqc-rich-editor-canvas {
  min-height: 420px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(97, 120, 145, 0.3);
  background: #0d1622;
  color: #f4f8fd;
  font-size: 17px;
  line-height: 1.5;
  outline: none;
  overflow: auto;
}

.qrqc-rich-editor-canvas:focus {
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.45);
}

.qrqc-date-pill-pending {
  color: #dce7f5;
  box-shadow: inset 0 0 0 1px rgba(93, 115, 140, 0.28);
  background: linear-gradient(180deg, rgba(14, 25, 39, 0.98), rgba(11, 21, 34, 0.98));
}

.qrqc-review-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qrqc-stage-column-placeholder {
  padding: 0 !important;
}

.qrqc-actions-table-template th:nth-child(2),
.qrqc-actions-table-template td:nth-child(2) {
  width: 152px;
  min-width: 152px;
}

.qrqc-actions-table-template th:nth-child(3),
.qrqc-actions-table-template td:nth-child(3) {
  display: none;
}

.qrqc-review-stack .qrqc-stage-pill {
  width: 100%;
  margin-top: 0;
}

.qrqc-rich-editor-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.qrqc-date-stack-inline .qrqc-date-actual {
  min-height: 30px;
  height: 30px;
  font-size: 10px;
  padding: 4px 8px;
}

.qrqc-date-stack-inline .qrqc-ok-btn {
  width: 34px;
  min-width: 34px;
  height: 30px;
  border-radius: 11px;
  font-size: 10px;
  font-weight: 800;
}

.qrqc-date-stack {
  gap: 6px;
}

.qrqc-rich-editor {
  white-space: normal;
}

.qrqc-rich-editor > div,
.qrqc-rich-editor p,
.qrqc-rich-editor span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.qrqc-rich-editor br {
  display: none;
}

.qrqc-rich-editor-problem,
.qrqc-rich-editor-actions {
  max-height: 106px;
  overflow: hidden;
}

.qrqc-date-created {
  font-size: 10px;
  min-height: 34px;
}

.qrqc-date-stack > input.qrqc-date-compact {
  min-height: 28px;
  height: 28px;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 10px;
}

.qrqc-date-stack-inline .qrqc-date-actual {
  min-height: 22px;
  height: 22px;
  font-size: 8px;
  padding: 2px 6px;
  border-radius: 8px;
}

.qrqc-date-stack-inline .qrqc-ok-btn {
  width: 26px;
  min-width: 26px;
  height: 22px;
  border-radius: 8px;
  font-size: 8px;
  font-weight: 800;
}

.qrqc-date-pill-pending {
  color: #d9e5f3;
  box-shadow: inset 0 0 0 1px rgba(97, 118, 142, 0.22);
  background: linear-gradient(180deg, rgba(15, 25, 37, 1), rgba(10, 18, 29, 1));
}

.qrqc-date-pill-done {
  color: #f2fff6;
  box-shadow: inset 0 0 0 1px rgba(76, 216, 140, 0.24), 0 0 0 1px rgba(31, 138, 84, 0.18);
  background: linear-gradient(180deg, rgba(24, 104, 69, 1), rgba(15, 79, 52, 1));
}

.qrqc-date-pill-late {
  color: #fff1f1;
  box-shadow: inset 0 0 0 1px rgba(255, 120, 120, 0.22), 0 0 0 1px rgba(153, 35, 47, 0.2);
  background: linear-gradient(180deg, rgba(143, 35, 49, 1), rgba(104, 22, 34, 1));
}

.qrqc-rich-editor {
  font-size: 11px;
  line-height: 1.15;
}

.qrqc-rich-editor-problem,
.qrqc-rich-editor-actions {
  max-height: 92px;
}

.qrqc-timeline-head,
.qrqc-timeline-row {
  grid-template-columns: 132px minmax(900px, 1fr);
  gap: 10px;
}

.qrqc-timeline-grid,
.qrqc-timeline-grid-31 {
  min-width: 900px;
  grid-template-columns: repeat(31, minmax(36px, 1fr));
  gap: 6px;
}

.qrqc-timeline-label {
  min-height: 58px;
  padding: 10px 12px;
}

.qrqc-timeline-label strong {
  font-size: 13px;
}

.qrqc-timeline-label span {
  font-size: 11px;
}

.qrqc-day-head {
  min-height: 48px;
  border-radius: 14px;
  font-size: 14px;
}

.qrqc-timeline-cell {
  min-height: 160px;
  padding: 6px 4px;
  gap: 5px;
  border-radius: 14px;
}

.qrqc-action-badge {
  width: 24px;
  height: 24px;
  font-size: 11px;
}

.qrqc-actions-table-template th:nth-child(2),
.qrqc-actions-table-template td:nth-child(2) {
  width: 128px;
  min-width: 128px;
}

.qrqc-review-stack {
  align-items: flex-start;
}

.qrqc-review-stack > .qrqc-date-compact {
  width: 112px;
  min-width: 112px;
  max-width: 112px;
  padding: 4px 6px;
  letter-spacing: 0;
}

.qrqc-review-stack > .qrqc-date-compact::-webkit-datetime-edit {
  padding: 0;
}

.qrqc-review-stack > .qrqc-date-compact::-webkit-calendar-picker-indicator {
  margin: 0;
  padding: 0;
}

.qrqc-review-stack .qrqc-stage-pill {
  width: 112px;
  min-height: 28px;
  padding: 4px 6px;
  border-radius: 10px;
  font-size: 10px;
  line-height: 1.05;
}

.qrqc-review-stack .qrqc-stage-pill small {
  font-size: 9px;
}

.qrqc-date-pill-pending {
  color: #e7f0fd;
  border-color: rgba(76, 103, 134, 0.42) !important;
  box-shadow: none;
  background: linear-gradient(180deg, rgba(20, 43, 73, 1), rgba(18, 38, 64, 1));
}

.qrqc-date-pill-done {
  color: #f3fff6;
  border-color: rgba(89, 213, 144, 0.5) !important;
  box-shadow: none;
  background: linear-gradient(180deg, rgba(28, 124, 81, 1), rgba(20, 96, 63, 1));
}

.qrqc-date-pill-late {
  color: #fff2f2;
  border-color: rgba(255, 120, 120, 0.4) !important;
  box-shadow: none;
  background: linear-gradient(180deg, rgba(162, 41, 57, 1), rgba(123, 27, 40, 1));
}

.qrqc-timeline-head,
.qrqc-timeline-row {
  grid-template-columns: 108px minmax(760px, 1fr);
  gap: 8px;
}

.qrqc-timeline-grid,
.qrqc-timeline-grid-31 {
  min-width: 760px;
  grid-template-columns: repeat(31, minmax(30px, 1fr));
  gap: 5px;
}

.qrqc-timeline-label {
  min-height: 44px;
  padding: 8px 9px;
  border-radius: 14px;
  gap: 3px;
}

.qrqc-timeline-label strong {
  font-size: 11px;
}

.qrqc-timeline-label span {
  font-size: 9px;
}

.qrqc-day-head {
  min-height: 38px;
  border-radius: 11px;
  font-size: 12px;
}

.qrqc-timeline-cell {
  min-height: 120px;
  padding: 5px 3px;
  gap: 4px;
  border-radius: 11px;
}

.qrqc-action-badge {
  width: 20px;
  height: 20px;
  font-size: 9px;
}

.qrqc-actions-card .table-wrap {
  overflow-x: hidden;
}

.qrqc-actions-table-template th:nth-child(2),
.qrqc-actions-table-template td:nth-child(2) {
  width: 112px;
  min-width: 112px;
}

.qrqc-actions-table-template th:nth-child(4),
.qrqc-actions-table-template td:nth-child(4),
.qrqc-actions-table-template th:nth-child(5),
.qrqc-actions-table-template td:nth-child(5),
.qrqc-actions-table-template th:nth-child(6),
.qrqc-actions-table-template td:nth-child(6),
.qrqc-actions-table-template th:nth-child(7),
.qrqc-actions-table-template td:nth-child(7) {
  width: 92px;
  min-width: 92px;
}

.qrqc-actions-table-template tbody td {
  padding: 8px 6px 10px;
}

.qrqc-review-stack > .qrqc-date-compact,
.qrqc-review-stack .qrqc-stage-pill {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}

.qrqc-review-stack > .qrqc-date-compact {
  min-height: 24px;
  height: 24px;
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 8px;
}

.qrqc-review-stack > .qrqc-date-compact::-webkit-calendar-picker-indicator {
  width: 12px;
}

.qrqc-review-stack .qrqc-stage-pill {
  min-height: 24px;
  padding: 3px 4px;
  border-radius: 8px;
  font-size: 9px;
}

.qrqc-review-stack .qrqc-stage-pill small {
  font-size: 8px;
}

.qrqc-date-stack > input.qrqc-date-compact,
.qrqc-date-stack > input.qrqc-date-compact:disabled {
  appearance: none;
  -webkit-appearance: none;
  min-height: 24px;
  height: 24px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
  color: #f8fbff;
  opacity: 1;
}

.qrqc-date-stack > input.qrqc-date-compact::-webkit-calendar-picker-indicator {
  display: none;
}

.qrqc-date-stack-inline .qrqc-date-actual {
  min-height: 18px;
  height: 18px;
  font-size: 7px;
  padding: 1px 4px;
  border-radius: 6px;
}

.qrqc-date-stack-inline .qrqc-date-actual::-webkit-calendar-picker-indicator {
  width: 10px;
  margin: 0;
  padding: 0;
}

.qrqc-date-stack-inline .qrqc-ok-btn {
  width: 22px;
  min-width: 22px;
  height: 18px;
  border-radius: 6px;
  font-size: 7px;
}

.qrqc-date-pill-pending,
.qrqc-date-pill-pending:disabled {
  background: linear-gradient(180deg, rgba(28, 55, 90, 1), rgba(22, 46, 76, 1)) !important;
  border-color: rgba(97, 132, 177, 0.45) !important;
}

.qrqc-date-pill-done,
.qrqc-date-pill-done:disabled {
  background: linear-gradient(180deg, rgba(32, 145, 95, 1), rgba(21, 116, 75, 1)) !important;
  border-color: rgba(126, 232, 176, 0.42) !important;
}

.qrqc-date-pill-late,
.qrqc-date-pill-late:disabled {
  background: linear-gradient(180deg, rgba(176, 46, 64, 1), rgba(136, 29, 45, 1)) !important;
  border-color: rgba(255, 150, 150, 0.38) !important;
}

.qrqc-timeline-wrap {
  overflow-x: hidden;
}

.qrqc-timeline-head,
.qrqc-timeline-row {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 6px;
}

.qrqc-timeline-grid,
.qrqc-timeline-grid-31 {
  min-width: 0;
  width: 100%;
  grid-template-columns: repeat(31, minmax(0, 1fr));
  gap: 4px;
}

.qrqc-timeline-label {
  min-height: 36px;
  padding: 6px 7px;
  border-radius: 11px;
}

.qrqc-timeline-label strong {
  font-size: 10px;
}

.qrqc-timeline-label span {
  font-size: 8px;
}

.qrqc-day-head {
  min-height: 30px;
  border-radius: 9px;
  font-size: 10px;
}

.qrqc-timeline-cell {
  min-height: 88px;
  padding: 4px 2px;
  gap: 3px;
  border-radius: 9px;
}

.qrqc-action-badge {
  width: 18px;
  height: 18px;
  font-size: 8px;
}

.qrqc-actions-table-template th:nth-child(2),
.qrqc-actions-table-template td:nth-child(2) {
  width: 104px;
  min-width: 104px;
}

.qrqc-actions-table-template th:nth-child(4),
.qrqc-actions-table-template td:nth-child(4),
.qrqc-actions-table-template th:nth-child(5),
.qrqc-actions-table-template td:nth-child(5),
.qrqc-actions-table-template th:nth-child(6),
.qrqc-actions-table-template td:nth-child(6),
.qrqc-actions-table-template th:nth-child(7),
.qrqc-actions-table-template td:nth-child(7) {
  width: 96px;
  min-width: 96px;
}

.qrqc-review-stack {
  gap: 3px;
}

.qrqc-review-stack > .qrqc-date-compact,
.qrqc-review-stack .qrqc-stage-pill {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}

.qrqc-review-stack > .qrqc-date-compact {
  min-height: 22px;
  height: 22px;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 7px;
}

.qrqc-review-stack .qrqc-stage-pill {
  min-height: 19px;
  padding: 2px 4px;
  border-radius: 7px;
  font-size: 10px;
  line-height: 1;
}

.qrqc-review-stack .qrqc-stage-pill small {
  font-size: 9px;
}

.qrqc-date-stack > input.qrqc-date-compact,
.qrqc-date-stack > input.qrqc-date-compact:disabled {
  min-height: 22px;
  height: 22px;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 7px;
}

.qrqc-date-stack-inline .qrqc-date-actual {
  min-height: 18px;
  height: 18px;
  font-size: 8px;
  padding: 1px 4px;
}

.qrqc-date-stack-inline .qrqc-ok-btn {
  width: 22px;
  min-width: 22px;
  height: 18px;
  font-size: 8px;
}

.qrqc-date-pill-pending,
.qrqc-date-pill-pending:disabled {
  color: #edf5ff;
  background: linear-gradient(180deg, rgba(35, 74, 123, 1), rgba(28, 61, 101, 1)) !important;
}

.qrqc-date-pill-done,
.qrqc-date-pill-done:disabled {
  color: #f4fff7;
  background: linear-gradient(180deg, rgba(33, 156, 101, 1), rgba(25, 127, 82, 1)) !important;
}

.qrqc-date-pill-late,
.qrqc-date-pill-late:disabled {
  color: #fff4f4;
  background: linear-gradient(180deg, rgba(184, 50, 68, 1), rgba(145, 33, 49, 1)) !important;
}

.qrqc-timeline-wrap {
  overflow-x: hidden;
  padding: 10px;
}

.qrqc-timeline-head,
.qrqc-timeline-row {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 5px;
}

.qrqc-timeline-grid,
.qrqc-timeline-grid-31 {
  min-width: 0;
  width: 100%;
  grid-template-columns: repeat(31, minmax(0, 1fr));
  gap: 3px;
}

.qrqc-timeline-label {
  min-height: 40px;
  padding: 6px;
  border-radius: 10px;
}

.qrqc-timeline-label strong {
  font-size: 11px;
}

.qrqc-timeline-label span {
  font-size: 8px;
}

.qrqc-day-head {
  min-height: 28px;
  border-radius: 8px;
  font-size: 10px;
}

.qrqc-timeline-cell {
  min-height: 118px;
  padding: 4px 2px;
  gap: 3px;
  border-radius: 8px;
}

.qrqc-action-badge {
  width: 18px;
  height: 18px;
  font-size: 8px;
}

.qrqc-overflow-chip {
  font-size: 9px;
  gap: 6px;
  padding: 4px 6px 4px 4px;
}

.qrqc-date-stack {
  gap: 2px;
}

.qrqc-date-stack-inline {
  margin-top: 0;
  gap: 3px;
}

.qrqc-actions-table-template th:nth-child(9),
.qrqc-actions-table-template td:nth-child(9) {
  width: 108px;
  min-width: 108px;
}

/* Final QRQC table compaction and readability pass */
.qrqc-actions-card #qrqcActionsTopScroll {
  overflow-x: auto;
  overflow-y: hidden;
  height: 12px;
  margin: 0 0 6px;
}

.qrqc-actions-card #qrqcActionsTopScrollInner {
  height: 1px;
}

.qrqc-actions-card .table-wrap,
.qrqc-actions-card #qrqcActionsTableWrap {
  overflow-x: auto !important;
  overflow-y: hidden;
}

.qrqc-actions-table-template th:nth-child(1),
.qrqc-actions-table-template td:nth-child(1) {
  width: 34px;
  min-width: 34px;
  max-width: 34px;
}

.qrqc-actions-table-template th:nth-child(2),
.qrqc-actions-table-template td:nth-child(2) {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
}

.qrqc-actions-table-template th:nth-child(9),
.qrqc-actions-table-template td:nth-child(9) {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
}

.qrqc-actions-table-template td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.qrqc-review-stack {
  gap: 1px !important;
  align-items: center;
}

.qrqc-review-stack > .qrqc-date-compact,
.qrqc-review-stack .qrqc-stage-pill {
  width: 88px;
  min-width: 88px;
  max-width: 88px;
}

.qrqc-review-stack > .qrqc-date-compact {
  min-height: 24px;
  height: 24px;
  padding: 1px 3px;
  font-size: 11px;
}

.qrqc-review-stack .qrqc-stage-pill {
  min-height: 18px;
  margin-top: 0 !important;
  padding: 1px 3px;
  font-size: 10px;
}

.qrqc-review-stack .qrqc-stage-pill small {
  font-size: 9px;
  margin-top: 0;
}

.qrqc-date-stack {
  gap: 1px !important;
}

.qrqc-date-stack > input.qrqc-date-compact,
.qrqc-date-stack > input.qrqc-date-compact:disabled {
  min-height: 24px;
  height: 24px;
  padding: 1px 5px;
  font-size: 12px;
  font-weight: 800;
}

.qrqc-date-stack-inline.qrqc-date-stack-inline-vertical {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1px;
  margin-top: 0;
}

.qrqc-date-stack-inline.qrqc-date-stack-inline-vertical .qrqc-date-actual {
  width: 100%;
  min-width: 0;
  min-height: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 9px;
  font-weight: 700;
}

.qrqc-date-stack-inline.qrqc-date-stack-inline-vertical .qrqc-ok-btn {
  width: 100%;
  min-width: 0;
  height: 18px;
  min-height: 18px;
  padding: 0;
  font-size: 9px;
  font-weight: 800;
}

.qrqc-date-pill-pending,
.qrqc-date-pill-pending:disabled,
.qrqc-date-pill-ok,
.qrqc-date-pill-ok:disabled {
  color: #edf5ff;
  background: linear-gradient(180deg, rgba(48, 89, 142, 1), rgba(36, 70, 116, 1)) !important;
  border-color: rgba(123, 164, 221, 0.5) !important;
}

.qrqc-date-pill-done,
.qrqc-date-pill-done:disabled {
  color: #f4fff7;
  background: linear-gradient(180deg, rgba(41, 167, 109, 1), rgba(26, 129, 84, 1)) !important;
  border-color: rgba(132, 237, 182, 0.48) !important;
}

.qrqc-date-pill-late,
.qrqc-date-pill-late:disabled {
  color: #fff5f5;
  background: linear-gradient(180deg, rgba(197, 57, 77, 1), rgba(152, 36, 53, 1)) !important;
  border-color: rgba(255, 160, 160, 0.46) !important;
}

/* QRQC modal forms and analytics refresh */
.qrqc-form-modal-card,
.qrqc-blocked-modal-card {
  max-width: 980px;
}

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

.qrqc-form-grid .settings-block,
.qrqc-form-modal-card .settings-block,
.qrqc-blocked-modal-card .settings-block {
  margin-bottom: 14px;
}

.qrqc-form-modal-card textarea,
.qrqc-blocked-modal-card textarea {
  min-height: 120px;
}

.qrqc-actions-table-template {
  min-width: 2140px;
  width: 2140px;
}

.qrqc-actions-table-template thead th {
  font-size: 13px;
  text-align: center;
}

.qrqc-actions-table-template tbody td {
  text-align: center;
}

.qrqc-actions-table-template .qrqc-rich-editor,
.qrqc-actions-table-template .qrqc-rich-editor * {
  font-size: 12px !important;
  line-height: 1.2 !important;
  text-align: left;
}

.qrqc-actions-table-template th:nth-child(1),
.qrqc-actions-table-template td:nth-child(1) {
  width: 30px;
  min-width: 30px;
  max-width: 30px;
}

.qrqc-actions-table-template th:nth-child(2),
.qrqc-actions-table-template td:nth-child(2) {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
}

.qrqc-actions-table-template th:nth-child(8),
.qrqc-actions-table-template td:nth-child(8) {
  width: 84px;
  min-width: 84px;
  max-width: 84px;
}

.qrqc-actions-table-template th:nth-child(9),
.qrqc-actions-table-template td:nth-child(9) {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
}

.qrqc-actions-table-template th:nth-child(10),
.qrqc-actions-table-template td:nth-child(10) {
  width: 190px;
  min-width: 190px;
  max-width: 190px;
}

.qrqc-actions-table-template th:nth-child(11),
.qrqc-actions-table-template td:nth-child(11),
.qrqc-actions-table-template th:nth-child(12),
.qrqc-actions-table-template td:nth-child(12) {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
}

.qrqc-actions-table-template th.col-blocked,
.qrqc-actions-table-template td.qrqc-blocked-cell {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
}

.qrqc-actions-table-template th:nth-child(14),
.qrqc-actions-table-template td:nth-child(14) {
  width: 86px;
  min-width: 86px;
  max-width: 86px;
}

.qrqc-actions-table-template th:nth-child(15),
.qrqc-actions-table-template td:nth-child(15) {
  width: 68px;
  min-width: 68px;
  max-width: 68px;
}

.qrqc-actions-table-template th:nth-child(16),
.qrqc-actions-table-template td:nth-child(16) {
  width: 102px;
  min-width: 102px;
  max-width: 102px;
}

.qrqc-review-stack > .qrqc-date-compact {
  min-height: 26px;
  height: 26px;
  font-size: 12px;
  font-weight: 800;
}

.qrqc-review-stack .qrqc-stage-pill {
  min-height: 24px;
  padding: 3px 4px;
  font-size: 11px;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.qrqc-review-stack .qrqc-stage-pill small {
  font-size: 10px;
}

.qrqc-date-stack > input.qrqc-date-compact,
.qrqc-date-stack > input.qrqc-date-compact:disabled {
  min-height: 28px;
  height: 28px;
  font-size: 12px;
}

.qrqc-date-stack-inline.qrqc-date-stack-inline-vertical .qrqc-date-actual {
  min-height: 19px;
  height: 19px;
  font-size: 10px;
}

.qrqc-date-stack-inline.qrqc-date-stack-inline-vertical .qrqc-ok-btn {
  height: 19px;
  min-height: 19px;
  font-size: 10px;
}

.qrqc-block-btn {
  width: 100%;
  min-height: 38px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(32, 42, 57, 0.92);
}

.qrqc-block-btn.is-blocked {
  background: rgba(108, 71, 36, 0.45);
  border-color: rgba(196, 151, 95, 0.4);
  color: #ffe7bf;
}

.qrqc-block-btn.is-escalated {
  background: rgba(178, 106, 35, 0.44);
  border-color: rgba(236, 177, 114, 0.45);
  color: #fff0d6;
}

.qrqc-row-escalated td {
  background: rgba(129, 82, 24, 0.2) !important;
}

.qrqc-date-pill-pending,
.qrqc-date-pill-pending:disabled,
.qrqc-date-pill-ok,
.qrqc-date-pill-ok:disabled {
  background: linear-gradient(180deg, rgba(69, 102, 145, 0.88), rgba(54, 84, 123, 0.88)) !important;
  border-color: rgba(146, 176, 214, 0.36) !important;
}

.qrqc-date-pill-done,
.qrqc-date-pill-done:disabled {
  background: linear-gradient(180deg, rgba(64, 150, 109, 0.86), rgba(49, 119, 87, 0.86)) !important;
  border-color: rgba(154, 219, 188, 0.34) !important;
}

.qrqc-date-pill-late,
.qrqc-date-pill-late:disabled {
  background: linear-gradient(180deg, rgba(173, 82, 95, 0.84), rgba(142, 63, 76, 0.84)) !important;
  border-color: rgba(233, 175, 182, 0.3) !important;
}

.qrqc-summary-grid-compact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.qrqc-analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.qrqc-chart-card {
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(109, 126, 145, 0.24);
  background: linear-gradient(180deg, rgba(30, 39, 53, 0.96), rgba(25, 33, 45, 0.98));
}

.qrqc-chart-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.qrqc-chart-head h4 {
  margin: 0;
  font-size: 16px;
}

.qrqc-chart-head span {
  color: #aebed0;
  font-size: 12px;
}

.qrqc-chart-list {
  display: grid;
  gap: 10px;
}

.qrqc-chart-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(17, 25, 36, 0.68);
  border: 1px solid rgba(103, 119, 139, 0.18);
}

.qrqc-chart-label-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.qrqc-chart-label-row span,
.qrqc-chart-label-row strong {
  font-size: 12px;
}

.qrqc-chart-bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.qrqc-chart-bar-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #5f8fcb;
}

.qrqc-chart-tone-danger .qrqc-chart-bar-track i { background: #b9717b; }
.qrqc-chart-tone-done .qrqc-chart-bar-track i { background: #6aa882; }
.qrqc-chart-tone-warning .qrqc-chart-bar-track i { background: #c4a36b; }
.qrqc-chart-tone-muted .qrqc-chart-bar-track i { background: #8c93a0; }
.qrqc-chart-tone-open .qrqc-chart-bar-track i { background: #6e97c4; }

@media (max-width: 1400px) {
  .qrqc-analytics-grid {
    grid-template-columns: 1fr;
  }

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

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

.category-color-manager {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.category-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(112, 128, 146, 0.22);
  background: rgba(15, 25, 38, 0.82);
}

.category-color-row span {
  font-size: 13px;
  color: #e6eef8;
}

.category-color-row input[type="color"] {
  width: 52px;
  min-width: 52px;
  height: 34px;
  padding: 2px;
}

.qrqc-actions-table-template th:nth-child(13),
.qrqc-actions-table-template td:nth-child(13) {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
}

.qrqc-actions-table-template th:nth-child(14),
.qrqc-actions-table-template td:nth-child(14) {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
}

.qrqc-actions-table-template th:nth-child(15),
.qrqc-actions-table-template td:nth-child(15) {
  width: 86px;
  min-width: 86px;
  max-width: 86px;
}

.qrqc-actions-table-template th:nth-child(16),
.qrqc-actions-table-template td:nth-child(16) {
  width: 102px;
  min-width: 102px;
  max-width: 102px;
}

.qrqc-mail-btn {
  width: 100%;
  min-height: 38px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.qrqc-calendar-card {
  grid-column: 1 / -1;
}

.qrqc-calendar-head {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.qrqc-month-input {
  width: 180px;
}

.qrqc-calendar-weekdays,
.qrqc-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.qrqc-calendar-weekdays {
  margin-bottom: 8px;
}

.qrqc-calendar-weekdays span {
  text-align: center;
  font-size: 12px;
  color: #9fb0c4;
}

.qrqc-calendar-cell {
  min-height: 64px;
  padding: 10px 8px;
  border-radius: 14px;
  border: 1px solid rgba(104, 122, 142, 0.2);
  background: rgba(18, 27, 40, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.qrqc-calendar-cell.has-count {
  background: linear-gradient(180deg, rgba(54, 84, 123, 0.55), rgba(28, 45, 66, 0.82));
  border-color: rgba(121, 156, 201, 0.28);
}

.qrqc-calendar-cell.is-empty {
  background: transparent;
  border-color: transparent;
}

.qrqc-calendar-day {
  font-size: 13px;
  color: #dfe8f5;
}

.qrqc-calendar-count {
  font-size: 22px;
  color: #f7fbff;
  text-align: right;
}

.qrqc-calendar-cell.is-today {
  box-shadow: inset 0 0 0 1px rgba(149, 209, 69, 0.45);
}

:root {
  --bg: #050b14;
  --bg-deep: #020816;
  --card: rgba(10, 20, 35, 0.84);
  --card-2: rgba(16, 29, 47, 0.92);
  --row-a: #273648;
  --row-b: #314256;
  --text: #f3f8ff;
  --muted: #8ea3bb;
  --green: #9ae63a;
  --green-2: #64d97d;
  --line: rgba(142, 174, 209, 0.12);
  --line-soft: rgba(142, 174, 209, 0.18);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

html,
body {
  background:
    radial-gradient(circle at top left, rgba(28, 79, 142, 0.2), transparent 28%),
    radial-gradient(circle at top right, rgba(94, 214, 153, 0.12), transparent 24%),
    linear-gradient(180deg, #06101c 0%, #030913 55%, #020711 100%);
}

body {
  position: relative;
}

.app-shell {
  position: relative;
  padding: 22px 22px 22px 118px;
}

.edge-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 6px;
  padding: 16px 0;
  border-radius: 0 20px 20px 0;
  border: none;
  border-right: 2px solid rgba(154, 230, 58, 0.35);
  background: linear-gradient(180deg, rgba(5, 14, 28, 0.85) 0%, rgba(8, 20, 38, 0.75) 100%);
  backdrop-filter: blur(0px);
  box-shadow: 2px 0 12px rgba(154, 230, 58, 0.08);
  z-index: 9500;
  overflow: hidden;
  transition:
    width 0.30s cubic-bezier(0.34, 1.1, 0.64, 1),
    padding 0.30s cubic-bezier(0.34, 1.1, 0.64, 1),
    border-radius 0.30s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease,
    backdrop-filter 0.24s ease;
}

/* Indicateur visuel : petits tirets verts sur le trait */
.edge-nav::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 60px;
  background: linear-gradient(180deg, transparent, rgba(154,230,58,0.5), transparent);
  border-radius: 2px;
  transition: opacity 0.24s ease;
  pointer-events: none;
}

.edge-nav:hover::before {
  opacity: 0;
}

.edge-nav:hover {
  width: 264px;
  padding: 16px 14px;
  border-radius: 0 32px 32px 0;
  border-right: none;
  border: 1px solid rgba(154, 230, 58, 0.28);
  backdrop-filter: blur(24px);
  background: linear-gradient(180deg, rgba(5, 14, 28, 0.97) 0%, rgba(8, 20, 38, 0.93) 100%);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255,255,255,0.08), 0 0 0 1px rgba(154,230,58,0.08);
}

.edge-nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.edge-nav__logo {
  width: 54px;
  height: 54px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(79,140,255,0.22), rgba(123,79,255,0.22));
  border: 1px solid rgba(79,140,255,0.28);
  color: #04111d;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(79,140,255,0.18);
  flex: 0 0 54px;
}

.edge-nav__brand,
.edge-nav__items {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.20s ease 0.05s, transform 0.20s ease 0.05s;
  pointer-events: none;
}

.edge-nav:hover .edge-nav__brand,
.edge-nav:hover .edge-nav__items {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.edge-nav__brand-copy,
.edge-nav__item-labels {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.edge-nav:hover .edge-nav__brand-copy,
.edge-nav:hover .edge-nav__item-labels {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.edge-nav__brand-copy strong {
  display: block;
  font-size: 14px;
}

.edge-nav__brand-copy span {
  font-size: 11px;
  color: var(--muted);
}

.edge-nav__items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.edge-nav__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: transparent;
  color: #eef6ff;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.edge-nav__item:hover {
  transform: translateX(4px);
  background: rgba(20, 34, 54, 0.92);
  border-color: rgba(131, 157, 191, 0.2);
}

.edge-nav__item.is-active {
  background: linear-gradient(135deg, rgba(22, 53, 90, 0.98), rgba(10, 27, 48, 0.94));
  border-color: rgba(154, 230, 58, 0.2);
  box-shadow: inset 0 0 0 1px rgba(154, 230, 58, 0.12);
}

/* Quand la nav est fermée (6px), les items actifs ne sont pas visibles */
.edge-nav:not(:hover) .edge-nav__item.is-active {
  width: 0;
  min-width: 0;
  height: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: none;
}

.edge-nav__item-badge {
  width: 54px;
  height: 54px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 20px;
  flex: 0 0 54px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.18), 0 8px 20px rgba(0,0,0,0.22);
}

.edge-nav__item-labels strong {
  display: block;
  font-size: 14px;
}

.edge-nav__item-labels span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.page {
  position: relative;
}

.hero {
  min-height: 240px;
  background:
    radial-gradient(circle at 14% 20%, rgba(91, 158, 255, 0.14), transparent 18%),
    radial-gradient(circle at 88% 18%, rgba(154, 230, 58, 0.12), transparent 16%),
    linear-gradient(135deg, rgba(8, 20, 37, 0.96), rgba(17, 34, 56, 0.88));
  border: 1px solid rgba(132, 160, 196, 0.14);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
  transform: translateX(-100%);
  animation: heroSweep 8s linear infinite;
}

@keyframes heroSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.brand-mark {
  font-size: 64px;
  letter-spacing: -2px;
}

.hero-actions-menu .btn,
.topbar-right .btn,
.topbar-left .btn {
  backdrop-filter: blur(10px);
}

.home-global-kpis {
  gap: 18px;
}

.home-kpi-card,
.powerbi-card,
.shortcuts-card,
.qrqc-kpis-card,
.qrqc-case-card,
.qrqc-visual-card,
.qrqc-actions-card {
  background: linear-gradient(180deg, rgba(12, 24, 41, 0.9), rgba(8, 18, 32, 0.92));
  border: 1px solid rgba(124, 149, 180, 0.14);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.home-kpi-card {
  position: relative;
  overflow: hidden;
}

.home-kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #68b7ff, #9ae63a);
  opacity: 0.75;
}

.menu-section-title h2 {
  font-size: 28px;
}

.menu-grid {
  gap: 18px;
}

.menu-tile {
  position: relative;
  min-height: 132px;
  background:
    linear-gradient(180deg, rgba(6, 15, 29, 0.98), rgba(7, 16, 31, 0.9));
  border: 1px solid rgba(106, 136, 173, 0.16);
  box-shadow: 0 22px 38px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.menu-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(91, 158, 255, 0.14), transparent 28%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.menu-tile:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(154, 230, 58, 0.24);
  box-shadow: 0 28px 50px rgba(0, 0, 0, 0.3);
}

.menu-tile:hover::before {
  opacity: 1;
}

.menu-tile-icon {
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.26);
}

.menu-tile-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(23, 37, 58, 0.88);
}

.menu-tile:hover .menu-tile-arrow {
  color: #9ae63a;
  transform: translateX(2px);
}

.topbar {
  position: relative;
  padding: 8px 0 4px;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 1px;
  background: linear-gradient(90deg, rgba(104,183,255,0), rgba(104,183,255,0.24), rgba(154,230,58,0.14), rgba(104,183,255,0));
}

.btn {
  background: linear-gradient(180deg, rgba(43, 58, 78, 0.92), rgba(32, 45, 63, 0.94));
  border-color: rgba(132, 160, 196, 0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(0,0,0,0.22);
}

.btn.primary {
  background: linear-gradient(135deg, #9ae63a, #67d38b);
}

.home-ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  pointer-events: none;
  opacity: 0.32;
}

.home-ambient-a {
  width: 180px;
  height: 180px;
  top: 22px;
  right: 220px;
  background: #4f8cff;
}

.home-ambient-b {
  width: 220px;
  height: 220px;
  top: 96px;
  left: 30px;
  background: #8ee93f;
}

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

@media (max-width: 920px) {
  .edge-nav {
    display: none;
  }

  .app-shell {
    padding-left: 16px;
  }

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


body {
  overflow-x: hidden;
}

.app-shell,
.page {
  overflow-x: hidden;
}

.edge-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.edge-nav__brand {
  width: 100%;
  justify-content: center;
  margin-bottom: 22px;
}

.edge-nav:hover .edge-nav__brand {
  justify-content: flex-start;
}

.edge-nav__items {
  width: 100%;
  align-items: stretch;
}

.edge-nav:not(:hover) .edge-nav__items {
  align-items: center;
}

.edge-nav__item {
  width: 52px;
  min-width: 52px;
  margin: 0 auto;
  justify-content: center;
  padding: 3px 0;
}

.edge-nav:not(:hover) .edge-nav__item {
  width: 60px;
  min-width: 60px;
  height: 60px;
  min-height: 60px;
  padding: 0;
  margin: 0 auto;
  justify-content: center;
  align-items: center;
}

.edge-nav:hover .edge-nav__item {
  width: 100%;
  min-width: 0;
  margin: 0;
  justify-content: flex-start;
  padding: 8px 10px;
}

.edge-nav__item:hover {
  transform: translateX(2px);
}

.edge-nav__item-badge,
.edge-nav__logo {
  position: relative;
  overflow: hidden;
}

.edge-nav__item-badge::after,
.edge-nav__logo::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), transparent 42%);
  pointer-events: none;
}

.hero {
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -18% 0 auto 0;
  height: 100%;
  background:
    radial-gradient(circle at 11% 72%, rgba(123, 226, 95, 0.22), transparent 16%),
    radial-gradient(circle at 84% 42%, rgba(91, 158, 255, 0.24), transparent 15%),
    radial-gradient(circle at 92% 16%, rgba(154, 230, 58, 0.1), transparent 12%);
  filter: blur(10px);
  z-index: -1;
}

.hero::after {
  opacity: 0.45;
}

.home-ambient {
  opacity: 0.2;
  filter: blur(42px);
}

.home-ambient-a {
  width: 150px;
  height: 150px;
  top: 54px;
  right: 255px;
  background: radial-gradient(circle, rgba(79,140,255,0.9) 0%, rgba(79,140,255,0.18) 42%, transparent 72%);
}

.home-ambient-b {
  width: 170px;
  height: 170px;
  top: 128px;
  left: 76px;
  background: radial-gradient(circle, rgba(142,233,63,0.78) 0%, rgba(142,233,63,0.16) 45%, transparent 74%);
}

.menu-grid {
  padding-bottom: 10px;
}

.menu-tile {
  overflow: hidden;
  transform: translateZ(0);
  will-change: transform;
}

.menu-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 42px rgba(0, 0, 0, 0.26);
}

.menu-tile::before {
  background: radial-gradient(circle at 12% 18%, rgba(91, 158, 255, 0.16), transparent 24%);
}

.menu-tile-icon {
  position: relative;
}

.menu-tile-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.16), transparent 46%);
  pointer-events: none;
}

.menu-tile-arrow {
  flex: 0 0 32px;
}


.edge-nav {
  justify-content: flex-start;
}

.edge-nav__brand-copy {
  width: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.edge-nav__item-labels {
  width: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.edge-nav:hover .edge-nav__brand-copy {
  width: auto;
  max-width: 160px;
}

.edge-nav:hover .edge-nav__item-labels {
  width: auto;
  max-width: 150px;
}

.edge-nav__item {
  min-height: 60px;
}

.edge-nav__item-badge {
  margin: 0;
}

.edge-nav:hover .edge-nav__item-badge {
  margin: 0;
}


.brand-mark {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-logo-image {
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(46, 129, 247, 0.2));
}

.top-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-brand-image,
.edge-nav__logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.top-brand-image {
  width: 26px;
  height: 26px;
}

.qrqc-actions-table-template .col-problem,
.qrqc-actions-table-template td:nth-child(9) {
  min-width: 300px;
}

.qrqc-actions-table-template .col-action,
.qrqc-actions-table-template td:nth-child(10) {
  min-width: 420px;
}

.qrqc-actions-table-template th:nth-child(11),
.qrqc-actions-table-template td:nth-child(11),
.qrqc-actions-table-template th:nth-child(12),
.qrqc-actions-table-template td:nth-child(12),
.qrqc-actions-table-template th:nth-child(13),
.qrqc-actions-table-template td:nth-child(13),
.qrqc-actions-table-template th:nth-child(14),
.qrqc-actions-table-template td:nth-child(14),
.qrqc-actions-table-template th:nth-child(15),
.qrqc-actions-table-template td:nth-child(15) {
  min-width: 110px;
}


.app-confirm-card {
  width: min(560px, 100%);
  background: linear-gradient(180deg, rgba(9, 19, 34, 0.98), rgba(8, 16, 29, 0.96));
  border: 1px solid rgba(123, 151, 186, 0.18);
}

.app-confirm-content {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  align-items: center;
  padding: 8px 0 4px;
}

.app-confirm-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, #4f8cff, #67d38b);
  color: #06101c;
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 30px rgba(79, 140, 255, 0.24);
}

.app-confirm-content strong {
  display: block;
  font-size: 18px;
  line-height: 1.4;
  color: #f4f8ff;
}

.app-confirm-actions {
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.app-confirm-actions .btn {
  min-width: 148px;
}

.app-confirm-actions .btn.btn-danger-lite {
  background: linear-gradient(180deg, rgba(86, 38, 44, 0.92), rgba(64, 26, 31, 0.94));
  border-color: rgba(255, 109, 109, 0.22);
}

@media (max-width: 1100px) {
  .auth-grid,
  .auth-grid--compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .auth-shell__hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .session-bar {
    left: 14px;
    right: 14px;
    top: auto;
    bottom: 14px;
    flex-direction: column;
    align-items: stretch;
  }

  .session-bar__actions {
    width: 100%;
  }

  .session-bar__actions .btn {
    flex: 1;
  }

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

:root {
  --bg: #08111d;
  --card: #0f1a28;
  --card-2: #132133;
  --line: rgba(127, 162, 201, 0.12);
  --line-soft: rgba(160, 194, 231, 0.16);
  --muted: #9cafc7;
  --green: #8df03f;
  --green-2: #49d36f;
}

body {
  background:
    radial-gradient(circle at 10% 12%, rgba(66, 208, 110, 0.08), transparent 22%),
    radial-gradient(circle at 84% 10%, rgba(79, 140, 255, 0.14), transparent 18%),
    linear-gradient(180deg, #07111c 0%, #0a1422 50%, #08101b 100%);
}

.app-shell {
  padding: 64px 20px 20px 118px;
}

.hero {
  position: relative;
  min-height: 244px;
  align-items: flex-start;
  padding: 34px 34px 30px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 12% 18%, rgba(79, 140, 255, 0.18), transparent 22%),
    radial-gradient(circle at 86% 14%, rgba(102, 226, 88, 0.16), transparent 18%),
    linear-gradient(135deg, rgba(10, 24, 42, 0.98), rgba(18, 34, 58, 0.92));
  border: 1px solid rgba(113, 149, 189, 0.18);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.hero-brand {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
}

.brand-mark {
  align-items: center;
  gap: 20px;
}

.brand-mark__copy {
  display: grid;
  gap: 8px;
}

.brand-mark__copy span {
  font-size: clamp(42px, 4vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  font-weight: 900;
  color: #eef5ff;
}

.brand-mark__copy small {
  font-size: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #9fb3cb;
}

.brand-logo-image {
  width: 84px;
  height: 84px;
  border-radius: 24px;
}

.hero-subtitle {
  min-height: 0;
  max-width: 620px;
  color: #9bb0c8;
  font-size: 15px;
  line-height: 1.5;
}

.hero-wordmark {
  position: absolute;
  right: 34px;
  bottom: 24px;
  display: grid;
  justify-items: end;
  gap: 6px;
  opacity: 0.23;
  pointer-events: none;
  z-index: 1;
}

.hero-wordmark__text {
  position: relative;
  font-size: clamp(34px, 4vw, 62px);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #d6dfeb;
  transform: skewX(-10deg);
}

.hero-wordmark__swoosh {
  width: 220px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(123, 216, 86, 0.2), rgba(123, 216, 86, 0.95) 45%, rgba(123, 216, 86, 0.25));
  transform: skewX(-38deg) translateX(-18px);
  box-shadow: 0 0 26px rgba(123, 216, 86, 0.3);
}

.hero-actions-menu {
  display: none;
}

.hero-actions-menu .btn {
  min-width: 138px;
}

.btn.primary {
  background: linear-gradient(135deg, #8ff244, #5fdd70);
  color: #06121d;
}

.btn.primary:hover {
  border-color: rgba(143, 242, 68, 0.48);
  box-shadow: 0 18px 28px rgba(83, 210, 93, 0.2);
}

.home-global-kpis {
  margin-bottom: 20px;
  gap: 16px;
}

.home-kpi-card {
  min-height: 112px;
  padding: 20px 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(12, 24, 41, 0.94), rgba(9, 18, 33, 0.92));
}

.home-kpi-card:nth-child(1) {
  background: linear-gradient(180deg, rgba(17, 52, 43, 0.64), rgba(10, 28, 27, 0.88));
  border-color: rgba(83, 210, 93, 0.28);
}

.home-kpi-card:nth-child(2) {
  background: linear-gradient(180deg, rgba(20, 43, 98, 0.7), rgba(12, 25, 51, 0.9));
  border-color: rgba(79, 140, 255, 0.28);
}

.home-kpi-card:nth-child(3) {
  background: linear-gradient(180deg, rgba(78, 24, 38, 0.7), rgba(46, 15, 24, 0.9));
  border-color: rgba(255, 92, 117, 0.26);
}

.home-kpi-card:nth-child(4) {
  background: linear-gradient(180deg, rgba(70, 42, 21, 0.72), rgba(42, 25, 13, 0.92));
  border-color: rgba(246, 166, 35, 0.26);
}

.home-kpi-card:nth-child(5) {
  background: linear-gradient(180deg, rgba(16, 57, 43, 0.72), rgba(10, 33, 27, 0.92));
  border-color: rgba(89, 218, 123, 0.28);
}

.home-kpi-card::before {
  width: 4px;
  background: linear-gradient(180deg, #64b5ff, #8df03f);
}

.home-kpi-card strong {
  font-size: 40px;
}

.menu-section-title h2 {
  font-size: 34px;
  letter-spacing: -0.03em;
}

.menu-section-title p {
  font-size: 14px;
}

.menu-grid {
  gap: 18px;
}

.menu-tile {
  min-height: 132px;
  padding: 20px;
  border-radius: 24px;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(10, 21, 37, 0.98), rgba(9, 18, 31, 0.92));
  border: 1px solid rgba(115, 147, 183, 0.18);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.24);
}

.menu-tile:hover {
  transform: translateY(-6px);
  border-color: rgba(143, 242, 68, 0.3);
}

.menu-tile-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  font-size: 26px;
}

.menu-tile-body {
  gap: 7px;
}

.menu-tile-body strong {
  font-size: 17px;
}

.menu-tile-body span {
  font-size: 14px;
}

.menu-tile-arrow {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(25, 41, 66, 0.9), rgba(18, 29, 47, 0.94));
  border: 1px solid rgba(117, 149, 184, 0.14);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.menu-tile-arrow svg {
  width: 18px;
  height: 18px;
  stroke: #dce8f8;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-tile:hover .menu-tile-arrow {
  transform: translateX(3px);
  border-color: rgba(143, 242, 68, 0.26);
  background: linear-gradient(180deg, rgba(31, 52, 82, 0.95), rgba(19, 31, 50, 0.96));
}

.menu-tile:hover .menu-tile-arrow svg {
  stroke: #8ff244;
}

.edge-nav {
  top: 14px;
  left: 12px;
  bottom: 14px;
  width: 96px;
  padding: 16px 14px;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(5, 14, 28, 0.97), rgba(8, 20, 38, 0.93));
  border: 1px solid rgba(118, 145, 176, 0.18);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255,255,255,0.06);
}

.edge-nav:hover {
  width: 264px;
  border-color: rgba(143, 242, 68, 0.22);
}

.edge-nav__brand {
  padding: 4px 0 10px;
}

.edge-nav__logo {
  width: 54px;
  height: 54px;
  border-radius: 20px;
  box-shadow: 0 14px 26px rgba(79, 140, 255, 0.2);
  flex: 0 0 54px;
}

.edge-nav__brand-copy strong {
  font-size: 15px;
  letter-spacing: 0.06em;
}

.edge-nav__brand-copy span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.edge-nav__items {
  gap: 11px;
}

.edge-nav:not(:hover) .edge-nav__item {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 18px;
}

.edge-nav:not(:hover) .edge-nav__item.is-active {
  width: 56px;
  min-width: 56px;
  height: 56px;
  min-height: 56px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(18, 36, 64, 0.98), rgba(10, 24, 45, 0.98));
  border-color: rgba(143, 242, 68, 0.28);
  box-shadow:
    0 18px 30px rgba(0, 0, 0, 0.32),
    inset 0 0 0 1px rgba(143, 242, 68, 0.14);
}

.edge-nav__item.is-active {
  background: linear-gradient(180deg, rgba(19, 39, 70, 0.98), rgba(10, 25, 46, 0.96));
  border-color: rgba(143, 242, 68, 0.22);
  box-shadow: inset 0 0 0 1px rgba(143, 242, 68, 0.1);
}

.edge-nav__item-badge {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  font-size: 18px;
}

.edge-nav__item.is-active .edge-nav__item-badge {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.22), 0 12px 24px rgba(0,0,0,0.24);
}

.edge-nav__item-badge--svg svg {
  width: 18px;
  height: 18px;
  stroke: #ffffff;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-tile-icon--rich,
.edge-nav__item-badge--svg,
.category-manager-icon--rich {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 16px 28px rgba(0, 0, 0, 0.24);
}

.menu-tile-icon--rich::before,
.edge-nav__item-badge--svg::before,
.category-manager-icon--rich::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.34), transparent 42%),
    radial-gradient(circle at 72% 78%, rgba(0, 0, 0, 0.18), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
  opacity: 0.95;
  z-index: 0;
  pointer-events: none;
}

.menu-tile-icon--rich::after,
.edge-nav__item-badge--svg::after,
.category-manager-icon--rich::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.22),
    inset 0 -10px 18px rgba(5, 10, 20, 0.18),
    0 14px 28px rgba(0, 0, 0, 0.24);
  z-index: 0;
  pointer-events: none;
}

.menu-tile-icon--rich svg,
.edge-nav__item-badge--svg svg,
.category-manager-icon--rich svg,
.menu-tile-icon--rich .category-icon-text,
.edge-nav__item-badge--svg .category-icon-text,
.category-manager-icon--rich .category-icon-text {
  position: relative;
  z-index: 1;
}

.menu-tile-icon--rich svg {
  width: 34px;
  height: 34px;
  filter:
    saturate(1.18)
    brightness(1.12)
    contrast(1.08)
    drop-shadow(0 3px 8px rgba(0, 0, 0, 0.26));
}

.edge-nav__item-badge--svg svg {
  width: 20px;
  height: 20px;
  filter:
    saturate(1.15)
    brightness(1.12)
    contrast(1.08)
    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.22));
}

.category-manager-icon--rich svg {
  width: 24px;
  height: 24px;
  filter:
    saturate(1.15)
    brightness(1.1)
    contrast(1.06)
    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18));
}

.category-glyph {
  overflow: visible;
  transform: translateZ(0);
}

.menu-tile-icon--rich .category-icon-text,
.edge-nav__item-badge--svg .category-icon-text,
.category-manager-icon--rich .category-icon-text {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.edge-nav__item-labels strong {
  font-size: 14px;
}

.edge-nav__item-labels span {
  font-size: 11px;
}

@media (max-width: 1280px) {
  .brand-mark__copy span {
    font-size: clamp(34px, 3.4vw, 56px);
  }

  .hero-wordmark__text {
    font-size: clamp(28px, 3.2vw, 44px);
  }
}

@media (max-width: 920px) {
  .app-shell {
    padding: 72px 16px 16px;
  }

  .hero {
    min-height: 0;
    padding: 24px;
    gap: 18px;
    flex-direction: column;
  }

  .hero-wordmark {
    position: static;
    justify-items: start;
    opacity: 0.18;
  }

  .hero-actions-menu {
    width: 100%;
    flex-wrap: wrap;
  }

  .hero-actions-menu .btn {
    flex: 1 1 180px;
  }
}

/* A3 Project Module */

.a3-shell {
  display: grid;
  gap: 22px;
}

.a3-toolbar-card,
.a3-header-card,
.a3-planning-card,
.a3-actions-card,
.a3-panel {
  background:
    linear-gradient(180deg, rgba(19, 29, 46, 0.98), rgba(14, 22, 36, 0.98));
  border: 1px solid rgba(90, 120, 170, 0.24);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(3, 10, 20, 0.22);
}

.a3-toolbar-card,
.a3-header-card,
.a3-planning-card,
.a3-actions-card {
  padding: 22px 24px;
}

.a3-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  flex-wrap: wrap;
}

.a3-toolbar__project,
.a3-toolbar__planning {
  display: flex;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
}

.a3-toolbar__project {
  flex: 1 1 560px;
}

.a3-toolbar__project label,
.a3-toolbar__planning label {
  display: block;
  margin-bottom: 8px;
  color: #b5c6e7;
  font-size: 13px;
}

.a3-toolbar__project-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

#a3ProjectSelect {
  min-width: 320px;
  flex: 1 1 320px;
}

.a3-kpis-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.a3-kpi-card {
  min-height: 112px;
}

.a3-kpi-card--total {
  background: linear-gradient(135deg, rgba(16, 87, 65, 0.45), rgba(12, 43, 36, 0.88));
}

.a3-kpi-card--progress {
  background: linear-gradient(135deg, rgba(22, 73, 158, 0.5), rgba(18, 34, 84, 0.88));
}

.a3-kpi-card--late {
  background: linear-gradient(135deg, rgba(156, 64, 38, 0.5), rgba(62, 33, 19, 0.92));
}

.a3-kpi-card--risk {
  background: linear-gradient(135deg, rgba(125, 47, 117, 0.5), rgba(46, 24, 55, 0.9));
}

.a3-kpi-card--window {
  background: linear-gradient(135deg, rgba(58, 89, 140, 0.45), rgba(26, 41, 69, 0.92));
}

.a3-project-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}

.a3-project-head__main label,
.a3-project-head__meta label,
.a3-panel label {
  display: block;
  margin-bottom: 8px;
  color: #b7c9ea;
  font-size: 13px;
}

.a3-project-head__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.a3-panel {
  padding: 20px;
}

.a3-panel textarea,
.a3-header-card input,
.a3-header-card select,
.a3-toolbar-card select,
.a3-toolbar-card input {
  width: 100%;
}

.a3-panel textarea {
  resize: vertical;
  min-height: 92px;
}

.a3-planning-board {
  display: grid;
  gap: 14px;
}

.a3-planning-board__header,
.a3-timeline-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 14px;
  align-items: stretch;
}

.a3-planning-board__sticky,
.a3-timeline-row__meta {
  background: rgba(20, 30, 48, 0.88);
  border: 1px solid rgba(88, 111, 154, 0.22);
  border-radius: 18px;
  padding: 14px 16px;
}

.a3-planning-board__sticky {
  display: flex;
  align-items: center;
  font-weight: 800;
  color: #eef4ff;
}

.a3-timeline-head,
.a3-timeline-row__grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(60px, 1fr);
  gap: 8px;
}

.a3-timeline-head__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  background: rgba(15, 24, 38, 0.92);
  border: 1px solid rgba(79, 111, 169, 0.24);
  border-radius: 16px;
  color: #dce8ff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 0 8px;
}

.a3-timeline-row__meta strong {
  display: block;
  color: #f3f7ff;
  font-size: 15px;
}

.a3-timeline-row__meta span {
  display: block;
  margin-top: 6px;
  color: #9eb2d4;
  font-size: 12px;
}

.a3-timeline-row__cell {
  min-height: 72px;
  background: rgba(13, 20, 32, 0.88);
  border: 1px solid rgba(69, 97, 145, 0.18);
  border-radius: 16px;
}

.a3-timeline-row__cell.is-active {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.a3-timeline-row__cell.is-planned {
  background: linear-gradient(135deg, rgba(86, 130, 255, 0.55), rgba(41, 66, 134, 0.96));
}

.a3-timeline-row__cell.is-ongoing {
  background: linear-gradient(135deg, rgba(95, 232, 143, 0.6), rgba(24, 112, 77, 0.96));
}

.a3-timeline-row__cell.is-late {
  background: linear-gradient(135deg, rgba(255, 129, 83, 0.72), rgba(141, 47, 34, 0.98));
}

.a3-timeline-row__cell.is-done {
  background: linear-gradient(135deg, rgba(151, 237, 64, 0.72), rgba(52, 131, 43, 0.98));
}

.a3-table-wrap input,
.a3-table-wrap select,
.a3-table-wrap textarea {
  width: 100%;
}

.a3-table-wrap textarea {
  min-height: 64px;
  resize: vertical;
}

.a3-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.a3-status-pill.is-todo {
  background: rgba(71, 86, 119, 0.36);
  color: #d9e4f8;
}

.a3-status-pill.is-planned {
  background: rgba(72, 107, 209, 0.32);
  color: #bed2ff;
}

.a3-status-pill.is-ongoing {
  background: rgba(59, 151, 102, 0.3);
  color: #baf2d2;
}

.a3-status-pill.is-late {
  background: rgba(196, 83, 57, 0.32);
  color: #ffd0c5;
}

.a3-status-pill.is-done {
  background: rgba(113, 186, 59, 0.3);
  color: #ddffbe;
}

@media (max-width: 1380px) {
  .a3-kpis-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .a3-project-head {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 980px) {
  .a3-kpis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .a3-project-head__meta {
    grid-template-columns: 1fr;
  }

  .a3-planning-board__header,
  .a3-timeline-row {
    grid-template-columns: 1fr;
  }
}

/* A3 v2 overrides */

.a3-shell {
  gap: 20px;
}

.a3-shell-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.a3-projects-card {
  position: sticky;
  top: 84px;
  background: linear-gradient(180deg, rgba(19, 29, 46, 0.98), rgba(14, 22, 36, 0.98));
  border: 1px solid rgba(90, 120, 170, 0.24);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 18px 40px rgba(3, 10, 20, 0.22);
}

.a3-workspace {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.a3-project-filter-grid {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.a3-projects-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.a3-projects-actions .btn {
  flex: 1 1 auto;
}

.a3-project-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  max-height: calc(100vh - 280px);
  overflow: auto;
  padding-right: 4px;
}

.a3-project-card {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(91, 117, 160, 0.2);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 27, 43, 0.98), rgba(13, 20, 31, 0.98));
  padding: 14px 16px;
  color: #eff5ff;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.a3-project-card:hover {
  transform: translateY(-1px);
  border-color: rgba(126, 209, 255, 0.34);
}

.a3-project-card.is-active {
  border-color: rgba(151, 237, 64, 0.55);
  box-shadow: 0 0 0 1px rgba(151, 237, 64, 0.25) inset;
}

.a3-project-card strong {
  display: block;
  font-size: 15px;
}

.a3-project-card span {
  display: block;
  margin-top: 6px;
  color: #a6b8d6;
  font-size: 12px;
}

.a3-project-card__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.a3-project-card__meta i {
  font-style: normal;
  font-size: 11px;
  color: #d7e7ff;
  background: rgba(65, 87, 122, 0.28);
  border: 1px solid rgba(120, 148, 191, 0.18);
  padding: 4px 8px;
  border-radius: 999px;
}

.a3-project-head__meta--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.a3-meta-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.a3-kpis-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.a3-kpi-card--budget {
  background: linear-gradient(135deg, rgba(21, 112, 123, 0.45), rgba(17, 59, 68, 0.94));
}

.a3-kpi-card--cost {
  background: linear-gradient(135deg, rgba(188, 92, 53, 0.46), rgba(78, 31, 19, 0.95));
}

.a3-kpi-card--gain {
  background: linear-gradient(135deg, rgba(110, 195, 73, 0.42), rgba(38, 82, 36, 0.94));
}

.a3-template-grid--rich {
  grid-template-columns: 1.15fr 1fr 1fr 1fr;
}

.a3-panel--hero {
  background:
    radial-gradient(circle at top left, rgba(82, 214, 255, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(17, 28, 48, 0.99), rgba(13, 21, 33, 0.99));
}

.a3-planning-scroll,
.a3-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
}

.a3-planning-board {
  min-width: fit-content;
}

.a3-planning-board__header,
.a3-timeline-row {
  grid-template-columns: 280px max-content;
}

.a3-timeline-head,
.a3-timeline-row__grid {
  grid-auto-columns: 60px;
  min-width: max-content;
}

.a3-timeline-row__grid {
  position: relative;
}

.a3-timeline-row__cell {
  min-height: 78px;
}

.a3-timeline-row__bar {
  position: absolute;
  top: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  min-width: 52px;
  padding: 0 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 800;
  color: #f6fbff;
  box-shadow: 0 12px 26px rgba(9, 14, 28, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
  z-index: 2;
}

.a3-timeline-row__bar span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.a3-timeline-row__bar.is-planned {
  background: linear-gradient(135deg, #5c7eff, #2f52b8);
}

.a3-timeline-row__bar.is-ongoing {
  background: linear-gradient(135deg, #46da8e, #1c8a68);
}

.a3-timeline-row__bar.is-late {
  background: linear-gradient(135deg, #ff8d68, #d6523e);
}

.a3-timeline-row__bar.is-done {
  background: linear-gradient(135deg, #a3f046, #5aaa3d);
}

.a3-actions-table {
  min-width: 1520px;
}

.a3-task-controls {
  display: grid;
  grid-template-columns: 36px minmax(92px, 1fr) 36px;
  gap: 6px;
  align-items: center;
}

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

@media (max-width: 1560px) {
  .a3-kpis-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .a3-meta-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .a3-project-head__meta--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .a3-projects-card {
    position: static;
  }
}

@media (max-width: 820px) {
  .a3-kpis-grid,
  .a3-meta-strip,
  .a3-template-grid--rich,
  .a3-project-head__meta--four {
    grid-template-columns: 1fr;
  }

  .a3-projects-actions {
    flex-direction: column;
  }
}

.report-refresh-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 14px;
  min-width: 86px;
  border-radius: 14px;
  border: 1px solid rgba(111, 150, 199, 0.22);
  background: rgba(20, 30, 48, 0.86);
  color: #d8e7ff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.report-refresh-badge.is-editable {
  cursor: pointer;
  border-color: rgba(149, 209, 69, 0.34);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.report-refresh-badge.is-editable:hover {
  transform: translateY(-1px);
  background: rgba(28, 41, 64, 0.94);
}

.refresh-widget {
  margin-top: 10px;
}

.refresh-widget--inline {
  margin-top: 0;
}

.refresh-widget__card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 16px;
  border: 1px solid rgba(111, 150, 199, 0.22);
  background: linear-gradient(180deg, rgba(24, 36, 58, 0.94), rgba(15, 24, 40, 0.98));
  color: #eaf2ff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.refresh-widget__value {
  font-size: 15px;
  font-weight: 800;
  color: #f4f9ff;
}

.page-title-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Panneau de configuration des favoris visibles dans la barre de gauche. */
.quick-nav-panel {
  margin-top: 18px;
  padding: 22px;
  border-radius: 26px;
  border: 1px solid rgba(104, 131, 170, 0.18);
  background: linear-gradient(180deg, rgba(18, 28, 45, 0.96), rgba(12, 20, 34, 0.98));
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.2);
}

.quick-nav-panel__header h2 {
  margin: 0;
  font-size: 28px;
}

.quick-nav-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.quick-nav-panel__header p {
  margin: 6px 0 0 0;
  color: var(--muted);
}

.quick-nav-preview,
.quick-nav-config {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.quick-nav-preview.hidden {
  display: none;
}

.quick-nav-pill,
.quick-nav-option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(104, 131, 170, 0.18);
  background: rgba(19, 28, 43, 0.82);
}

.quick-nav-option {
  position: relative;
  cursor: pointer;
  transition: 140ms ease;
}

.quick-nav-option:hover {
  border-color: rgba(151, 237, 64, 0.24);
  transform: translateY(-1px);
}

.quick-nav-option.is-active {
  border-color: rgba(151, 237, 64, 0.34);
  box-shadow: 0 0 0 1px rgba(151, 237, 64, 0.1) inset;
}

.quick-nav-option input {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 18px;
  height: 18px;
}

.quick-nav-pill .edge-nav__item-badge,
.quick-nav-option .edge-nav__item-badge {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
}

.quick-nav-pill__copy,
.quick-nav-option__copy {
  display: grid;
  gap: 4px;
}

.quick-nav-pill__copy strong,
.quick-nav-option__copy strong {
  font-size: 16px;
  color: #f3f8ff;
}

.quick-nav-pill__copy span,
.quick-nav-option__copy span,
.quick-nav-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.quick-nav-empty {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(111, 150, 199, 0.22);
  background: rgba(19, 28, 43, 0.56);
}

.menu-tile {
  position: relative;
}

.menu-tile-favorite {
  position: absolute;
  top: 12px;
  right: 12px;
  left: auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(122, 149, 191, 0.28);
  background: linear-gradient(180deg, rgba(27, 40, 63, 0.92), rgba(17, 27, 44, 0.96));
  color: rgba(236, 244, 255, 0.78);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 8;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  text-shadow: 0 0 12px rgba(255, 230, 128, 0.2);
  transition: 120ms ease;
  pointer-events: auto;
}

.menu-tile-favorite:hover {
  color: #fff4b7;
  border-color: rgba(255, 226, 111, 0.42);
  transform: scale(1.04);
}

.menu-tile-favorite.is-active {
  color: #ffd85a;
  background: linear-gradient(180deg, rgba(87, 68, 18, 0.9), rgba(55, 41, 8, 0.94));
  border-color: rgba(255, 216, 90, 0.42);
  box-shadow:
    0 0 0 1px rgba(255, 216, 90, 0.14) inset,
    0 10px 24px rgba(54, 40, 8, 0.34);
}

/* Ajustements de layout demandés :
   - barre administrateur figée et compacte en haut à droite,
   - contenu principal décalé pour ne jamais passer dessous,
   - étoiles favorites plus petites en haut à droite des cartes. */
.app-shell {
  padding-top: 92px;
}

.session-bar {
  position: fixed;
  top: 10px;
  right: 14px;
  left: auto;
  z-index: 4000;
  width: auto;
  max-width: calc(100vw - 90px);
  flex-wrap: nowrap;
}

.session-bar__actions {
  flex-wrap: nowrap;
}

.session-bar .btn {
  white-space: nowrap;
}

@media (max-width: 980px) {
  .app-shell {
    padding-top: 126px;
  }

  .session-bar {
    max-width: calc(100vw - 24px);
    right: 12px;
  }

  .session-bar__actions {
    flex-wrap: wrap;
  }
}

.icon-bank-select {
  margin-top: 10px;
  min-height: 46px;
}

/* ── Banque d'icônes — volet collapsible ── */
.icon-bank-details {
  border: 1px solid rgba(100, 126, 168, 0.22);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(10, 18, 32, 0.7);
}

.icon-bank-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: #c8d8f0;
  list-style: none;
  transition: background 0.16s ease;
}

.icon-bank-summary::-webkit-details-marker { display: none; }
.icon-bank-summary::marker { display: none; }

.icon-bank-summary:hover {
  background: rgba(79, 140, 255, 0.1);
}

.icon-bank-summary__arrow {
  margin-left: auto;
  font-size: 16px;
  color: rgba(168, 182, 199, 0.6);
  transition: transform 0.22s ease;
  flex-shrink: 0;
}

.icon-bank-details[open] .icon-bank-summary__arrow {
  transform: rotate(180deg);
}

.icon-bank-details .icon-bank-grid {
  padding: 12px;
  margin-top: 0;
  border-top: 1px solid rgba(100, 126, 168, 0.12);
  min-height: unset;
}

/* ── End icon bank collapsible ── */

.icon-bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 12px;
  margin-top: 12px;
  min-height: 128px;
  align-content: start;
}

.icon-bank-card {
  display: grid;
  gap: 10px;
  justify-items: center;
  min-height: 110px;
  padding: 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(100, 126, 168, 0.18);
  background: linear-gradient(180deg, rgba(20, 30, 48, 0.96), rgba(14, 21, 33, 0.98));
  color: #eef5ff;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.icon-bank-card:hover {
  transform: translateY(-2px);
  border-color: rgba(111, 210, 255, 0.32);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.2);
}

.icon-bank-card.is-active {
  border-color: rgba(151, 237, 64, 0.42);
  box-shadow: 0 0 0 1px rgba(151, 237, 64, 0.16) inset;
}

.icon-bank-card__preview {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(91, 140, 255, 0.28), rgba(255, 255, 255, 0.1));
}

.icon-bank-card__preview svg {
  width: 30px;
  height: 30px;
}

.icon-bank-card__label {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.icon-bank-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(112, 137, 178, 0.24);
  color: #9db0c8;
  background: rgba(14, 21, 33, 0.64);
}

/* 2026-04-25 modern refresh */
:root {
  --bg: #071018;
  --card: rgba(13, 23, 36, 0.82);
  --card-2: rgba(19, 33, 48, 0.92);
  --text: #f3f8ff;
  --muted: #9fb4ca;
  --line: rgba(164, 211, 255, 0.1);
  --line-soft: rgba(151, 237, 64, 0.16);
  --shadow: 0 24px 64px rgba(3, 8, 18, 0.44);
}

body {
  background:
    radial-gradient(circle at 14% 10%, rgba(121, 223, 104, 0.1), transparent 26%),
    radial-gradient(circle at 78% 8%, rgba(74, 165, 255, 0.14), transparent 20%),
    radial-gradient(circle at 45% 100%, rgba(54, 132, 92, 0.12), transparent 28%),
    linear-gradient(180deg, #06101a 0%, #091320 48%, #08111d 100%);
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.03), transparent 18%, transparent 82%, rgba(143, 225, 90, 0.02)),
    radial-gradient(circle at 20% 0%, rgba(143, 225, 90, 0.05), transparent 24%);
  opacity: 0.9;
}

.session-bar {
  top: 10px;
  right: 16px;
  padding: 9px 12px 9px 14px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(7, 16, 28, 0.92), rgba(11, 22, 36, 0.88)),
    linear-gradient(135deg, rgba(143, 225, 90, 0.05), rgba(79, 140, 255, 0.04));
  border-color: rgba(143, 225, 90, 0.2);
  backdrop-filter: blur(16px);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.session-bar .btn {
  background: linear-gradient(180deg, rgba(46, 60, 81, 0.94), rgba(31, 43, 61, 0.98));
  border-color: rgba(155, 180, 208, 0.18);
}

.session-bar .btn:hover {
  transform: translateY(-1px);
  border-color: rgba(143, 225, 90, 0.28);
}

.edge-nav {
  background:
    linear-gradient(180deg, rgba(9, 18, 31, 0.96), rgba(9, 18, 31, 0.9)),
    linear-gradient(180deg, rgba(126, 223, 138, 0.04), transparent 40%);
  border-color: rgba(143, 225, 90, 0.16);
  backdrop-filter: blur(18px);
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.edge-nav__item {
  border-radius: 22px;
}

.edge-nav__item:hover,
.edge-nav__item.is-active {
  background: linear-gradient(135deg, rgba(20, 43, 55, 0.98), rgba(26, 48, 78, 0.94));
  border-color: rgba(143, 225, 90, 0.22);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.edge-nav__item-badge,
.edge-nav__logo {
  box-shadow:
    0 10px 24px rgba(6, 10, 18, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(120, 157, 198, 0.16);
  background:
    linear-gradient(135deg, rgba(16, 32, 53, 0.96), rgba(13, 24, 40, 0.94) 46%, rgba(15, 44, 53, 0.88)),
    radial-gradient(circle at 18% 72%, rgba(143, 225, 90, 0.14), transparent 22%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 18%, rgba(124, 198, 255, 0.24), transparent 16%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
}

.hero-brand h1,
.page-title-line h1 {
  letter-spacing: -0.04em;
}

.home-context-strip,
.quick-nav-panel,
.page-section,
.settings-block,
.admin-row,
.modal-card,
.shortcut-list button,
.menu-tile,
.auth-card {
  backdrop-filter: blur(14px);
}

.home-context-strip,
.quick-nav-panel,
.settings-block,
.admin-row,
.modal-card,
.auth-card {
  border-color: rgba(129, 166, 207, 0.16);
  box-shadow:
    0 22px 52px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.025) inset;
}

.home-context-chip,
.btn,
.report-refresh-badge,
.refresh-widget__card {
  border-radius: 16px;
}

.btn {
  background: linear-gradient(180deg, rgba(49, 61, 80, 0.94), rgba(30, 42, 57, 0.98));
  border-color: rgba(156, 184, 219, 0.18);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(143, 225, 90, 0.26);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.18);
}

.btn-primary,
.btn-success {
  background: linear-gradient(135deg, #86ea48, #29b56a);
  color: #081015;
  border-color: rgba(151, 237, 64, 0.34);
}

.home-kpi-card {
  border-radius: 26px;
  box-shadow:
    0 22px 46px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.home-kpi-card strong {
  font-size: clamp(42px, 4vw, 54px);
  letter-spacing: -0.04em;
}

.home-kpi-card span {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

.menu-tile,
.shortcut-list button {
  border-radius: 24px;
  border-color: rgba(128, 165, 204, 0.14);
  background:
    linear-gradient(180deg, rgba(12, 21, 34, 0.94), rgba(8, 16, 28, 0.96)),
    linear-gradient(135deg, rgba(143, 225, 90, 0.04), transparent 35%);
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.menu-tile:hover,
.shortcut-list button:hover {
  transform: translateY(-3px);
  border-color: rgba(143, 225, 90, 0.2);
  box-shadow:
    0 28px 54px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(143, 225, 90, 0.08) inset;
}

.menu-tile-body strong,
.shortcut-list button strong {
  font-size: 28px;
  letter-spacing: -0.03em;
}

.menu-tile-body span,
.shortcut-list button span {
  color: #9ab0c9;
}

.menu-tile-icon,
.shortcut-card-icon {
  border-radius: 22px;
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.quick-nav-option {
  border-radius: 22px;
  border-color: rgba(127, 164, 203, 0.16);
  background:
    linear-gradient(180deg, rgba(16, 26, 42, 0.96), rgba(10, 18, 30, 0.98)),
    linear-gradient(135deg, rgba(143, 225, 90, 0.03), transparent 45%);
}

.quick-nav-option:hover,
.quick-nav-option.is-active {
  border-color: rgba(143, 225, 90, 0.22);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(143, 225, 90, 0.08) inset;
}

.shortcut-empty {
  border-radius: 20px;
  border-color: rgba(135, 170, 207, 0.18);
  background: rgba(20, 29, 44, 0.72);
}

/* ══════════════════════════════════════════════════════════════════════════
   MECACHROME DA — FINAL OVERRIDE BLOCK (v20260606)
   Applique la charte visuelle Mecachrome à toutes les pages et composants.
   Ce bloc est en fin de fichier pour s'assurer qu'il l'emporte sur tout.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Login : bouton centré ─────────────────────────────────────────────── */
.auth-brand__cta {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 52px;
}

.auth-launch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 64px;
  padding: 0 40px;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.3px;
  background: linear-gradient(135deg, #7ec832 0%, #95d145 45%, #5ea82a 100%);
  color: #071008;
  box-shadow:
    0 6px 32px rgba(149,209,69,0.42),
    0 2px 8px rgba(149,209,69,0.25),
    inset 0 1px 0 rgba(255,255,255,0.28);
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.auth-launch-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    0 12px 48px rgba(149,209,69,0.55),
    0 4px 16px rgba(149,209,69,0.3),
    inset 0 1px 0 rgba(255,255,255,0.3);
}
.auth-launch-btn:active { transform: translateY(0) scale(1); }
.auth-launch-btn svg { width: 22px; height: 22px; }
.auth-launch-btn__arrow { transition: transform 0.25s; }
.auth-launch-btn:hover .auth-launch-btn__arrow { transform: translateX(5px); }

.auth-launch-hint {
  margin: 0;
  font-size: 13px;
  color: rgba(168,182,199,0.55);
  letter-spacing: 0.2px;
}

.auth-brand__footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 40px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.auth-brand__footer-copy {
  font-size: 12px;
  color: rgba(168,182,199,0.4);
  letter-spacing: 0.3px;
}

/* ── Home hero ─────────────────────────────────────────────────────────── */
.hero {
  min-height: 260px;
  border-radius: 28px;
  padding: 38px 40px;
  margin-bottom: 18px;
  background:
    radial-gradient(ellipse at 10% 65%, rgba(149,209,69,0.14) 0%, transparent 35%),
    radial-gradient(ellipse at 90% 15%, rgba(79,140,255,0.16) 0%, transparent 32%),
    radial-gradient(ellipse at 55% 95%, rgba(79,140,255,0.07) 0%, transparent 28%),
    linear-gradient(140deg, #0a1828 0%, #0f2035 45%, #0c1b30 100%);
  border: 1px solid rgba(149,209,69,0.14);
  box-shadow:
    0 0 0 1px rgba(149,209,69,0.05),
    0 24px 64px rgba(0,0,0,0.42);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Precision grid */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(164,211,255,0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(164,211,255,0.038) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
/* Top-right corner mark */
.hero::after {
  content: '';
  position: absolute;
  top: 20px; right: 20px;
  width: 32px; height: 32px;
  border: 2px solid rgba(149,209,69,0.32);
  border-left: none; border-bottom: none;
  border-radius: 0 5px 0 0;
  pointer-events: none;
}

/* Hero title gradient */
.brand-mark__copy span {
  font-size: clamp(36px, 4.2vw, 68px) !important;
  line-height: 0.95 !important;
  letter-spacing: -0.05em !important;
  font-weight: 900 !important;
  background: linear-gradient(130deg, #edf5ff 0%, #95d145 55%, #4f8cff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-mark__copy small {
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.12em !important;
  color: rgba(149,209,69,0.7) !important;
}

.hero-subtitle {
  color: rgba(168,182,199,0.8) !important;
  font-size: 15px !important;
  margin-top: 6px;
}

/* MECACHROME watermark */
.hero-wordmark {
  opacity: 0.18;
  right: 38px;
  bottom: 28px;
}
.hero-wordmark__text {
  font-size: clamp(30px, 3.6vw, 58px);
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #b8cfe0;
  transform: skewX(-10deg);
}
.hero-wordmark__swoosh {
  width: 240px;
  height: 16px;
  background: linear-gradient(90deg, rgba(149,209,69,0.15), rgba(149,209,69,0.9) 45%, rgba(149,209,69,0.2));
  border-radius: 999px;
  transform: skewX(-38deg) translateX(-18px);
  box-shadow: 0 0 28px rgba(149,209,69,0.28);
}

/* ── KPI cards ─────────────────────────────────────────────────────────── */
.home-global-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.home-kpi-card {
  padding: 22px 20px;
  border-radius: 24px;
  border: 1px solid rgba(164,211,255,0.1);
  background: linear-gradient(160deg, rgba(14,24,38,0.98) 0%, rgba(10,18,30,0.99) 100%);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.04);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.home-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(149,209,69,0.22);
  box-shadow: 0 18px 44px rgba(0,0,0,0.35), 0 0 0 1px rgba(149,209,69,0.07);
}
/* Color-coded left bar per card */
.home-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}
.home-kpi-card:nth-child(1)::before { background: linear-gradient(180deg, #95d145, #4f8cff); }
.home-kpi-card:nth-child(2)::before { background: linear-gradient(180deg, #4f8cff, #2f81f7); }
.home-kpi-card:nth-child(3)::before { background: linear-gradient(180deg, #ef4444, #b91c1c); }
.home-kpi-card:nth-child(4)::before { background: linear-gradient(180deg, #f6a623, #d97706); }
.home-kpi-card:nth-child(5)::before { background: linear-gradient(180deg, #22c55e, #16a34a); }

/* Keep per-child colored backgrounds but make them subtler */
.home-kpi-card:nth-child(1) { background: linear-gradient(160deg, rgba(14,28,18,0.97), rgba(10,20,14,0.99)); border-color: rgba(149,209,69,0.15); }
.home-kpi-card:nth-child(2) { background: linear-gradient(160deg, rgba(14,22,46,0.97), rgba(10,16,36,0.99)); border-color: rgba(79,140,255,0.15); }
.home-kpi-card:nth-child(3) { background: linear-gradient(160deg, rgba(38,14,14,0.97), rgba(28,10,10,0.99)); border-color: rgba(239,68,68,0.15); }
.home-kpi-card:nth-child(4) { background: linear-gradient(160deg, rgba(38,28,10,0.97), rgba(28,20,8,0.99)); border-color: rgba(246,166,35,0.15); }
.home-kpi-card:nth-child(5) { background: linear-gradient(160deg, rgba(10,32,16,0.97), rgba(8,24,12,0.99)); border-color: rgba(34,197,94,0.15); }

.home-kpi-card span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(168,182,199,0.65);
  margin-bottom: 12px;
}
.home-kpi-card strong {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1;
  display: block;
}
.home-kpi-card:nth-child(1) strong { color: #95d145; }
.home-kpi-card:nth-child(2) strong { color: #7cb8ff; }
.home-kpi-card:nth-child(3) strong { color: #ff8080; }
.home-kpi-card:nth-child(4) strong { color: #f6a623; }
.home-kpi-card:nth-child(5) strong { color: #6ee7a0; }

/* ── Context strip (périmètre actif) ───────────────────────────────────── */
.home-context-strip {
  background:
    linear-gradient(135deg, rgba(12,22,36,0.98) 0%, rgba(10,18,30,0.98) 100%);
  border: 1px solid rgba(149,209,69,0.1);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.04);
}
.home-context-chip.is-active {
  background: linear-gradient(135deg, rgba(149,209,69,0.22), rgba(79,140,255,0.14));
  border-color: rgba(149,209,69,0.45);
  box-shadow: 0 0 0 1px rgba(149,209,69,0.12) inset, 0 4px 16px rgba(149,209,69,0.15);
  color: #d4f2a0;
}

/* ── Section titles ─────────────────────────────────────────────────────── */
.menu-section-title h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(120deg, #edf5ff 0%, #b0cfe8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.menu-section-title p {
  font-size: 13px;
  color: rgba(168,182,199,0.65);
}

/* ── Menu tiles (catégories) ────────────────────────────────────────────── */
.menu-tile {
  background: linear-gradient(155deg, rgba(14,22,34,0.98) 0%, rgba(10,16,26,0.99) 100%);
  border: 1px solid rgba(164,211,255,0.09);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.03);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.menu-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(149,209,69,0.28);
  background: linear-gradient(155deg, rgba(18,28,44,0.99) 0%, rgba(13,21,34,0.99) 100%);
  box-shadow:
    0 24px 56px rgba(0,0,0,0.38),
    0 0 0 1px rgba(149,209,69,0.1),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
.menu-tile-body strong { font-size: 16px; font-weight: 700; color: #edf5ff; }
.menu-tile-body span  { font-size: 13px; color: rgba(168,182,199,0.65); }

/* ── Topbar / page headers ──────────────────────────────────────────────── */
.topbar {
  background: linear-gradient(160deg, rgba(12,20,32,0.98) 0%, rgba(8,16,26,0.99) 100%);
  border: 1px solid rgba(149,209,69,0.1);
  border-radius: 22px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* ── Session bar ────────────────────────────────────────────────────────── */
.session-bar {
  background: linear-gradient(160deg, rgba(8,18,32,0.98) 0%, rgba(10,20,36,0.97) 100%);
  border: 1px solid rgba(149,209,69,0.22);
  border-radius: 18px;
  box-shadow:
    0 8px 28px rgba(0,0,0,0.4),
    0 0 0 1px rgba(149,209,69,0.06),
    inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ── Primary button (global) ────────────────────────────────────────────── */
.btn.primary {
  background: linear-gradient(135deg, #7ec832 0%, #95d145 50%, #5ea82a 100%) !important;
  color: #071008 !important;
  border: none !important;
  box-shadow: 0 4px 18px rgba(149,209,69,0.32), inset 0 1px 0 rgba(255,255,255,0.22) !important;
}
.btn.primary:hover {
  background: linear-gradient(135deg, #8fd43a 0%, #a2dd52 50%, #6bb82e 100%) !important;
  box-shadow: 0 6px 26px rgba(149,209,69,0.48), inset 0 1px 0 rgba(255,255,255,0.28) !important;
  transform: translateY(-1px);
}

/* ── Edge nav ───────────────────────────────────────────────────────────── */
.edge-nav {
  background: linear-gradient(180deg, rgba(7,14,26,0.99), rgba(8,16,30,0.97));
  border: 1px solid rgba(149,209,69,0.12);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.04);
}
.edge-nav:hover {
  border-color: rgba(149,209,69,0.25);
  box-shadow: 0 28px 70px rgba(0,0,0,0.5), 0 0 0 1px rgba(149,209,69,0.08), inset 0 1px 0 rgba(255,255,255,0.05);
}
.edge-nav__item.is-active {
  background: linear-gradient(160deg, rgba(20,40,70,0.98), rgba(12,26,48,0.98));
  border-color: rgba(149,209,69,0.3) !important;
  box-shadow: 0 0 0 1px rgba(149,209,69,0.12) inset, 0 12px 24px rgba(0,0,0,0.3);
}
.edge-nav:not(:hover) .edge-nav__item.is-active {
  border-color: rgba(149,209,69,0.32) !important;
  box-shadow: 0 0 20px rgba(149,209,69,0.12), 0 0 0 1px rgba(149,209,69,0.14) inset;
}

/* ── General cards / panels ─────────────────────────────────────────────── */
.home-kpi-card,
.powerbi-card,
.shortcuts-card,
.qrqc-kpis-card,
.qrqc-case-card,
.qrqc-visual-card,
.qrqc-actions-card,
.sync-card,
.a3-toolbar-card,
.a3-header-card,
.a3-planning-card,
.a3-actions-card {
  border-radius: 24px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* ── App shell background ───────────────────────────────────────────────── */
html, body {
  background:
    radial-gradient(ellipse at 15% 10%, rgba(149,209,69,0.08) 0%, transparent 25%),
    radial-gradient(ellipse at 88% 6%, rgba(79,140,255,0.09) 0%, transparent 22%),
    radial-gradient(ellipse at 50% 95%, rgba(79,140,255,0.05) 0%, transparent 25%),
    linear-gradient(180deg, #060d16 0%, #08101e 100%);
  background-attachment: fixed;
}

/* ── Responsive login ───────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .auth-brand { padding: 32px 24px 80px; }
  .auth-launch-btn { height: 56px; font-size: 16px; padding: 0 28px; }
  .auth-brand__cta { margin-top: 36px; }
}

/* ══════════════════════════════════════════════════════════════════════
   EDGE-NAV FLEX LAYOUT
   ══════════════════════════════════════════════════════════════════════ */
#edgeNav {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  z-index: 9999 !important;   /* toujours au-dessus de TOUT */
}
#edgeNavItems {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
}
#edgeNavItems::-webkit-scrollbar { display: none !important; }
.edge-nav__footer {
  flex-shrink: 0 !important;
  padding: 8px 0 0 !important;
  border-top: 1px solid rgba(255,255,255,0.07) !important;
}
/* Charts nav item: same as regular items, no special overrides */
#chartsNavBtn.is-active {
  background: linear-gradient(160deg, rgba(20,40,70,0.98), rgba(12,26,48,0.98)) !important;
  border-color: rgba(149,209,69,0.3) !important;
  box-shadow: 0 0 0 1px rgba(149,209,69,0.12) inset, 0 12px 24px rgba(0,0,0,0.3) !important;
}

/* ══════════════════════════════════════════════════════════════════════
   SESSION BAR — ancrée en haut à droite, contre le bord
   ══════════════════════════════════════════════════════════════════════ */
#sessionBar {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 8000 !important;
  border-radius: 0 0 0 20px !important;
  border-top: none !important;
  border-right: none !important;
  padding: 12px 22px !important;
  background: linear-gradient(160deg, rgba(8,16,30,0.99), rgba(10,20,38,0.98)) !important;
  border: 1px solid rgba(149,209,69,0.18) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), inset 0 -1px 0 rgba(149,209,69,0.08) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}
/* IMPORTANT : la classe .hidden continue à masquer la barre */
#sessionBar.hidden {
  display: none !important;
}

/* ══════════════════════════════════════════════════════════════════════
   CHARTS MODULE — Éditeur Lucidchart-like complet
   ══════════════════════════════════════════════════════════════════════ */

/* Overlay principal */
.ch-overlay { position:fixed; left:0; top:0; right:0; bottom:0; z-index:100000;
  background:#151e30; display:flex; flex-direction:column; font-family:'Inter',system-ui,sans-serif;
  color:#e8edf2; }
@media (max-width:640px) { .ch-overlay { left:0 !important; bottom:68px !important; } }
.ch-hidden { display:none !important; }

/* ── Toolbar ────────────────────────────────────────────────────────── */
.ch-toolbar { display:flex; align-items:center; justify-content:space-between; gap:8px;
  height:52px; padding:0 12px; background:rgba(8,16,30,0.98);
  border-bottom:1px solid rgba(255,255,255,0.07); flex-shrink:0; }
.ch-tb-left  { display:flex; align-items:center; gap:10px; min-width:180px; }
.ch-tb-center{ display:flex; align-items:center; gap:4px; flex:1; justify-content:center; flex-wrap:wrap; }
.ch-tb-right { display:flex; align-items:center; gap:8px; min-width:180px; justify-content:flex-end; }
.ch-tb-title { font-size:14px; font-weight:700; color:#95d145; letter-spacing:0.02em; }
.ch-tb-sep   { width:1px; height:24px; background:rgba(255,255,255,0.1); margin:0 4px; }
.ch-tb-tool  { display:flex; align-items:center; justify-content:center;
  width:32px; height:32px; border-radius:8px; border:1px solid transparent;
  background:transparent; color:#a0b0c8; cursor:pointer; font-size:14px; font-weight:600;
  transition:all 0.15s; }
.ch-tb-tool:hover { background:rgba(255,255,255,0.08); color:#e8edf2; }
.ch-tb-tool.is-active { background:rgba(149,209,69,0.18); border-color:rgba(149,209,69,0.4); color:#95d145; }
.ch-zoom-lbl { font-size:12px; font-weight:600; color:#7a8fa8; min-width:40px; text-align:center; }

/* ── Body layout ────────────────────────────────────────────────────── */
.ch-body { display:flex; flex:1; min-height:0; overflow:hidden; }

/* ── Left panel ─────────────────────────────────────────────────────── */
.ch-left-panel { width:200px; flex-shrink:0; background:rgba(6,12,22,0.98);
  border-right:1px solid rgba(255,255,255,0.07); display:flex; flex-direction:column;
  overflow:hidden; }
.ch-panel-tabs { display:flex; border-bottom:1px solid rgba(255,255,255,0.07); }
.ch-panel-tab  { flex:1; padding:10px 4px; background:transparent; border:none;
  color:#7a8fa8; font-size:12px; font-weight:600; cursor:pointer; border-bottom:2px solid transparent; }
.ch-panel-tab.is-active { color:#95d145; border-bottom-color:#95d145; }
.ch-search-wrap { padding:8px; }
.ch-search-inp { width:100%; padding:6px 10px; background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.1); border-radius:8px; color:#e8edf2;
  font-size:12px; outline:none; box-sizing:border-box; }
.ch-search-inp:focus { border-color:rgba(149,209,69,0.4); }
.ch-shape-list { flex:1; overflow-y:auto; padding:4px 6px 16px; scrollbar-width:thin; scrollbar-color:rgba(255,255,255,0.1) transparent; }
.ch-shape-cat { margin-bottom:12px; }
.ch-shape-cat-title { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.08em;
  color:#4a5a70; padding:4px 4px 6px; }
.ch-shape-grid { display:grid; grid-template-columns:1fr 1fr; gap:4px; }
.ch-shape-btn  { display:flex; flex-direction:column; align-items:center; gap:3px;
  padding:6px 4px; background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.06);
  border-radius:8px; cursor:pointer; color:#a0b0c8; transition:all 0.15s; }
.ch-shape-btn:hover { background:rgba(79,140,255,0.12); border-color:rgba(79,140,255,0.3); color:#7ab8ff; }
.ch-shape-btn-lbl { font-size:9px; font-weight:600; text-align:center; line-height:1.2;
  color:inherit; max-width:80px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ── Canvas ─────────────────────────────────────────────────────────── */
.ch-canvas-wrap { flex:1; min-width:0; position:relative; overflow:hidden; background:#253550; min-height:0; }
.ch-svg-canvas  { position:absolute; top:0; left:0; width:100%; height:100%; display:block; }
.ch-element { cursor:default; }
.ch-hit { cursor:move; }
.ch-handle { cursor:pointer; }
.ch-rot-handle { cursor:grab; }
.ch-conn { cursor:pointer; }
.ch-conn-hit { cursor:pointer; }
.ch-anchor { cursor:crosshair; }

/* ── Right panel ────────────────────────────────────────────────────── */
.ch-right-panel { width:220px; flex-shrink:0; background:rgba(6,12,22,0.98);
  border-left:1px solid rgba(255,255,255,0.07); overflow-y:auto; scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,0.1) transparent; padding:8px 0 24px; }
.ch-props-empty { padding:32px 16px; text-align:center; color:#4a5a70; font-size:13px; line-height:1.5; }
.ch-props-section { padding:10px 14px 6px; border-bottom:1px solid rgba(255,255,255,0.05); }
.ch-props-section-title { font-size:10px; font-weight:700; text-transform:uppercase;
  letter-spacing:0.08em; color:#4a5a70; margin-bottom:8px; }
.ch-prop-row { display:flex; align-items:center; justify-content:space-between; gap:6px;
  margin-bottom:6px; }
.ch-prop-lbl { font-size:11px; color:#7a8fa8; flex-shrink:0; min-width:42px; }
.ch-prop-num { width:70px; padding:3px 6px; background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.1); border-radius:6px; color:#e8edf2;
  font-size:12px; text-align:right; outline:none; -moz-appearance:textfield; }
.ch-prop-num::-webkit-outer-spin-button,.ch-prop-num::-webkit-inner-spin-button{ -webkit-appearance:none; }
.ch-prop-num:focus { border-color:rgba(149,209,69,0.4); }
.ch-color-wrap { display:flex; align-items:center; gap:4px; }
.ch-color-inp { width:28px; height:24px; border:none; border-radius:5px; cursor:pointer; padding:0; background:none; }
.ch-color-txt { width:68px; padding:3px 5px; background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.1); border-radius:6px; color:#e8edf2; font-size:11px; outline:none; }
.ch-color-txt:focus { border-color:rgba(149,209,69,0.4); }
.ch-slider-wrap { display:flex; align-items:center; gap:6px; flex:1; }
.ch-slider { flex:1; accent-color:#95d145; cursor:pointer; }
.ch-slider-lbl { font-size:10px; color:#7a8fa8; min-width:28px; text-align:right; }
.ch-select { padding:3px 6px; background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.1); border-radius:6px; color:#e8edf2;
  font-size:11px; outline:none; cursor:pointer; }
.ch-select:focus { border-color:rgba(149,209,69,0.4); }
.ch-align-btns { display:flex; gap:2px; }
.ch-align-btn { width:26px; height:22px; border-radius:5px; border:1px solid rgba(255,255,255,0.1);
  background:rgba(255,255,255,0.04); color:#7a8fa8; cursor:pointer; font-size:12px;
  display:flex; align-items:center; justify-content:center; }
.ch-align-btn.is-active { background:rgba(149,209,69,0.18); border-color:rgba(149,209,69,0.4); color:#95d145; }
.ch-prop-actions { display:flex; gap:6px; padding:12px 14px 0; }
.ch-prop-actions .ch-btn { flex:1; font-size:11px; padding:6px 4px; }

/* ── Page bar ───────────────────────────────────────────────────────── */
.ch-page-bar { display:flex; align-items:center; gap:2px; padding:0 8px;
  height:36px; background:rgba(5,10,18,0.98); border-top:1px solid rgba(255,255,255,0.07);
  flex-shrink:0; overflow-x:auto; scrollbar-width:none; }
.ch-page-bar::-webkit-scrollbar { display:none; }
.ch-page-tab { display:flex; align-items:center; gap:6px; padding:4px 12px;
  border-radius:6px 6px 0 0; border:1px solid transparent; border-bottom:none;
  color:#7a8fa8; font-size:12px; font-weight:600; cursor:pointer; white-space:nowrap;
  transition:all 0.15s; user-select:none; }
.ch-page-tab:hover { background:rgba(255,255,255,0.06); color:#e8edf2; }
.ch-page-tab.is-active { background:rgba(149,209,69,0.1); border-color:rgba(149,209,69,0.25); color:#95d145; }
.ch-page-tab-close { font-size:14px; color:#4a5a70; padding:0 2px; line-height:1; }
.ch-page-tab-close:hover { color:#ef4444; }
.ch-page-tab-inp { background:transparent; border:none; outline:none; color:#95d145; font-size:12px; font-weight:600; width:80px; }
.ch-page-add { width:28px; height:28px; border-radius:6px; border:1px solid rgba(255,255,255,0.1);
  background:rgba(255,255,255,0.04); color:#7a8fa8; cursor:pointer; font-size:18px; line-height:1;
  display:flex; align-items:center; justify-content:center; margin-left:4px; }
.ch-page-add:hover { background:rgba(149,209,69,0.12); color:#95d145; }

/* ── Status bar ─────────────────────────────────────────────────────── */
.ch-status-bar { display:flex; align-items:center; gap:16px; padding:0 14px;
  height:24px; background:rgba(4,8,16,0.98); border-top:1px solid rgba(255,255,255,0.05);
  flex-shrink:0; font-size:11px; color:#4a5a70; }
.ch-status-bar span + span::before { content:'·'; margin-right:16px; }

/* ── Buttons ────────────────────────────────────────────────────────── */
.ch-btn { display:inline-flex; align-items:center; gap:6px; padding:7px 14px;
  border-radius:8px; border:1px solid transparent; font-size:12px; font-weight:600;
  cursor:pointer; transition:all 0.15s; white-space:nowrap; }
.ch-btn-ghost   { background:rgba(255,255,255,0.05); border-color:rgba(255,255,255,0.1); color:#b0c0d0; }
.ch-btn-ghost:hover { background:rgba(255,255,255,0.1); color:#e8edf2; }
.ch-btn-ghost:disabled { opacity:0.35; cursor:default; }
.ch-btn-primary { background:rgba(149,209,69,0.2); border-color:rgba(149,209,69,0.45); color:#95d145; }
.ch-btn-primary:hover { background:rgba(149,209,69,0.3); }
.ch-btn-danger  { background:rgba(239,68,68,0.15); border-color:rgba(239,68,68,0.35); color:#f87171; }
.ch-btn-danger:hover { background:rgba(239,68,68,0.25); }

/* ── Context menu ───────────────────────────────────────────────────── */
.ch-ctx-menu { background:rgba(10,18,32,0.98); border:1px solid rgba(255,255,255,0.1);
  border-radius:10px; padding:4px; min-width:180px;
  box-shadow:0 16px 48px rgba(0,0,0,0.6); backdrop-filter:blur(16px); }
.ch-ctx-item { display:block; width:100%; padding:7px 12px; text-align:left;
  background:transparent; border:none; border-radius:7px; color:#c0d0e0;
  font-size:13px; cursor:pointer; transition:background 0.12s; }
.ch-ctx-item:hover { background:rgba(255,255,255,0.08); }
.ch-ctx-danger { color:#f87171; }
.ch-ctx-danger:hover { background:rgba(239,68,68,0.12); }
.ch-ctx-disabled { opacity:0.35; cursor:default; }
.ch-ctx-sep { height:1px; background:rgba(255,255,255,0.07); margin:3px 0; }
.ch-ctx-active { color:#95d145; background:rgba(149,209,69,0.08); }
.ch-ctx-active:hover { background:rgba(149,209,69,0.14); }

/* ── Modal ──────────────────────────────────────────────────────────── */
.ch-modal { position:fixed; inset:0; z-index:120000; background:rgba(0,0,0,0.7);
  display:flex; align-items:center; justify-content:center; backdrop-filter:blur(6px); }
.ch-modal-box { background:rgba(10,18,32,0.98); border:1px solid rgba(255,255,255,0.1);
  border-radius:18px; padding:28px; min-width:480px; max-width:700px; max-height:85vh;
  overflow-y:auto; box-shadow:0 24px 80px rgba(0,0,0,0.7); }
.ch-modal-title { font-size:18px; font-weight:800; color:#e8edf2; margin-bottom:20px; }
.ch-modal-close { margin-top:20px; }
.ch-modal-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:20px; }

/* ── Templates grid ─────────────────────────────────────────────────── */
.ch-tpl-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.ch-tpl-card { padding:16px; background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.08);
  border-radius:12px; cursor:pointer; transition:all 0.2s; text-align:center; }
.ch-tpl-card:hover { background:rgba(149,209,69,0.1); border-color:rgba(149,209,69,0.35); transform:translateY(-2px); }
.ch-tpl-icon { font-size:28px; margin-bottom:8px; }
.ch-tpl-name { font-size:13px; font-weight:700; color:#d4f2a0; margin-bottom:4px; }
.ch-tpl-desc { font-size:11px; color:#6a7a90; }

/* ── Export format buttons ──────────────────────────────────────────── */
.ch-exp-fmts { display:flex; gap:10px; margin-bottom:16px; }
.ch-exp-fmt-btn { flex:1; padding:14px 10px; background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.1); border-radius:12px; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; gap:4px; transition:all 0.15s; }
.ch-exp-fmt-btn:hover,.ch-exp-fmt-btn.is-active { background:rgba(149,209,69,0.12); border-color:rgba(149,209,69,0.4); }
.ch-exp-fmt-icon  { font-size:22px; }
.ch-exp-fmt-label { font-size:13px; font-weight:700; color:#e8edf2; }
.ch-exp-fmt-desc  { font-size:10px; color:#6a7a90; }

/* ── Compat: old charts overlay ─────────────────────────────────────── */
.charts-page-overlay { position:fixed; left:86px; top:0; right:0; bottom:0; z-index:998; background: linear-gradient(180deg,#060d16,#08101e); display:flex; flex-direction:column; }
.charts-page-overlay.hidden { display:none; }
.charts-list-view { display:flex; flex-direction:column; height:100%; overflow-y:auto; padding:20px 28px; }
.charts-list-header { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:28px; padding:20px 24px; border-radius:22px; background:linear-gradient(140deg,#0a1828,#0f2035); border:1px solid rgba(149,209,69,0.12); }
.charts-list-header__left { display:flex; align-items:center; gap:20px; }
.charts-list-title h1 { margin:0 0 4px; font-size:22px; font-weight:800; }
.charts-list-title p { margin:0; font-size:13px; color:rgba(168,182,199,0.7); }
.charts-back-btn { display:flex; align-items:center; gap:8px; }
.charts-new-btn { display:flex; align-items:center; gap:8px; }
.charts-tabs-bar { display:flex; gap:8px; margin-bottom:20px; }
.charts-tab { height:38px; padding:0 18px; border-radius:12px; border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.03); color:rgba(168,182,199,0.7); font-size:14px; font-weight:600; cursor:pointer; transition:all 0.18s; }
.charts-tab.is-active { background:rgba(149,209,69,0.15); border-color:rgba(149,209,69,0.35); color:#d4f2a0; }
.charts-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px,1fr)); gap:16px; }
.charts-empty-state { grid-column:1/-1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; padding:80px 24px; text-align:center; border:1px dashed rgba(149,209,69,0.2); border-radius:24px; }
.charts-empty-state h3 { margin:0; font-size:18px; }
.charts-empty-state p { margin:0; color:rgba(168,182,199,0.6); font-size:14px; }
.charts-card { background:linear-gradient(155deg,rgba(14,22,34,0.98),rgba(10,16,26,0.99)); border:1px solid rgba(164,211,255,0.09); border-radius:20px; overflow:hidden; cursor:pointer; transition:all 0.2s; }
.charts-card:hover { border-color:rgba(149,209,69,0.28); transform:translateY(-3px); box-shadow:0 20px 50px rgba(0,0,0,0.35),0 0 0 1px rgba(149,209,69,0.08); }
.charts-card__preview { height:120px; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,rgba(10,18,32,0.95),rgba(8,14,26,0.98)); position:relative; }
.charts-card__preview-icon { font-size:48px; }
.charts-card__shared-badge { position:absolute; top:10px; right:10px; padding:3px 10px; border-radius:100px; background:rgba(149,209,69,0.2); border:1px solid rgba(149,209,69,0.35); color:#95d145; font-size:11px; font-weight:700; }
.charts-card__info { padding:14px 16px 10px; }
.charts-card__name { display:block; font-size:14px; font-weight:700; color:#edf5ff; margin-bottom:4px; }
.charts-card__meta { font-size:12px; color:rgba(168,182,199,0.55); }
.charts-card__actions { display:flex; gap:8px; padding:0 16px 14px; }
.charts-card__action { height:32px; width:32px; border-radius:10px; border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.04); color:rgba(168,182,199,0.7); cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all 0.18s; }
.charts-card__action:hover { background:rgba(255,255,255,0.1); color:#edf5ff; }
.charts-card__delete:hover { background:rgba(239,68,68,0.15); border-color:rgba(239,68,68,0.3); color:#ff8080; }
.charts-editor-view { display:flex; flex-direction:column; height:100%; }
.charts-editor-view.hidden { display:none; }
.charts-toolbar { display:flex; align-items:center; gap:12px; padding:10px 16px; background:linear-gradient(160deg,rgba(10,18,30,0.98),rgba(8,14,24,0.99)); border-bottom:1px solid rgba(149,209,69,0.1); flex-shrink:0; }
.charts-toolbar__left { display:flex; align-items:center; gap:12px; flex:1; min-width:0; }
.charts-toolbar__tools { display:flex; align-items:center; gap:6px; }
.charts-toolbar__right { display:flex; align-items:center; gap:8px; }
.charts-title-input { flex:1; min-width:0; max-width:300px; height:36px; padding:0 12px; border-radius:10px; background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.09); color:#edf5ff; font-size:15px; font-weight:700; outline:none; }
.charts-title-input:focus { border-color:rgba(149,209,69,0.4); background:rgba(149,209,69,0.05); }
.charts-tool-btn { height:36px; min-width:36px; padding:0 10px; border-radius:10px; border:1px solid rgba(255,255,255,0.07); background:rgba(255,255,255,0.04); color:rgba(168,182,199,0.8); cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px; transition:all 0.18s; font-size:13px; }
.charts-tool-btn:hover { background:rgba(255,255,255,0.09); color:#edf5ff; border-color:rgba(255,255,255,0.14); }
.charts-tool-btn.is-active { background:rgba(149,209,69,0.18); border-color:rgba(149,209,69,0.4); color:#95d145; }
.charts-tool-btn--danger:hover { background:rgba(239,68,68,0.15); border-color:rgba(239,68,68,0.3); color:#ff8080; }
.charts-tool-sep { width:1px; height:24px; background:rgba(255,255,255,0.09); margin:0 4px; }
.charts-zoom-label { font-size:12px; color:rgba(168,182,199,0.6); font-weight:600; min-width:38px; text-align:center; }
.charts-share-btn { display:flex; align-items:center; gap:8px; }
.charts-style-panel { display:flex; align-items:center; gap:16px; padding:8px 16px; background:rgba(8,14,24,0.95); border-bottom:1px solid rgba(255,255,255,0.06); flex-shrink:0; flex-wrap:wrap; }
.charts-style-panel.hidden { display:none; }
.charts-style-panel__row { display:flex; align-items:center; gap:8px; }
.charts-style-panel__row span { font-size:12px; color:rgba(168,182,199,0.6); font-weight:600; text-transform:uppercase; letter-spacing:0.4px; white-space:nowrap; }
.charts-shape-picker { display:flex; gap:4px; }
.charts-shape-picker button { width:32px; height:32px; border-radius:8px; border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.04); color:rgba(168,182,199,0.8); cursor:pointer; font-size:14px; transition:all 0.15s; }
.charts-shape-picker button.is-active,.charts-shape-picker button:hover { background:rgba(149,209,69,0.18); border-color:rgba(149,209,69,0.4); color:#95d145; }
.charts-color-picker { display:flex; gap:5px; align-items:center; }
.charts-color-swatch { width:22px; height:22px; border-radius:6px; border:2px solid transparent; cursor:pointer; transition:all 0.15s; }
.charts-color-swatch:hover { transform:scale(1.2); }
.charts-color-swatch.is-active { border-color:#edf5ff; transform:scale(1.15); box-shadow:0 0 8px rgba(255,255,255,0.3); }
.charts-custom-color { width:26px; height:26px; border-radius:6px; border:1px solid rgba(255,255,255,0.15); background:transparent; cursor:pointer; padding:1px; }
.charts-font-slider { width:80px; accent-color:#95d145; }
.charts-style-toggle { height:28px; padding:0 10px; border-radius:8px; border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.04); color:rgba(168,182,199,0.8); cursor:pointer; font-weight:700; font-size:14px; transition:all 0.15s; }
.charts-style-toggle.is-active { background:rgba(149,209,69,0.18); border-color:rgba(149,209,69,0.4); color:#95d145; }
.charts-canvas-wrap { flex:1; position:relative; overflow:hidden; background:#070e18; background-image: radial-gradient(ellipse at 25% 30%, rgba(149,209,69,0.04), transparent 40%), radial-gradient(ellipse at 80% 70%, rgba(79,140,255,0.04), transparent 40%), linear-gradient(rgba(164,211,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(164,211,255,0.025) 1px, transparent 1px); background-size:100% 100%, 100% 100%, 40px 40px, 40px 40px; }
.charts-svg { width:100%; height:100%; display:block; }
.chart-node { cursor:grab; }
.chart-node.is-selected > * { filter:none; }
.chart-add-child { cursor:pointer; }
.charts-canvas-hint { position:absolute; bottom:14px; left:50%; transform:translateX(-50%); font-size:12px; color:rgba(168,182,199,0.3); pointer-events:none; white-space:nowrap; }
.chart-label-input { position:absolute; display:none; background:rgba(10,18,30,0.95); border:2px solid #95d145; border-radius:8px; color:#edf5ff; text-align:center; font-family:Segoe UI,Inter,Arial,sans-serif; font-weight:600; outline:none; z-index:10; padding:4px 8px; box-shadow:0 0 20px rgba(149,209,69,0.3); }
.charts-modal-backdrop { position:fixed; inset:0; z-index:1100; background:rgba(0,0,0,0.65); display:flex; align-items:center; justify-content:center; backdrop-filter:blur(8px); }
.charts-modal-backdrop.hidden { display:none; }
.charts-modal { background:linear-gradient(160deg,rgba(14,24,38,0.99),rgba(10,18,30,0.99)); border:1px solid rgba(149,209,69,0.15); border-radius:24px; padding:32px; width:min(520px,calc(100vw - 32px)); box-shadow:0 32px 80px rgba(0,0,0,0.6); }
.charts-modal h2 { margin:0 0 6px; font-size:20px; font-weight:800; }
.charts-modal p { margin:0 0 20px; color:rgba(168,182,199,0.7); font-size:14px; }
.charts-modal-input { width:100%; height:48px; padding:0 16px; border-radius:12px; background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.1); color:#edf5ff; font-size:15px; outline:none; margin-bottom:20px; box-sizing:border-box; }
.charts-modal-input:focus { border-color:rgba(149,209,69,0.5); background:rgba(149,209,69,0.04); box-shadow:0 0 0 3px rgba(149,209,69,0.1); }
.charts-modal-types { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:24px; }
.charts-type-btn { display:flex; flex-direction:column; align-items:center; gap:8px; padding:16px 12px; border-radius:16px; border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.03); cursor:pointer; transition:all 0.18s; text-align:center; }
.charts-type-btn.is-active { background:rgba(149,209,69,0.15); border-color:rgba(149,209,69,0.4); }
.charts-type-btn:hover { background:rgba(255,255,255,0.06); border-color:rgba(255,255,255,0.15); }
.charts-type-icon { font-size:28px; }
.charts-type-btn strong { font-size:13px; font-weight:700; color:#edf5ff; }
.charts-type-btn span { font-size:11px; color:rgba(168,182,199,0.6); }
.charts-modal-actions { display:flex; justify-content:flex-end; gap:12px; }
.charts-share-contexts { display:flex; flex-direction:column; gap:10px; margin-bottom:24px; max-height:280px; overflow-y:auto; }
.charts-share-ctx { display:flex; align-items:center; gap:12px; padding:12px 16px; border-radius:14px; border:1px solid rgba(255,255,255,0.07); background:rgba(255,255,255,0.03); cursor:pointer; transition:all 0.15s; }
.charts-share-ctx:has(input:checked) { background:rgba(149,209,69,0.12); border-color:rgba(149,209,69,0.3); }
.charts-share-ctx input { accent-color:#95d145; width:16px; height:16px; }
.charts-share-ctx span { font-size:14px; font-weight:600; color:#edf5ff; }

/* ── Editor body layout (shape lib + canvas) ── */
.charts-editor-body { display:flex; flex:1; min-height:0; position:relative; overflow:hidden; }
.charts-canvas-wrap { flex:1; min-width:0; position:relative; overflow:hidden; background:#070e18; background-image:radial-gradient(ellipse at 25% 30%,rgba(149,209,69,0.04),transparent 40%),radial-gradient(ellipse at 80% 70%,rgba(79,140,255,0.04),transparent 40%),linear-gradient(rgba(164,211,255,0.025) 1px,transparent 1px),linear-gradient(90deg,rgba(164,211,255,0.025) 1px,transparent 1px); background-size:100% 100%,100% 100%,40px 40px,40px 40px; }

/* ── Shape library panel ── */
.charts-shape-panel { width:220px; flex-shrink:0; background:linear-gradient(180deg,rgba(10,18,30,0.98),rgba(7,14,24,0.99)); border-right:1px solid rgba(149,209,69,0.1); overflow-y:auto; display:flex; flex-direction:column; scrollbar-width:thin; scrollbar-color:rgba(149,209,69,0.2) transparent; }
.charts-shape-panel.hidden { display:none; }
.charts-shape-panel__header { display:flex; align-items:center; justify-content:space-between; padding:14px 14px 10px; border-bottom:1px solid rgba(255,255,255,0.06); flex-shrink:0; }
.charts-shape-panel__header span { font-size:13px; font-weight:700; color:rgba(168,182,199,0.8); text-transform:uppercase; letter-spacing:0.5px; }
.charts-shape-panel__close { width:26px; height:26px; border-radius:8px; border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.04); color:rgba(168,182,199,0.6); cursor:pointer; font-size:12px; display:flex; align-items:center; justify-content:center; transition:all 0.15s; }
.charts-shape-panel__close:hover { background:rgba(239,68,68,0.15); border-color:rgba(239,68,68,0.3); color:#ff8080; }
.charts-shape-cat-label { padding:10px 14px 4px; font-size:11px; font-weight:700; color:rgba(149,209,69,0.7); text-transform:uppercase; letter-spacing:0.6px; }
.charts-shape-cat-grid { display:grid; grid-template-columns:1fr 1fr; gap:6px; padding:4px 10px 10px; }
.charts-shape-lib-btn { display:flex; flex-direction:column; align-items:center; gap:5px; padding:10px 6px; border-radius:12px; border:1px solid rgba(255,255,255,0.07); background:rgba(255,255,255,0.03); color:rgba(168,182,199,0.8); cursor:pointer; transition:all 0.18s; font-size:0; }
.charts-shape-lib-btn span { font-size:10px; font-weight:600; color:rgba(168,182,199,0.65); text-align:center; line-height:1.2; }
.charts-shape-lib-btn:hover { background:rgba(79,140,255,0.12); border-color:rgba(79,140,255,0.3); }

/* ══════════════════════════════════════════════════════════════════════════
   NAV PROFILE — User profile integrated in edge-nav brand area
   ══════════════════════════════════════════════════════════════════════════ */

/* Make brand area clickable / hoverable */
.nav-profile-trigger {
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 16px 16px 0 0;
  user-select: none;
}
.nav-profile-trigger:hover {
  background: rgba(149,209,69,0.07) !important;
}
.nav-profile-trigger[aria-expanded="true"] {
  background: rgba(149,209,69,0.1) !important;
}

/* Profile dropdown inside edge-nav */
.nav-profile-dropdown {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 10px 12px;
  background: linear-gradient(160deg, rgba(10,20,36,0.99), rgba(7,14,26,0.99));
  border-bottom: 1px solid rgba(149,209,69,0.15);
  flex-shrink: 0;
}
.nav-profile-dropdown.hidden { display: none; }

.nav-profile-dropdown__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px 12px;
}
.nav-profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #95d145, #4f8cff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #060d16;
  flex-shrink: 0;
}
.nav-profile-dropdown__sep {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 3px 0;
}
.nav-profile-dropdown__btn {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(212,232,240,0.85);
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-profile-dropdown__btn:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.1);
  color: #edf5ff;
}
.nav-profile-dropdown__btn--danger { color: rgba(255,100,80,0.8); }
.nav-profile-dropdown__btn--danger:hover {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.25);
  color: #ff8080;
}
.nav-profile-dropdown__btn.hidden { display: none !important; }

/* Hide old floating session bar completely */
#sessionBar.session-bar { display: none !important; }

/* ══════════════════════════════════════════════════════════════════════════
   SESSION BAR — Compact profile dropdown (replaces floating bar)
   ══════════════════════════════════════════════════════════════════════════ */

/* Override ALL prior session-bar rules */
#sessionBar.session-bar {
  position: fixed !important;
  top: 10px !important;
  right: 14px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 9100 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
}
#sessionBar.session-bar.hidden { display: none !important; }

/* Pill trigger button */
.session-profile-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: 100px;
  background: linear-gradient(140deg, rgba(12,22,40,0.97) 0%, rgba(8,16,30,0.98) 100%);
  border: 1px solid rgba(149,209,69,0.25);
  color: #d4e8f0;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 6px 24px rgba(0,0,0,0.45), 0 0 0 1px rgba(149,209,69,0.06) inset;
  white-space: nowrap;
}
.session-profile-trigger:hover {
  border-color: rgba(149,209,69,0.5);
  background: linear-gradient(140deg, rgba(16,28,50,0.99) 0%, rgba(12,22,42,0.99) 100%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(149,209,69,0.12) inset;
}

/* Avatar circle */
.session-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #95d145 0%, #4f8cff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #060d16;
  flex-shrink: 0;
  letter-spacing: 0;
}

.session-trigger-name {
  font-size: 13px;
  font-weight: 700;
  color: #edf5ff;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-chevron {
  color: rgba(149,209,69,0.6);
  transition: transform 0.22s;
  flex-shrink: 0;
}
.sb-open .session-chevron { transform: rotate(180deg); }

/* Dropdown panel */
.session-dropdown {
  display: none;
  flex-direction: column;
  gap: 4px;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 14px 12px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(10,20,36,0.99) 0%, rgba(7,14,26,0.99) 100%);
  border: 1px solid rgba(149,209,69,0.2);
  box-shadow: 0 24px 64px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.04) inset;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  z-index: 9200;
}
.sb-open .session-dropdown { display: flex; }

.session-dropdown__meta {
  padding: 2px 4px 10px;
  font-size: 12px;
  color: rgba(168,182,199,0.55);
  font-style: italic;
}

.session-dropdown__sep {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 4px 0;
}

.session-dropdown__btn {
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #d4e8f0;
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.session-dropdown__btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
  color: #edf5ff;
}
.session-dropdown__btn--danger { color: rgba(255,120,100,0.85); }
.session-dropdown__btn--danger:hover {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.25);
  color: #ff8080;
}
.session-dropdown__btn.hidden { display: none !important; }
.charts-shape-lib-btn.is-active { background:rgba(149,209,69,0.15); border-color:rgba(149,209,69,0.4); }
.charts-shape-lib-btn.is-active span { color:#95d145; }

/* ── Style panels updates ── */
.charts-style-panel__title { font-size:11px; font-weight:800; color:rgba(149,209,69,0.7); text-transform:uppercase; letter-spacing:0.6px; margin-right:6px; white-space:nowrap; }
.charts-btn-group { display:flex; gap:4px; }
.charts-slider-wrap { display:flex; flex-direction:column; gap:4px; }
.charts-sz-label { font-size:11px; color:rgba(168,182,199,0.5); font-weight:600; }
.charts-size-slider { width:90px; accent-color:#4f8cff; }

/* ── Home hub tile ── */
.charts-home-tile { display:flex; align-items:center; gap:14px; padding:14px 16px; background:linear-gradient(140deg,rgba(10,18,32,0.98),rgba(8,14,26,0.99)); border:1px solid rgba(79,140,255,0.18); border-radius:18px; cursor:pointer; transition:all 0.2s; }
.charts-home-tile:hover { border-color:rgba(149,209,69,0.35); transform:translateY(-2px); box-shadow:0 16px 40px rgba(0,0,0,0.3); }
.charts-home-tile .menu-tile__icon { width:48px; height:48px; border-radius:14px; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.charts-home-tile .menu-tile__info { flex:1; min-width:0; }
.charts-home-tile .menu-tile__info strong { display:block; font-size:15px; font-weight:700; color:#edf5ff; }
.charts-home-tile .menu-tile__info span { font-size:12px; color:rgba(168,182,199,0.6); }
.charts-home-tile .menu-tile__arrow { width:32px; height:32px; border-radius:10px; border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.04); color:rgba(168,182,199,0.6); cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all 0.15s; flex-shrink:0; }
.charts-home-tile:hover .menu-tile__arrow { background:rgba(149,209,69,0.15); border-color:rgba(149,209,69,0.35); color:#95d145; }

/* ── Diagram type grid (10 types → 5 cols) ── */
.charts-modal-types { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; margin-bottom:24px; }
.charts-type-btn strong { font-size:12px; }
.charts-type-btn span { font-size:10px; }
.charts-type-icon { font-size:24px; }

/* ── Shape picker in style panel (all 15) ── */
.charts-shape-picker { display:flex; flex-wrap:wrap; gap:4px; max-width:320px; }
.charts-shape-btn { width:30px; height:30px; border-radius:8px; border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.04); color:rgba(168,182,199,0.7); cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all 0.15s; padding:0; }
.charts-shape-btn.is-active,.charts-shape-btn:hover { background:rgba(149,209,69,0.18); border-color:rgba(149,209,69,0.4); color:#95d145; }

/* ── Toolbar shape btn glow when add-shape active ── */
#chartsShapesBtn.is-active { background:rgba(79,140,255,0.2) !important; border-color:rgba(79,140,255,0.5) !important; color:#7ab8ff !important; box-shadow:0 0 12px rgba(79,140,255,0.2); }

/* ══════════════════════════════════════════════════════════════════════
   DA REDESIGN v2 — Session bar fix · Nav fix · Animations · Avions
   ══════════════════════════════════════════════════════════════════════ */

/* ── 1. SESSION BAR — vraiment collée en haut à droite ─────────────── */
#sessionBar {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 8000 !important;
  border-radius: 0 0 0 22px !important;
  /* Suppression des bordures top et right : on n'utilise PAS le shorthand border: */
  border-top-width: 0 !important;
  border-right-width: 0 !important;
  border-bottom-width: 1px !important;
  border-left-width: 1px !important;
  border-style: solid !important;
  border-color: rgba(149,209,69,0.22) !important;
  padding: 10px 22px 10px 20px !important;
  background: linear-gradient(160deg, rgba(6,13,22,0.99) 0%, rgba(9,18,34,0.98) 100%) !important;
  box-shadow: -4px 4px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(149,209,69,0.06) inset !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  transform: translateY(0) !important;
}
#sessionBar.hidden { display: none !important; }

/* ── 2. NAV — fix scrollbar gutter qui clippait les badges ─────────── */
#edgeNavItems {
  overflow-x: visible !important;  /* badges pas clippés sur les côtés */
  overflow-y: scroll !important;   /* scrollable si beaucoup d'items */
  scrollbar-width: none !important; /* scrollbar invisible, pas de gutter */
}
#edgeNavItems::-webkit-scrollbar { display: none !important; width: 0 !important; }
/* Le nav lui-même ne doit pas clipper les badges qui dépassent */
#edgeNav {
  overflow: visible !important;
}
/* … mais le footer doit rester en bas */
#edgeNav > #edgeNavItems { flex: 1 1 0 !important; min-height: 0 !important; }

/* ── 3. BADGE WIGGLE — tremblement au survol ────────────────────────── */
@keyframes badge-wiggle {
  0%   { transform: rotate(0deg) scale(1); }
  10%  { transform: rotate(-8deg) scale(1.08); }
  25%  { transform: rotate(7deg) scale(1.1); }
  40%  { transform: rotate(-6deg) scale(1.08); }
  55%  { transform: rotate(5deg) scale(1.06); }
  70%  { transform: rotate(-3deg) scale(1.03); }
  85%  { transform: rotate(2deg) scale(1.01); }
  100% { transform: rotate(0deg) scale(1); }
}
.edge-nav__item:hover .edge-nav__item-badge {
  animation: badge-wiggle 0.55s cubic-bezier(.36,.07,.19,.97) both !important;
}

/* ── 4. LOGO GLOW au survol ─────────────────────────────────────────── */
.brand-logo-image {
  transition: filter 0.3s ease, transform 0.3s ease !important;
}
.brand-logo-image:hover {
  filter: drop-shadow(0 0 12px rgba(149,209,69,0.7)) drop-shadow(0 0 28px rgba(149,209,69,0.3)) !important;
  transform: scale(1.07) !important;
}

/* ── 5. MENU TILES — hover plus dynamique ───────────────────────────── */
.menu-tile {
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s ease, border-color 0.2s ease !important;
}
.menu-tile:hover {
  transform: translateY(-5px) scale(1.02) !important;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(149,209,69,0.25), 0 0 24px rgba(149,209,69,0.12) !important;
  border-color: rgba(149,209,69,0.35) !important;
}

/* ── 6. KPI CARDS — pulse glow sur les chiffres ─────────────────────── */
@keyframes kpi-glow {
  0%, 100% { text-shadow: 0 0 0px transparent; }
  50%       { text-shadow: 0 0 14px rgba(149,209,69,0.55), 0 0 28px rgba(149,209,69,0.2); }
}
.home-kpi-card strong {
  animation: kpi-glow 3s ease-in-out infinite !important;
}

/* ── 7. WORDMARK MECACHROME — scan-line shimmer ─────────────────────── */
@keyframes wm-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
.hero-wordmark__text {
  background: linear-gradient(90deg,
    #95d145 0%,
    #c8f07a 30%,
    #ffffff 48%,
    #c8f07a 60%,
    #95d145 100%) !important;
  background-size: 200% auto !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: wm-shimmer 3.5s linear infinite !important;
}

/* ── 8. AVIONS HERO ─────────────────────────────────────────────────── */
.hero-plane {
  position: absolute;
  pointer-events: none;
  opacity: 0.18;
  z-index: 0;
}
@keyframes plane-fly-1 {
  0%   { transform: translate(-120px, 0px) rotate(8deg) scale(0.7); opacity: 0; }
  5%   { opacity: 0.18; }
  90%  { opacity: 0.14; }
  100% { transform: translate(calc(100vw + 120px), -40px) rotate(4deg) scale(0.85); opacity: 0; }
}
@keyframes plane-fly-2 {
  0%   { transform: translate(-80px, 0px) rotate(6deg) scale(0.55); opacity: 0; }
  8%   { opacity: 0.12; }
  92%  { opacity: 0.08; }
  100% { transform: translate(calc(100vw + 80px), -20px) rotate(3deg) scale(0.65); opacity: 0; }
}
.hero-plane--1 {
  bottom: 18px;
  left: 0;
  animation: plane-fly-1 22s linear infinite;
}
.hero-plane--2 {
  bottom: 42px;
  left: 0;
  animation: plane-fly-2 30s linear 8s infinite;
}
.hero {
  position: relative !important;
  overflow: hidden !important;
}

/* ── 9. AUTH BRAND ORBS — plus vifs ─────────────────────────────────── */
.auth-brand__orb--1 {
  background: radial-gradient(circle, rgba(149,209,69,0.55) 0%, rgba(79,140,255,0.2) 55%, transparent 80%) !important;
}
.auth-brand__orb--2 {
  background: radial-gradient(circle, rgba(79,140,255,0.5) 0%, rgba(168,85,247,0.25) 55%, transparent 80%) !important;
}



/* ══════════════════════════════════════════════════════════════════════
   KANBAN / TODO MODULE
   ══════════════════════════════════════════════════════════════════════ */
.charts-tab { padding:8px 18px; border-radius:10px 10px 0 0; border:1px solid transparent; border-bottom:none; background:transparent; color:#7a8fa8; font-size:13px; font-weight:700; cursor:pointer; transition:all 0.15s; }
.charts-tab.is-active { background:rgba(149,209,69,0.1); border-color:rgba(149,209,69,0.25); color:#95d145; }


/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  REFONTE DESKTOP — Design System v2                                  ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/* ── Hero redesign ── */
.hero-menu {
  position: relative;
  min-height: 160px;
  padding: 28px 32px;
  border-radius: 28px;
  background: linear-gradient(135deg,
    rgba(8,18,36,0.98) 0%,
    rgba(12,26,50,0.97) 50%,
    rgba(6,14,28,0.99) 100%);
  border: 1px solid rgba(79,140,255,0.14);
  box-shadow: 0 24px 64px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
  overflow: hidden;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Orbes décoratifs hero */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
}
.hero-orb--a {
  width: 300px; height: 300px;
  top: -80px; left: -60px;
  background: radial-gradient(circle, rgba(79,140,255,0.18), transparent 70%);
}
.hero-orb--b {
  width: 250px; height: 250px;
  bottom: -60px; right: 200px;
  background: radial-gradient(circle, rgba(149,209,69,0.14), transparent 70%);
}

/* Grille de fond hero */
.hero-menu::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(79,140,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,140,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.hero-brand { position: relative; z-index: 1; flex: 1; }

.hero-greeting {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.hero-logo {
  width: 52px; height: 52px;
  filter: drop-shadow(0 8px 20px rgba(79,140,255,0.4));
}

.hero-title {
  margin: 0 0 2px;
  font-size: 26px;
  font-weight: 900;
  color: #edf5ff;
  letter-spacing: -0.02em;
}

.hero-sub {
  margin: 0;
  font-size: 13px;
  color: rgba(168,182,199,0.7);
}

.hero-tagline {
  font-size: 13px;
  color: rgba(168,182,199,0.55);
  line-height: 1.5;
  max-width: 480px;
  border-left: 2px solid rgba(149,209,69,0.35);
  padding-left: 12px;
}

/* ── Context strip redesign ── */
.home-context-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  margin-bottom: 16px;
  border-radius: 18px;
  background: rgba(10,20,38,0.7);
  border: 1px solid rgba(79,140,255,0.12);
  backdrop-filter: blur(12px);
}
.home-context-strip__copy strong {
  font-size: 13px;
  font-weight: 700;
  color: #b0c4d8;
}
.home-context-strip__copy span {
  display: none;
}
.home-context-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.home-context-chip {
  padding: 6px 16px;
  border-radius: 10px;
  border: 1px solid rgba(100,126,168,0.22);
  background: rgba(10,22,44,0.8);
  color: #8aa4c2;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.home-context-chip:hover {
  border-color: rgba(79,140,255,0.4);
  color: #a0c4e8;
  background: rgba(79,140,255,0.08);
}
.home-context-chip.is-active {
  background: linear-gradient(135deg, rgba(79,140,255,0.22), rgba(149,209,69,0.14));
  border-color: rgba(149,209,69,0.4);
  color: #edf5ff;
  box-shadow: 0 0 0 1px rgba(149,209,69,0.15) inset;
}

/* ── KPI Cards redesign ── */
.home-global-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.home-kpi-card {
  padding: 18px 16px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(12,22,42,0.97), rgba(8,16,30,0.98));
  border: 1px solid rgba(100,126,168,0.14);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}
.home-kpi-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 10% 80%, rgba(79,140,255,0.06), transparent 60%);
  pointer-events: none;
}
.home-kpi-card:hover {
  transform: translateY(-3px);
  border-color: rgba(79,140,255,0.24);
  box-shadow: 0 16px 32px rgba(0,0,0,0.28);
}
.home-kpi-card span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(168,182,199,0.55);
}
.home-kpi-card strong {
  font-size: 32px;
  font-weight: 900;
  color: #edf5ff;
  letter-spacing: -0.03em;
  line-height: 1;
}
.home-kpi-card:nth-child(3) strong { color: #ff8080; }
.home-kpi-card:nth-child(4) strong { color: #ffb347; }
.home-kpi-card:nth-child(5) strong { color: #95d145; }

/* ── Menu section header ── */
.menu-section {
  margin-top: 4px;
}
.menu-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(100,126,168,0.1);
}
.menu-section-title-text {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: #edf5ff;
}
.menu-section-subtitle {
  margin: 0;
  font-size: 12px;
  color: rgba(168,182,199,0.5);
}

/* ── Menu tiles redesign ── */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.menu-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(12,22,44,0.98), rgba(8,16,30,0.99));
  border: 1px solid rgba(100,126,168,0.14);
  cursor: pointer;
  text-align: left;
  transition: transform 0.22s cubic-bezier(0.34,1.1,0.64,1),
              border-color 0.22s ease,
              box-shadow 0.22s ease;
  overflow: hidden;
  color: #edf5ff;
}
.menu-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 15% 15%, rgba(79,140,255,0.07), transparent 55%);
  pointer-events: none;
  transition: opacity 0.22s;
}
.menu-tile:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(79,140,255,0.32);
  box-shadow: 0 20px 48px rgba(0,0,0,0.35), 0 0 0 1px rgba(79,140,255,0.12);
}
.menu-tile:hover::before { opacity: 2; }

.menu-tile-favorite {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 16px;
  color: rgba(168,182,199,0.35);
  background: none; border: none;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 8px;
  transition: color 0.18s, background 0.18s;
  z-index: 2;
}
.menu-tile-favorite:hover { color: #ffcc44; background: rgba(255,204,68,0.1); }
.menu-tile-favorite.is-active { color: #ffcc44; }

.menu-tile-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 52px;
  position: relative;
  overflow: hidden;
}
.menu-tile-icon::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.2), transparent 50%);
  pointer-events: none;
}
.menu-tile-icon svg { width: 26px; height: 26px; }

.menu-tile-body { flex: 1; }
.menu-tile-body strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: #edf5ff;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.menu-tile-body span {
  display: block;
  font-size: 12px;
  color: rgba(168,182,199,0.55);
  line-height: 1.4;
}

/* Nouveau footer de tuile */
.menu-tile-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(100,126,168,0.1);
}
.menu-tile-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(168,182,199,0.4);
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(100,126,168,0.1);
}
.menu-tile-arrow-icon {
  font-size: 16px;
  color: rgba(168,182,199,0.35);
  transition: transform 0.18s ease, color 0.18s;
}
.menu-tile:hover .menu-tile-arrow-icon {
  transform: translateX(4px);
  color: rgba(149,209,69,0.8);
}

/* Tuiles spéciales */
.menu-tile-sqcdp .menu-tile-tag { color: rgba(255,180,69,0.6); background: rgba(255,180,69,0.08); }
.menu-tile-qrqc .menu-tile-tag { color: rgba(255,100,100,0.6); background: rgba(255,100,100,0.08); }
.menu-tile-forms .menu-tile-tag { color: rgba(126,200,255,0.6); background: rgba(126,200,255,0.08); }
.menu-tile-a3 .menu-tile-tag { color: rgba(82,214,255,0.6); background: rgba(82,214,255,0.08); }

/* ── Edge nav — point actif ── */
.edge-nav__active-dot {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 24px;
  border-radius: 2px;
  background: linear-gradient(180deg, #95d145, #4f8cff);
  opacity: 0;
  transition: opacity 0.2s;
}
.edge-nav__item.is-active .edge-nav__active-dot { opacity: 1; }
.edge-nav:not(:hover) .edge-nav__active-dot { display: none; }

/* ── Topbar universelle redesign ── */
.topbar {
  border-radius: 24px !important;
  margin-bottom: 18px !important;
  padding: 16px 22px !important;
}

/* ── Quick-nav panel ── */
.quick-nav-panel {
  margin-bottom: 16px;
  padding: 16px 20px;
  border-radius: 18px;
  background: rgba(10,20,38,0.6);
  border: 1px solid rgba(100,126,168,0.12);
}

/* ── Grille responsive desktop ── */
@media (max-width: 1400px) {
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
  .home-global-kpis { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 1100px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .home-global-kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .home-global-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* ─── FIN REFONTE DESKTOP ─────────────────────────────────────────────── */

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  MOBILE RESPONSIVE — ≤ 640px                                        ║
   ║  Nav basse · Modaux slide-up · Touch-friendly · Safe area iPhone     ║
   ╚══════════════════════════════════════════════════════════════════════╝ */
:root { --mob-nav-h: 68px; }

@media (max-width: 640px) {

  /* ── 1. NAV BASSE (remplace le side-nav) ── */
  .edge-nav {
    position: fixed !important;
    bottom: 0 !important; left: 0 !important; right: 0 !important; top: auto !important;
    width: 100% !important;
    height: var(--mob-nav-h) !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-around !important;
    padding: 6px 8px !important;
    border-radius: 22px 22px 0 0 !important;
    border-top: 1px solid rgba(118,145,176,0.22) !important;
    border-left: none !important; border-right: none !important; border-bottom: none !important;
    overflow: visible !important;
    box-shadow: 0 -6px 28px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.07) !important;
    z-index: 200 !important;
  }
  .edge-nav:hover { width: 100% !important; border-color: rgba(118,145,176,0.22) !important; }
  .edge-nav__brand, .edge-nav__brand-copy { display: none !important; }
  .edge-nav__item-labels,
  .edge-nav:hover .edge-nav__item-labels { display: none !important; width: 0 !important; opacity: 0 !important; }
  .edge-nav__items,
  .edge-nav:not(:hover) .edge-nav__items {
    flex-direction: row !important; width: 100% !important;
    align-items: center !important; justify-content: space-around !important; gap: 2px !important;
  }
  .edge-nav__item,
  .edge-nav:not(:hover) .edge-nav__item,
  .edge-nav:hover .edge-nav__item,
  .edge-nav:not(:hover) .edge-nav__item.is-active {
    width: auto !important; min-width: 44px !important; max-width: 72px !important;
    height: 52px !important; min-height: 52px !important;
    flex: 1 !important; flex-direction: column !important; gap: 3px !important;
    padding: 4px !important; margin: 0 !important;
    justify-content: center !important; align-items: center !important;
    border-radius: 14px !important; transform: none !important;
  }
  .edge-nav__item-badge,
  .edge-nav:not(:hover) .edge-nav__item .edge-nav__item-badge,
  .edge-nav:hover .edge-nav__item .edge-nav__item-badge {
    width: 36px !important; height: 36px !important;
    min-width: 36px !important; flex: 0 0 36px !important;
    border-radius: 12px !important; font-size: 17px !important;
  }
  .edge-nav__item-badge svg { width: 19px !important; height: 19px !important; }
  .edge-nav__item.is-active .edge-nav__item-badge {
    box-shadow: 0 0 0 2px rgba(149,209,69,0.45), 0 4px 14px rgba(0,0,0,0.35) !important;
  }

  /* ── 2. APP SHELL ── */
  .app-shell {
    padding: 10px 12px calc(var(--mob-nav-h) + 12px) 12px !important;
  }

  /* ── 3. TOPBAR ── */
  .topbar {
    flex-direction: column !important; align-items: flex-start !important;
    gap: 10px !important; padding: 12px !important;
    border-radius: 18px !important; margin-bottom: 10px !important;
  }
  .topbar-left { width: 100% !important; gap: 8px !important; flex-wrap: nowrap !important; }
  .topbar-right { width: 100% !important; justify-content: flex-start !important; flex-wrap: wrap !important; gap: 8px !important; }
  .top-brand { display: none !important; }
  .topbar h1 { font-size: 18px !important; line-height: 1.2 !important; }
  .topbar p { font-size: 11px !important; }
  .topbar .btn { padding: 6px 12px !important; font-size: 12px !important; border-radius: 10px !important; }

  /* ── 4. HERO ── */
  .hero {
    padding: 14px !important; min-height: 80px !important;
    border-radius: 18px !important; gap: 10px !important;
  }
  .hero-actions-menu { flex-wrap: wrap !important; gap: 8px !important; }

  /* ── 5. MENU GRILLE 2 cols ── */
  .menu-grid { grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; }
  .menu-tile { padding: 14px 12px !important; border-radius: 18px !important; }
  .menu-tile-body strong { font-size: 13px !important; }
  .menu-tile-body span { font-size: 11px !important; }
  .menu-tile-icon { width: 44px !important; height: 44px !important; border-radius: 14px !important; flex: 0 0 44px !important; }
  .menu-tile-icon svg { width: 22px !important; height: 22px !important; }

  /* ── 6. KPI CARDS 2 cols ── */
  .home-global-kpis { grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; }
  .home-kpi-card { padding: 14px !important; border-radius: 18px !important; }
  .home-kpi-card strong { font-size: 22px !important; }
  .home-kpi-card span { font-size: 11px !important; }

  /* ── 7. SHORTCUTS / FORMS GRID ── */
  .shortcut-list { grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; }
  .shortcuts-card { padding: 14px !important; border-radius: 18px !important; }

  /* ── 8. MODAUX slide-up ── */
  .modal-overlay { align-items: flex-end !important; padding: 0 !important; }
  .modal-card,
  .modal-card-wide,
  .qrqc-rich-modal-card,
  .qrqc-form-modal-card,
  .qrqc-blocked-modal-card {
    width: 100% !important; max-width: 100% !important;
    border-radius: 24px 24px 0 0 !important;
    max-height: 92vh !important; overflow-y: auto !important;
  }
  .modal-header {
    padding: 16px !important;
    position: sticky !important; top: 0 !important; z-index: 1 !important;
    background: #202830 !important;
  }
  .modal-body { padding: 12px 14px !important; }
  .modal-body-scroll { max-height: calc(92vh - 130px) !important; overflow-y: auto !important; }
  .modal-actions {
    padding: 12px 14px !important;
    position: sticky !important; bottom: 0 !important; background: #202830 !important;
  }

  /* ── 9. SETTINGS GRID 1 col ── */
  .settings-grid { grid-template-columns: 1fr !important; gap: 12px !important; }

  /* ── 10. KANBAN OVERLAY ── */
  #sqcdpTodoOverlay { left: 0 !important; bottom: var(--mob-nav-h) !important; top: 0 !important; }

  /* ── 11. CHARTS OVERLAY ── */
  #chartsHomeView, #chOverlay { left: 0 !important; bottom: var(--mob-nav-h) !important; top: 0 !important; }

  /* ── 12. TABLES scroll horizontal ── */
  .actions-table-wrap, .sqcdp-table-wrap {
    overflow-x: auto !important; -webkit-overflow-scrolling: touch !important;
    border-radius: 18px !important;
  }
  .actions-table { min-width: 580px !important; }

  /* ── 13. FILTRES 1 col ── */
  .filters-bar, .summary-inline-wrap { grid-template-columns: 1fr !important; gap: 10px !important; }

  /* ── 14. QRQC ── */
  .qrqc-kpis-grid { grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; }
  .qrqc-split, .qrqc-form-grid { grid-template-columns: 1fr !important; }

  /* ── 15. A3 ── */
  .a3-kpis { grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; }
  .a3-grid { grid-template-columns: 1fr !important; }

  /* ── 16. SESSION BAR ── */
  .session-bar { top: 8px !important; right: 8px !important; left: 8px !important; width: auto !important; flex-wrap: wrap !important; }

  /* ── 17. INPUTS TACTILES (16px évite zoom iOS) ── */
  input[type="text"], input[type="email"], input[type="password"],
  input[type="number"], select, textarea {
    min-height: 44px !important; font-size: 16px !important; border-radius: 12px !important;
  }
  .btn { min-height: 40px !important; border-radius: 12px !important; }

  /* ── 18. ICON BANK compact ── */
  .icon-bank-grid { grid-template-columns: repeat(3,1fr) !important; gap: 8px !important; }
  .icon-bank-card { min-height: 80px !important; padding: 10px 8px !important; border-radius: 14px !important; }

  /* ── 19. AUTH plein écran ── */
  .auth-forms { width: 100% !important; height: 100% !important; border-radius: 0 !important; }
  .auth-card { border-radius: 0 !important; padding: 24px 20px !important; }
  .auth-brand__content { padding: 60px 24px 24px !important; }

  /* ── 20. SAFE AREA NOTCH (iPhone) ── */
  @supports (padding-bottom: env(safe-area-inset-bottom)) {
    .edge-nav {
      padding-bottom: max(6px, env(safe-area-inset-bottom)) !important;
      height: calc(var(--mob-nav-h) + env(safe-area-inset-bottom)) !important;
    }
    .app-shell {
      padding-bottom: calc(var(--mob-nav-h) + env(safe-area-inset-bottom) + 12px) !important;
    }
    #sqcdpTodoOverlay, #chartsHomeView, #chOverlay {
      bottom: calc(var(--mob-nav-h) + env(safe-area-inset-bottom)) !important;
    }
  }

} /* fin @media 640px */

/* ── Très petits écrans (≤ 380px) ── */
@media (max-width: 380px) {
  .menu-grid { grid-template-columns: 1fr !important; }
  .home-global-kpis, .qrqc-kpis-grid, .a3-kpis { grid-template-columns: 1fr !important; }
  .shortcut-list { grid-template-columns: 1fr !important; }
  .edge-nav__item-badge { width: 32px !important; height: 32px !important; font-size: 15px !important; }
}
/* ═══════════════════════════════════════════════════════ FIN MOBILE ═══ */

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  SIDEBAR COLLAPSE + DRAG + MECACHROME DESIGN v3                      ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/* ─── Sidebar épinglée (ouverte en permanence) ─────────────────────── */
.edge-nav.is-pinned {
  width: 230px !important;
}
.edge-nav.is-pinned .edge-nav__brand-copy,
.edge-nav.is-pinned .edge-nav__item-labels {
  opacity: 1 !important;
  transform: translateX(0) !important;
  pointer-events: auto !important;
}
.edge-nav.is-pinned .edge-nav__collapse-btn {
  transform: rotate(0deg);
}
.app-shell.nav-pinned {
  padding-left: 254px !important;
}

/* ─── Bouton collapse ───────────────────────────────────────────────── */
.edge-nav__collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: rgba(168,190,210,0.7);
  font-size: 16px;
  cursor: pointer;
  margin: 0 auto 10px auto;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  line-height: 1;
  padding: 0;
}
.edge-nav__collapse-btn:hover {
  background: rgba(149,209,69,0.12);
  border-color: rgba(149,209,69,0.3);
  color: #95d145;
}
/* En mode pinned, afficher le bouton même sans hover */
.edge-nav.is-pinned .edge-nav__collapse-btn {
  display: flex;
}
/* En mode collapsed, centrer le bouton */
.edge-nav:not(.is-pinned):not(:hover) .edge-nav__collapse-btn {
  width: 36px;
  height: 36px;
  font-size: 13px;
}

/* ─── Label de section "FAVORIS" ────────────────────────────────────── */
.edge-nav__section-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgba(149,209,69,0.4);
  text-transform: uppercase;
  padding: 8px 4px 4px;
  opacity: 0;
  transition: opacity 0.18s;
  white-space: nowrap;
}
.edge-nav:hover .edge-nav__section-label,
.edge-nav.is-pinned .edge-nav__section-label {
  opacity: 1;
}

/* ─── Drag handle ───────────────────────────────────────────────────── */
.edge-nav__drag-handle {
  font-size: 14px;
  color: rgba(168,190,210,0.3);
  cursor: grab;
  opacity: 0;
  transition: opacity 0.18s;
  flex-shrink: 0;
  line-height: 1;
  user-select: none;
}
.edge-nav:hover .edge-nav__drag-handle,
.edge-nav.is-pinned .edge-nav__drag-handle {
  opacity: 1;
}
.edge-nav__item.is-dragging {
  opacity: 0.4;
  border-style: dashed;
}
.edge-nav__item.drag-over {
  border-color: rgba(149,209,69,0.5) !important;
  background: rgba(149,209,69,0.08) !important;
}

/* ─── Étoile favori sur Charts footer ──────────────────────────────── */
.edge-nav__fav-star {
  font-size: 15px;
  color: rgba(168,190,210,0.3);
  cursor: pointer;
  transition: color 0.18s;
  margin-left: auto;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.18s, color 0.18s;
}
.edge-nav:hover .edge-nav__fav-star,
.edge-nav.is-pinned .edge-nav__fav-star {
  opacity: 1;
}
.edge-nav__fav-star:hover { color: #ffcc44; }
.edge-nav__fav-star.is-active { color: #ffcc44; opacity: 1; }

/* ─── Bouton resize tuiles ──────────────────────────────────────────── */
.menu-grid-size-btn {
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid rgba(100,126,168,0.2);
  background: rgba(10,22,44,0.8);
  color: rgba(168,182,199,0.6);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.18s;
  line-height: 1;
}
.menu-grid-size-btn:hover {
  border-color: rgba(149,209,69,0.4);
  color: #95d145;
  background: rgba(149,209,69,0.06);
}

/* ─── Mode compact des tuiles ───────────────────────────────────────── */
.menu-grid.is-compact {
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.menu-grid.is-compact .menu-tile {
  padding: 14px 12px;
  gap: 8px;
  border-radius: 16px;
}
.menu-grid.is-compact .menu-tile-icon {
  width: 38px; height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
}
.menu-grid.is-compact .menu-tile-body strong { font-size: 12px; }
.menu-grid.is-compact .menu-tile-body span { display: none; }
.menu-grid.is-compact .menu-tile-meta { display: none; }
.menu-grid.is-compact .menu-tile-favorite { top: 6px; right: 6px; font-size: 12px; }

@media (max-width: 1400px) {
  .menu-grid.is-compact { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 1100px) {
  .menu-grid.is-compact { grid-template-columns: repeat(4, 1fr); }
}

/* ─── Sidebar footer avec étoile ────────────────────────────────────── */
.edge-nav__footer .edge-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

/* ─── FIN SIDEBAR v3 ────────────────────────────────────────────────── */

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  MECA-FLOW DESIGN SYSTEM v4 — Mecachrome Dark Industrial             ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/* ── Variables globales ──────────────────────────────────────────────── */
:root {
  --mf-bg:        #080d18;
  --mf-nav:       #0a1020;
  --mf-card:      #0e1628;
  --mf-card2:     #121e32;
  --mf-border:    rgba(255,255,255,0.065);
  --mf-border2:   rgba(79,140,255,0.15);
  --mf-text:      #dce8f5;
  --mf-muted:     rgba(148,172,206,0.55);
  --mf-green:     #c8e63b;
  --mf-blue:      #4f8cff;
  --mf-purple:    #a855f7;
  --mf-orange:    #f97316;
  --mf-red:       #ef4444;
  --mf-radius:    22px;
  --mf-radius-sm: 14px;
  --mf-shadow:    0 16px 48px rgba(0,0,0,0.42);
  --mf-glow-green: 0 0 20px rgba(200,230,59,0.12);
  --mf-glow-blue:  0 0 20px rgba(79,140,255,0.12);
}

/* ── Body & shell ────────────────────────────────────────────────────── */
body {
  background: var(--mf-bg) !important;
  color: var(--mf-text) !important;
}
.app-shell {
  background: var(--mf-bg) !important;
}

/* ── Sidebar : refonte complète ──────────────────────────────────────── */
.edge-nav {
  background: linear-gradient(180deg, var(--mf-nav) 0%, rgba(8,14,26,0.99) 100%) !important;
  border: 1px solid var(--mf-border) !important;
  border-radius: 28px !important;
  box-shadow: var(--mf-shadow), inset 0 1px 0 rgba(255,255,255,0.04) !important;
  padding: 16px 12px !important;
  width: 84px !important;
  transition: width 0.3s cubic-bezier(0.34,1.1,0.64,1), border-color 0.25s ease !important;
}
.edge-nav:hover,
.edge-nav.is-pinned {
  width: 230px !important;
  border-color: rgba(200,230,59,0.18) !important;
  box-shadow: var(--mf-shadow), var(--mf-glow-green), inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

/* Logo sidebar */
.edge-nav__logo {
  width: 48px !important; height: 48px !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, rgba(79,140,255,0.2), rgba(168,85,247,0.2)) !important;
  border: 1px solid rgba(79,140,255,0.22) !important;
  box-shadow: 0 6px 18px rgba(79,140,255,0.16) !important;
  flex: 0 0 48px !important;
}
.edge-nav__logo-image {
  width: 32px !important; height: 32px !important;
}

/* Brand copy */
.edge-nav__brand-copy strong {
  font-size: 13px !important;
  font-weight: 800 !important;
  color: var(--mf-text) !important;
}
.edge-nav__brand-copy span {
  font-size: 10px !important;
  color: var(--mf-muted) !important;
}

/* Badge icône sidebar */
.edge-nav__item-badge {
  width: 48px !important; height: 48px !important;
  border-radius: 16px !important;
  flex: 0 0 48px !important;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.15) !important;
}
.edge-nav__item-badge svg {
  width: 22px !important; height: 22px !important;
}

/* Items sidebar */
.edge-nav__item {
  border-radius: 16px !important;
  padding: 8px 8px !important;
  gap: 10px !important;
  position: relative !important;
  transition: all 0.2s ease !important;
}
.edge-nav__item:hover {
  background: rgba(255,255,255,0.05) !important;
  border-color: var(--mf-border) !important;
  transform: translateX(3px) !important;
}
.edge-nav__item.is-active {
  background: linear-gradient(135deg, rgba(79,140,255,0.14), rgba(200,230,59,0.08)) !important;
  border-color: rgba(200,230,59,0.22) !important;
  box-shadow: inset 0 0 0 1px rgba(200,230,59,0.1), 0 4px 12px rgba(0,0,0,0.2) !important;
}
.edge-nav:not(:hover):not(.is-pinned) .edge-nav__item.is-active {
  width: 52px !important; min-width: 52px !important;
  height: 52px !important; min-height: 52px !important;
  margin: 0 auto !important;
  justify-content: center !important;
  padding: 0 !important;
}

/* Labels sidebar */
.edge-nav__item-labels {
  flex: 1 !important;
  min-width: 0 !important;
  text-align: left !important;
}
.edge-nav__item-labels strong {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--mf-text) !important;
  text-align: left !important;
  display: block !important;
}
.edge-nav__item-labels span {
  font-size: 10px !important;
  color: var(--mf-muted) !important;
  margin-top: 1px !important;
  text-align: left !important;
  display: block !important;
}

/* Section label */
.edge-nav__section-label {
  font-size: 9px !important;
  font-weight: 800 !important;
  letter-spacing: 0.14em !important;
  color: rgba(200,230,59,0.35) !important;
  padding: 10px 6px 4px !important;
  text-transform: uppercase !important;
  opacity: 0 !important;
  transition: opacity 0.2s !important;
}
.edge-nav:hover .edge-nav__section-label,
.edge-nav.is-pinned .edge-nav__section-label {
  opacity: 1 !important;
}

/* Point actif sidebar */
.edge-nav__active-dot {
  position: absolute !important;
  right: 6px !important; top: 50% !important;
  transform: translateY(-50%) !important;
  width: 3px !important; height: 20px !important;
  border-radius: 2px !important;
  background: linear-gradient(180deg, var(--mf-green), var(--mf-blue)) !important;
}
.edge-nav:not(:hover):not(.is-pinned) .edge-nav__active-dot {
  display: none !important;
}

/* ── App shell padding quand sidebar épinglée ─────────────────────── */
.app-shell { padding-left: 106px !important; }
.app-shell.nav-pinned { padding-left: 252px !important; }

/* ── Hero v4 ──────────────────────────────────────────────────────── */
.hero.hero-menu {
  background: linear-gradient(135deg,
    rgba(8,14,26,0.99) 0%,
    rgba(10,18,34,0.98) 60%,
    rgba(6,10,20,1) 100%) !important;
  border: 1px solid var(--mf-border) !important;
  border-radius: 24px !important;
  padding: 28px 32px !important;
  min-height: 150px !important;
  box-shadow: var(--mf-shadow) !important;
  margin-bottom: 16px !important;
}
.hero-title { font-size: 28px !important; font-weight: 900 !important; letter-spacing: -0.02em !important; }
.hero-tagline {
  border-left: 2px solid rgba(200,230,59,0.3) !important;
  color: var(--mf-muted) !important;
  font-size: 12.5px !important;
}

/* ── KPI cards v4 ─────────────────────────────────────────────────── */
.home-kpi-card {
  background: var(--mf-card) !important;
  border: 1px solid var(--mf-border) !important;
  border-radius: 20px !important;
  padding: 18px 16px !important;
  transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.2s !important;
}
.home-kpi-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(79,140,255,0.25) !important;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3) !important;
}
.home-kpi-card strong { font-size: 34px !important; font-weight: 900 !important; }
.home-kpi-card span { font-size: 10px !important; font-weight: 700 !important; letter-spacing: 0.08em !important; color: var(--mf-muted) !important; }

/* ── Tuiles modules v4 ────────────────────────────────────────────── */
.menu-tile {
  background: var(--mf-card) !important;
  border: 1px solid var(--mf-border) !important;
  border-radius: 20px !important;
  padding: 20px !important;
  transition: transform 0.22s cubic-bezier(0.34,1.1,0.64,1), border-color 0.22s, box-shadow 0.22s !important;
}
.menu-tile:hover {
  transform: translateY(-5px) scale(1.01) !important;
  border-color: rgba(79,140,255,0.28) !important;
  box-shadow: 0 20px 48px rgba(0,0,0,0.38) !important;
}
.menu-tile-body strong { font-size: 15px !important; font-weight: 800 !important; color: var(--mf-text) !important; }
.menu-tile-body span { font-size: 11.5px !important; color: var(--mf-muted) !important; }
.menu-tile-meta { border-top: 1px solid var(--mf-border) !important; }
.menu-tile-tag { background: rgba(79,140,255,0.08) !important; color: rgba(120,160,220,0.6) !important; }

/* Couleurs spécifiques par module */
.menu-tile-todolist .menu-tile-tag { color: rgba(249,115,22,0.7) !important; background: rgba(249,115,22,0.08) !important; }
.menu-tile-sqcdp .menu-tile-tag   { color: rgba(200,230,59,0.7) !important;  background: rgba(200,230,59,0.08) !important; }
.menu-tile-qrqc .menu-tile-tag    { color: rgba(239,68,68,0.7) !important;   background: rgba(239,68,68,0.08) !important; }
.menu-tile-forms .menu-tile-tag   { color: rgba(126,200,255,0.7) !important; background: rgba(126,200,255,0.08) !important; }
.menu-tile-a3 .menu-tile-tag      { color: rgba(82,214,255,0.7) !important;  background: rgba(82,214,255,0.08) !important; }

/* ── Menu section header ──────────────────────────────────────────── */
.menu-section-title-text { color: var(--mf-text) !important; font-weight: 900 !important; }
.menu-section-subtitle { color: var(--mf-muted) !important; }
.menu-section-header { border-bottom: 1px solid var(--mf-border) !important; }

/* ── Topbar ───────────────────────────────────────────────────────── */
.topbar {
  background: var(--mf-card) !important;
  border: 1px solid var(--mf-border) !important;
  border-radius: 20px !important;
  margin-bottom: 16px !important;
}

/* ── Modales / panels génériques ─────────────────────────────────── */
.modal-box, .settings-panel, .modal-overlay .modal {
  background: var(--mf-card2) !important;
  border: 1px solid var(--mf-border) !important;
  border-radius: var(--mf-radius) !important;
}

/* ── Context strip ────────────────────────────────────────────────── */
.home-context-strip {
  background: var(--mf-card) !important;
  border: 1px solid var(--mf-border) !important;
  border-radius: 16px !important;
}

/* ── FIN MECA-FLOW DESIGN v4 ──────────────────────────────────────── */

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  HUB CONFIGURATION CENTRALISÉ v1                                     ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/* Carte modale principale */
.ucfg-card {
  max-width: 780px !important;
  width: 90vw !important;
  max-height: 88vh !important;
  border-radius: 28px !important;
  border: 1px solid rgba(79,140,255,0.15) !important;
  background: linear-gradient(160deg, #0d1628, #080e1c) !important;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05) !important;
  overflow: hidden !important;
}

/* Header */
.ucfg-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 24px 28px 18px !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  background: rgba(255,255,255,0.02) !important;
}
.ucfg-header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ucfg-header-icon {
  font-size: 28px;
  width: 52px; height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(79,140,255,0.2), rgba(168,85,247,0.2));
  border: 1px solid rgba(79,140,255,0.22);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ucfg-header h3 {
  margin: 0 0 3px;
  font-size: 20px !important;
  font-weight: 900 !important;
  color: #dce8f5 !important;
}
.ucfg-header p {
  margin: 0;
  font-size: 12.5px;
  color: rgba(148,172,206,0.55);
}

/* Body */
.ucfg-body {
  padding: 24px 28px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
  overflow-y: auto !important;
  max-height: calc(88vh - 100px) !important;
}

/* Section */
.ucfg-section-title {
  margin: 0 0 12px;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: rgba(148,172,206,0.45) !important;
}

/* Grille de cards */
.ucfg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ucfg-grid--small {
  grid-template-columns: 1fr 1fr;
}

/* Card item */
.ucfg-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.ucfg-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 10% 50%, rgba(79,140,255,0.05), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.ucfg-item:hover {
  border-color: rgba(79,140,255,0.28);
  background: rgba(79,140,255,0.06);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}
.ucfg-item:hover::before { opacity: 1; }
.ucfg-item:hover .ucfg-item-arrow { color: #c8e63b; transform: translateX(3px); }

.ucfg-item--small { padding: 12px 14px; }

.ucfg-item-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.18);
}
.ucfg-item-icon svg {
  width: 22px; height: 22px;
  stroke: #fff;
}
.ucfg-item-icon--sm {
  width: 40px; height: 40px;
  border-radius: 12px;
}
.ucfg-item-icon--sm svg { width: 18px; height: 18px; }

.ucfg-item-body { flex: 1; }
.ucfg-item-body strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #dce8f5;
  margin-bottom: 3px;
}
.ucfg-item-body span {
  display: block;
  font-size: 11.5px;
  color: rgba(148,172,206,0.5);
  line-height: 1.4;
}

.ucfg-item-arrow {
  font-size: 18px;
  color: rgba(148,172,206,0.3);
  transition: color 0.18s, transform 0.18s;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 600px) {
  .ucfg-grid, .ucfg-grid--small { grid-template-columns: 1fr; }
  .ucfg-card { max-width: 100vw !important; border-radius: 24px 24px 0 0 !important; }
}

/* ── FIN HUB CONFIG ─────────────────────────────────────────────────── */

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  DESIGN VIBRANT v5 — Couleurs, Textes, Animations                    ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/* ── Textes tuiles plus grands ──────────────────────────────────────── */
.menu-tile-body strong {
  font-size: 16px !important;
  font-weight: 900 !important;
  letter-spacing: -0.01em !important;
  margin-bottom: 5px !important;
}
.menu-tile-body span {
  font-size: 12.5px !important;
  line-height: 1.45 !important;
  color: rgba(168,185,210,0.65) !important;
}
.menu-tile-tag {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.07em !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
}

/* ── Bande de couleur en haut de chaque tuile ───────────────────────── */
.menu-tile { overflow: hidden !important; }
.menu-tile::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  height: 3px !important;
  border-radius: 20px 20px 0 0 !important;
  opacity: 0.7 !important;
  transition: opacity 0.2s !important;
}
.menu-tile:hover::after { opacity: 1 !important; }

.menu-tile-sqcdp::after   { background: linear-gradient(90deg,#8ef03f,#64d970) !important; }
.menu-tile-qrqc::after    { background: linear-gradient(90deg,#ff4d6d,#ff7f50) !important; }
.menu-tile-forms::after   { background: linear-gradient(90deg,#7ec8ff,#4f8cff) !important; }
.menu-tile-a3::after      { background: linear-gradient(90deg,#52d6ff,#4f7cff) !important; }
.menu-tile-charts::after  { background: linear-gradient(90deg,#4f8cff,#a855f7) !important; }
.menu-tile-todolist::after { background: linear-gradient(90deg,#f97316,#eab308) !important; }

/* Catégories dynamiques */
.menu-tile:not(.menu-tile-sqcdp):not(.menu-tile-qrqc):not(.menu-tile-forms):not(.menu-tile-a3):not(.menu-tile-charts):not(.menu-tile-todolist)::after {
  background: linear-gradient(90deg, var(--tile-color, #4f8cff), rgba(79,140,255,0.3)) !important;
}

/* ── Couleurs des tags par module ───────────────────────────────────── */
.menu-tile-sqcdp .menu-tile-tag {
  color: #95d145 !important;
  background: rgba(149,209,69,0.1) !important;
  border: 1px solid rgba(149,209,69,0.2) !important;
}
.menu-tile-qrqc .menu-tile-tag {
  color: #ff7f8e !important;
  background: rgba(255,77,109,0.1) !important;
  border: 1px solid rgba(255,77,109,0.2) !important;
}
.menu-tile-forms .menu-tile-tag {
  color: #7ec8ff !important;
  background: rgba(126,200,255,0.1) !important;
  border: 1px solid rgba(126,200,255,0.2) !important;
}
.menu-tile-a3 .menu-tile-tag {
  color: #52d6ff !important;
  background: rgba(82,214,255,0.1) !important;
  border: 1px solid rgba(82,214,255,0.2) !important;
}
.menu-tile-charts .menu-tile-tag {
  color: #a78bfa !important;
  background: rgba(168,139,250,0.1) !important;
  border: 1px solid rgba(168,139,250,0.2) !important;
}
.menu-tile-todolist .menu-tile-tag {
  color: #fb923c !important;
  background: rgba(249,115,22,0.1) !important;
  border: 1px solid rgba(249,115,22,0.18) !important;
}

/* ── Hover : glow coloré selon le module ───────────────────────────── */
.menu-tile-sqcdp:hover   { border-color: rgba(149,209,69,0.3) !important; box-shadow: 0 20px 48px rgba(0,0,0,0.38), 0 0 20px rgba(149,209,69,0.08) !important; }
.menu-tile-qrqc:hover    { border-color: rgba(255,77,109,0.3) !important; box-shadow: 0 20px 48px rgba(0,0,0,0.38), 0 0 20px rgba(255,77,109,0.08) !important; }
.menu-tile-forms:hover   { border-color: rgba(79,140,255,0.3) !important; box-shadow: 0 20px 48px rgba(0,0,0,0.38), 0 0 20px rgba(79,140,255,0.1) !important; }
.menu-tile-a3:hover      { border-color: rgba(82,214,255,0.3) !important; box-shadow: 0 20px 48px rgba(0,0,0,0.38), 0 0 20px rgba(82,214,255,0.08) !important; }
.menu-tile-charts:hover  { border-color: rgba(168,139,250,0.3) !important; box-shadow: 0 20px 48px rgba(0,0,0,0.38), 0 0 20px rgba(168,139,250,0.1) !important; }
.menu-tile-todolist:hover { border-color: rgba(249,115,22,0.3) !important; box-shadow: 0 20px 48px rgba(0,0,0,0.38), 0 0 20px rgba(249,115,22,0.08) !important; }

/* ── Hero : plus de couleur et de dynamisme ─────────────────────────── */
.hero.hero-menu {
  background: linear-gradient(135deg,
    rgba(7,11,22,1) 0%,
    rgba(10,16,32,0.99) 50%,
    rgba(5,9,18,1) 100%) !important;
}
.hero.hero-menu::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background:
    radial-gradient(ellipse at 5% 50%, rgba(149,209,69,0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 95% 30%, rgba(79,140,255,0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(168,85,247,0.06) 0%, transparent 50%) !important;
  pointer-events: none !important;
}

/* ── KPI cards : chacune avec sa couleur ───────────────────────────── */
.home-kpi-card { position: relative; overflow: hidden; }
.home-kpi-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 0 0 20px 20px;
  opacity: 0.6;
}
.home-kpi-card:nth-child(1)::after { background: linear-gradient(90deg,#4f8cff,#67d38b); }
.home-kpi-card:nth-child(2)::after { background: linear-gradient(90deg,#52d6ff,#4f7cff); }
.home-kpi-card:nth-child(3)::after { background: linear-gradient(90deg,#ef4444,#ff7f50); }
.home-kpi-card:nth-child(4)::after { background: linear-gradient(90deg,#f97316,#eab308); }
.home-kpi-card:nth-child(5)::after { background: linear-gradient(90deg,#22c55e,#95d145); }

/* ── Icône tuile dans le coin avec ambiance ─────────────────────────── */
/* Scopée à .menu-tile-icon (tuiles du menu d'accueil) : .menu-tile-icon--rich
   est aussi réutilisée seule par les badges de sous-groupes (.shortcut-card-icon),
   qui ont leur propre taille et ne doivent pas hériter de ce !important. */
.menu-tile-icon.menu-tile-icon--rich {
  box-shadow: 0 8px 20px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.18) !important;
  width: 54px !important; height: 54px !important;
  flex: 0 0 54px !important;
  border-radius: 16px !important;
}

/* ── Tuile Charts : correction icône fixedNav ───────────────────────── */
.menu-tile-charts .menu-tile-icon svg,
.menu-tile-charts svg { color: #fff !important; }

/* ── FIN DESIGN VIBRANT v5 ──────────────────────────────────────────── */

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  KPI CARDS v6 + FULLSCREEN BUTTON                                    ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/* ── KPI cards layout ────────────────────────────────────────────────── */
.home-kpi-card {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 16px 18px !important;
}

/* Icône KPI */
.hkpi-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hkpi-icon svg { width: 22px; height: 22px; }

/* Chiffre + label */
.hkpi-body { flex: 1; }
.hkpi-body strong {
  display: block !important;
  font-size: 32px !important;
  font-weight: 900 !important;
  letter-spacing: -0.03em !important;
  line-height: 1 !important;
  margin-bottom: 4px !important;
}
.hkpi-body span {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: rgba(148,172,206,0.5) !important;
}

/* Indicateur de tendance */
.hkpi-trend {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  flex-shrink: 0;
}
.hkpi-trend--neutral { background: rgba(79,140,255,0.1); color: rgba(79,140,255,0.6); }
.hkpi-trend--up      { background: rgba(79,140,255,0.1); color: #4f8cff; }
.hkpi-trend--danger  { background: rgba(239,68,68,0.15); color: #ef4444; }
.hkpi-trend--warn    { background: rgba(249,115,22,0.12); color: #f97316; }
.hkpi-trend--success { background: rgba(34,197,94,0.12); color: #22c55e; }

/* ── Couleurs par KPI ───────────────────────────────────────────────── */
.hkpi--total .hkpi-icon {
  background: linear-gradient(135deg, rgba(79,140,255,0.22), rgba(79,140,255,0.1));
  border: 1px solid rgba(79,140,255,0.25);
  color: #7aacff;
}
.hkpi--total .hkpi-body strong { color: #7aacff !important; }
.hkpi--total::after { background: linear-gradient(90deg,#4f8cff,#7ec8ff) !important; }

.hkpi--open .hkpi-icon {
  background: linear-gradient(135deg, rgba(82,214,255,0.2), rgba(82,214,255,0.08));
  border: 1px solid rgba(82,214,255,0.22);
  color: #52d6ff;
}
.hkpi--open .hkpi-body strong { color: #52d6ff !important; }
.hkpi--open::after { background: linear-gradient(90deg,#52d6ff,#4f8cff) !important; }

.hkpi--blocked .hkpi-icon {
  background: linear-gradient(135deg, rgba(239,68,68,0.22), rgba(239,68,68,0.08));
  border: 1px solid rgba(239,68,68,0.25);
  color: #f87171;
}
.hkpi--blocked .hkpi-body strong { color: #f87171 !important; }
.hkpi--blocked::after { background: linear-gradient(90deg,#ef4444,#ff7f50) !important; }

.hkpi--late .hkpi-icon {
  background: linear-gradient(135deg, rgba(249,115,22,0.22), rgba(249,115,22,0.08));
  border: 1px solid rgba(249,115,22,0.25);
  color: #fb923c;
}
.hkpi--late .hkpi-body strong { color: #fb923c !important; }
.hkpi--late::after { background: linear-gradient(90deg,#f97316,#eab308) !important; }

.hkpi--done .hkpi-icon {
  background: linear-gradient(135deg, rgba(34,197,94,0.22), rgba(34,197,94,0.08));
  border: 1px solid rgba(34,197,94,0.25);
  color: #4ade80;
}
.hkpi--done .hkpi-body strong { color: #4ade80 !important; }
.hkpi--done::after { background: linear-gradient(90deg,#22c55e,#95d145) !important; }

/* Glow au hover par type */
.hkpi--total:hover   { border-color: rgba(79,140,255,0.3) !important; box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 16px rgba(79,140,255,0.1) !important; }
.hkpi--open:hover    { border-color: rgba(82,214,255,0.3) !important; box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 16px rgba(82,214,255,0.1) !important; }
.hkpi--blocked:hover { border-color: rgba(239,68,68,0.3) !important; box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 16px rgba(239,68,68,0.1) !important; }
.hkpi--late:hover    { border-color: rgba(249,115,22,0.3) !important; box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 16px rgba(249,115,22,0.1) !important; }
.hkpi--done:hover    { border-color: rgba(34,197,94,0.3) !important; box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 16px rgba(34,197,94,0.1) !important; }

/* ── Bouton Plein Écran ─────────────────────────────────────────────── */
.hero-fullscreen-btn {
  position: relative;
  z-index: 2;
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: rgba(168,190,220,0.7);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.hero-fullscreen-btn svg { width: 18px; height: 18px; }
.hero-fullscreen-btn:hover {
  background: rgba(200,230,59,0.1);
  border-color: rgba(200,230,59,0.3);
  color: #c8e63b;
  box-shadow: 0 0 12px rgba(200,230,59,0.12);
}
.hero-actions { display: flex; align-items: center; gap: 8px; position: relative; z-index: 2; }

/* ── FIN KPI v6 ─────────────────────────────────────────────────────── */

/* ── Rename Nav Items v8 ─────────────────────────────────────────────── */
.quick-nav-option-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(14,22,40,0.5);
  border: 1px solid rgba(79,140,255,0.08);
  margin-bottom: 2px;
  transition: border-color 0.2s;
}
.quick-nav-option-wrap:hover {
  border-color: rgba(79,140,255,0.22);
}
.quick-nav-option-wrap .quick-nav-option {
  border-radius: 0;
  border: none;
  margin: 0;
  background: transparent;
}
.quick-nav-rename {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 8px 12px;
  background: rgba(8,13,24,0.4);
  border-top: 1px solid rgba(255,255,255,0.04);
}
.quick-nav-rename-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(79,140,255,0.15);
  border-radius: 7px;
  color: #b8d4f0;
  font-size: 12px;
  padding: 5px 9px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.quick-nav-rename-input::placeholder { color: rgba(168,190,220,0.4); }
.quick-nav-rename-input:focus { border-color: rgba(79,140,255,0.5); background: rgba(79,140,255,0.07); }
.quick-nav-rename-save,
.quick-nav-rename-reset {
  flex-shrink: 0;
  background: none;
  border: 1px solid rgba(200,230,59,0.2);
  border-radius: 7px;
  color: #c8e63b;
  font-size: 13px;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
  padding: 0;
}
.quick-nav-rename-save:hover { background: rgba(200,230,59,0.15); border-color: #c8e63b; }
.quick-nav-rename-reset {
  border-color: rgba(255,77,77,0.2);
  color: #ff6b6b;
}
.quick-nav-rename-reset:hover { background: rgba(255,77,77,0.12); border-color: #ff6b6b; }
/* ── FIN Rename Nav Items v8 ─────────────────────────────────────────── */

/* ── Calendrier Mes Actions v9 ───────────────────────────────────────── */
.ma-calendar-wrap {
  padding: 20px 28px 0 28px;
}
.ma-calendar {
  background: var(--mf-card, #0e1628);
  border: 1px solid rgba(79,140,255,0.12);
  border-radius: 16px;
  padding: 18px 20px 14px 20px;
  margin-bottom: 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
.ma-cal-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.ma-cal-title {
  font-size: 15px;
  font-weight: 700;
  color: #c8d8f0;
  flex: 1;
  text-align: center;
  letter-spacing: 0.02em;
}
.ma-cal-btn-nav {
  background: rgba(79,140,255,0.1);
  border: 1px solid rgba(79,140,255,0.2);
  border-radius: 8px;
  color: #7eb4ff;
  font-size: 18px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
  flex-shrink: 0;
  line-height: 1;
}
.ma-cal-btn-nav:hover {
  background: rgba(79,140,255,0.22);
  border-color: #4f8cff;
  color: #fff;
}
.ma-cal-btn-clear {
  background: rgba(255,100,100,0.08);
  border: 1px solid rgba(255,100,100,0.2);
  border-radius: 8px;
  color: #ff8080;
  font-size: 11.5px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.18s;
  flex-shrink: 0;
}
.ma-cal-btn-clear:hover {
  background: rgba(255,100,100,0.18);
  border-color: #ff6b6b;
  color: #fff;
}
.ma-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.ma-cal-hdr {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: rgba(168,190,220,0.5);
  padding: 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ma-cal-cell {
  min-height: 52px;
  border-radius: 9px;
  padding: 5px 5px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  border: 1px solid transparent;
  position: relative;
  user-select: none;
}
.ma-cal-cell:hover:not(.ma-cal-empty) {
  background: rgba(79,140,255,0.1);
  border-color: rgba(79,140,255,0.25);
}
.ma-cal-cell.ma-cal-empty { cursor: default; pointer-events: none; }
.ma-cal-cell.is-today {
  background: rgba(200,230,59,0.08);
  border-color: rgba(200,230,59,0.3);
}
.ma-cal-cell.is-selected {
  background: rgba(79,140,255,0.2);
  border-color: #4f8cff;
  box-shadow: 0 0 10px rgba(79,140,255,0.2);
}
.ma-cal-cell.has-actions { cursor: pointer; }
.ma-cal-day {
  font-size: 13px;
  font-weight: 600;
  color: #9ab8d8;
  line-height: 1;
}
.ma-cal-cell.is-today .ma-cal-day { color: #c8e63b; }
.ma-cal-cell.is-selected .ma-cal-day { color: #fff; }
.ma-cal-count {
  font-size: 10px;
  font-weight: 700;
  background: rgba(79,140,255,0.25);
  color: #7eb4ff;
  border-radius: 10px;
  padding: 1px 5px;
  line-height: 1.4;
}
.ma-cal-cell.is-selected .ma-cal-count {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.ma-cal-dots {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1px;
}
.ma-cal-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.dot-blocked { background: #ff4d6d; }
.dot-late    { background: #f97316; }
.dot-done    { background: #22c55e; }
.dot-open    { background: #4f8cff; }
/* ── FIN Calendrier Mes Actions v9 ───────────────────────────────────── */

/* ══════════════════════════════════════════════════════════════════════
   MECA-FLOW DA OVERRIDES v20260608
   ══════════════════════════════════════════════════════════════════════ */

/* ── 1. Bouton plein écran global ────────────────────────────────────── */
.global-fullscreen-btn {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 10000;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(149,209,69,0.3);
  background: rgba(7,16,30,0.85);
  backdrop-filter: blur(10px);
  color: rgba(149,209,69,0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.global-fullscreen-btn svg { width: 15px; height: 15px; }
.global-fullscreen-btn:hover {
  background: rgba(149,209,69,0.15);
  border-color: rgba(149,209,69,0.6);
  color: #95d145;
  box-shadow: 0 0 16px rgba(149,209,69,0.3);
  transform: scale(1.05);
}

/* ── 2. KPI cards — redesign centré ─────────────────────────────────── */
.home-global-kpis {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 12px !important;
  margin-bottom: 18px !important;
}
.home-kpi-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 22px 14px 18px !important;
  border-radius: 18px !important;
  background: rgba(8,16,32,0.75) !important;
  border: 1px solid rgba(79,140,255,0.13) !important;
  text-align: center !important;
  position: relative !important;
  overflow: hidden !important;
  min-height: 120px !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}
.home-kpi-card:hover {
  border-color: rgba(149,209,69,0.25) !important;
  box-shadow: 0 0 20px rgba(149,209,69,0.08) !important;
}
.hkpi-icon {
  width: 38px !important;
  height: 38px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 11px !important;
  background: rgba(79,140,255,0.1) !important;
  flex-shrink: 0 !important;
}
.hkpi-icon svg {
  width: 19px !important;
  height: 19px !important;
  stroke: rgba(149,209,69,0.75) !important;
}
.hkpi-body {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 3px !important;
}
.hkpi-body strong {
  font-size: 34px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  color: #edf5ff !important;
  letter-spacing: -0.02em !important;
  display: block !important;
  animation: kpi-glow 3s ease-in-out infinite !important;
}
.hkpi-body span {
  font-size: 10px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.09em !important;
  color: rgba(168,182,199,0.55) !important;
  font-weight: 600 !important;
}
.hkpi-trend {
  position: absolute !important;
  top: 10px !important;
  right: 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}
/* Couleurs par type */
.hkpi--blocked .hkpi-icon { background: rgba(239,68,68,0.12) !important; }
.hkpi--blocked .hkpi-icon svg { stroke: #f87171 !important; }
.hkpi--blocked .hkpi-body strong { color: #f87171 !important; animation: none !important; }
.hkpi--blocked .hkpi-trend { color: #f87171 !important; }
.hkpi--late .hkpi-icon { background: rgba(251,146,60,0.12) !important; }
.hkpi--late .hkpi-icon svg { stroke: #fb923c !important; }
.hkpi--late .hkpi-body strong { color: #fb923c !important; animation: none !important; }
.hkpi--late .hkpi-trend { color: #fb923c !important; }
.hkpi--done .hkpi-icon { background: rgba(74,222,128,0.12) !important; }
.hkpi--done .hkpi-icon svg { stroke: #4ade80 !important; }
.hkpi--done .hkpi-body strong { color: #4ade80 !important; animation: none !important; }
.hkpi--done .hkpi-trend { color: #4ade80 !important; }
.hkpi--open .hkpi-trend { color: #4f8cff !important; }

/* ── 3. MECACHROME watermark — plus gros, plus flashy ───────────────── */
.hero-wordmark {
  position: absolute !important;
  right: 28px !important;
  bottom: 18px !important;
  top: auto !important;
  left: auto !important;
  opacity: 0.65 !important;
  pointer-events: none !important;
  z-index: 0 !important;
}
.hero-wordmark__text {
  font-size: clamp(44px, 6vw, 88px) !important;
  font-weight: 900 !important;
  letter-spacing: 0.07em !important;
  background: linear-gradient(110deg,
    rgba(149,209,69,0.95) 0%,
    rgba(220,255,150,1) 40%,
    rgba(255,255,255,1) 50%,
    rgba(149,209,69,0.95) 65%,
    rgba(79,140,255,0.85) 100%) !important;
  background-size: 200% auto !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: wm-shimmer 2.8s linear infinite !important;
  display: block !important;
  white-space: nowrap !important;
}
.hero-wordmark__swoosh {
  width: 100% !important;
  height: 3px !important;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(149,209,69,0.9) 30%,
    rgba(79,140,255,0.8) 70%,
    transparent 100%) !important;
  border-radius: 999px !important;
  margin-top: 5px !important;
  box-shadow: 0 0 18px rgba(149,209,69,0.55), 0 0 36px rgba(149,209,69,0.2) !important;
}

/* ── 4. Hero colors — plus vibrants ─────────────────────────────────── */
.hero, .hero-menu {
  background:
    radial-gradient(ellipse at 8% 60%, rgba(149,209,69,0.18) 0%, transparent 38%),
    radial-gradient(ellipse at 88% 12%, rgba(79,140,255,0.2) 0%, transparent 35%),
    radial-gradient(ellipse at 50% 95%, rgba(168,85,247,0.08) 0%, transparent 28%),
    linear-gradient(140deg, #060e1c 0%, #0c1d38 50%, #080f1e 100%) !important;
  border: 1px solid rgba(149,209,69,0.18) !important;
  box-shadow:
    0 0 0 1px rgba(149,209,69,0.06),
    0 24px 64px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(149,209,69,0.08) !important;
}

/* ── 5. Hero planes — fix visual ────────────────────────────────────── */
.hero-plane { opacity: 0.22 !important; }

/* ── 6. Bouton plein écran hero — ne pas chevaucher MECACHROME ───────── */
.hero-actions-menu {
  position: relative !important;
  z-index: 2 !important;
  flex-shrink: 0 !important;
}
.hero-fullscreen-btn {
  display: none !important;  /* Remplacé par le bouton global */
}

/* ── 7. Responsive KPI ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .home-global-kpis { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 600px) {
  .home-global-kpis { grid-template-columns: repeat(2, 1fr) !important; }
  .hero-wordmark { display: none !important; }
}
/* ── FIN DA Overrides v20260608 ──────────────────────────────────────── */

/* ══════════════════════════════════════════════════════════════════════
   EDGE NAV v20260608-v3 — Alignement propre + auth masqué
   ══════════════════════════════════════════════════════════════════════ */

/* 1. Masquage garanti sur la page de login (avant auth) */
body:not(.app-authenticated) #edgeNav {
  display: none !important;
}

/* 2. Nav collapsed : zéro padding horizontal → les enfants centrent dans 96px */
.edge-nav:not(:hover) {
  padding-left: 0 !important;
  padding-right: 0 !important;
  align-items: center !important;
}

/* 3. Brand : centré, même hauteur que les items */
.edge-nav:not(:hover) .edge-nav__brand {
  width: auto !important;
  padding: 0 !important;
  margin-bottom: 10px !important;
  justify-content: center !important;
}

/* 4. Logo : taille identique aux items non-actifs pour aligner */
.edge-nav__logo {
  width: 52px !important;
  height: 52px !important;
  border-radius: 18px !important;
  flex: 0 0 52px !important;
}

/* 5. Items container collapsed : centré */
.edge-nav:not(:hover) .edge-nav__items {
  width: auto !important;
  align-items: center !important;
  padding: 0 !important;
}

/* 6. Tous les items collapsed → même largeur de base = 52px centré */
.edge-nav:not(:hover) .edge-nav__item {
  width: 52px !important;
  min-width: 52px !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 !important;
  margin: 0 !important;
  justify-content: center !important;
  align-items: center !important;
  border-radius: 18px !important;
}

/* 7. Item ACTIF collapsed : aucun style spécial, juste l'animation */
.edge-nav:not(:hover) .edge-nav__item.is-active {
  width: 52px !important;
  min-width: 52px !important;
  height: 52px !important;
  min-height: 52px !important;
  border-radius: 18px !important;
  transform: none !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* 8. Badge taille normale */
.edge-nav__item-badge {
  flex: 0 0 36px !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 13px !important;
  font-size: 17px !important;
}

/* Animation : tremblement rapide (0-18%) puis pause (18-100%) sur 4s total */
@keyframes edgeNavWiggle {
  0%   { transform: rotate(0deg); }
  3%   { transform: rotate(-9deg); }
  6%   { transform: rotate(8deg); }
  9%   { transform: rotate(-6deg); }
  12%  { transform: rotate(5deg); }
  15%  { transform: rotate(-3deg); }
  18%  { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

/* Icône active : wiggle toutes les 4s */
.edge-nav:not(:hover) .edge-nav__item.is-active .edge-nav__item-badge {
  animation: edgeNavWiggle 4s ease-in-out infinite !important;
  transform-origin: center !important;
}

/* 9. Collapse button : centré explicitement */
.edge-nav__collapse-btn {
  align-self: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.edge-nav:not(.is-pinned):not(:hover) .edge-nav__collapse-btn {
  width: 34px !important;
  height: 34px !important;
}

/* ── FIN EDGE NAV v3 ── */

/* ══════════════════════════════════════════════════════════════════════
   EDGE NAV v20260608-v4 — Alignement final + suppression épingler
   ══════════════════════════════════════════════════════════════════════ */

/* Supprimer le bouton épingler */
.edge-nav__collapse-btn { display: none !important; }

/* Brand-copy toujours masquée quand collapsed (évite décalage largeur) */
.edge-nav:not(:hover) .edge-nav__brand-copy {
  display: none !important;
}

/* Brand centrée comme les items */
.edge-nav:not(:hover) .edge-nav__brand {
  width: 52px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Logo même taille que les items */
.edge-nav__logo {
  width: 52px !important;
  height: 52px !important;
  flex: 0 0 52px !important;
  border-radius: 18px !important;
}

/* ── FIN v4 ── */

/* ══════════════════════════════════════════════════════════════════════
   EDGE NAV v20260608-v5 — Logo 36px = même position visuelle que les badges
   ══════════════════════════════════════════════════════════════════════ */

/* Logo réduit à 36px (même taille que les badges dans les items)
   → dans un brand de 52px avec justify-content:center
   → left edge = 22+(52-36)/2 = 30px = même que les badges ✓ */
.edge-nav:not(:hover) .edge-nav__logo {
  width: 42px !important;
  height: 42px !important;
  flex: 0 0 42px !important;
  border-radius: 16px !important;
}

/* Brand : forcer 52px = même largeur que les items pour centrage cohérent */
.edge-nav:not(:hover) .edge-nav__brand {
  width: 52px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0 !important;
  justify-content: center !important;
}

/* ── FIN v5 ── */

/* ══════════════════════════════════════════════════════════════════════
   EDGE NAV v6 — Logo décalé 15% droite
   ══════════════════════════════════════════════════════════════════════ */
.edge-nav:not(:hover) .edge-nav__brand {
  justify-content: flex-start !important;
  padding-left: 8px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* ══════════════════════════════════════════════════════════════════════
   PARAMÈTRES SQCDP — Masquer section contextes (déplacée dans Gérer les périmètres)
   ══════════════════════════════════════════════════════════════════════ */
#settingsModal .settings-block:has(#contextListManager),
#settingsModal .context-create-card {
  display: none !important;
}
/* Quand on est dans settingsModal, si le dernier settings-block avant modal-actions contient le label "Contextes existants", hide it */
#settingsModal .settings-block:has(label[for="newContextName"]) {
  display: none !important;
}

/* ══════════════════════════════════════════════════════════════════════
   PARAMÈTRES SQCDP + QRQC — Redesign moderne
   ══════════════════════════════════════════════════════════════════════ */

/* ── Modal backdrop ── */
#settingsModal.modal-overlay,
#qrqcSettingsModal.modal-overlay {
  background: rgba(3,8,20,0.88) !important;
  backdrop-filter: blur(12px) !important;
}

/* ── Modal card ── */
#settingsModal .modal-card,
#qrqcSettingsModal .modal-card {
  background: linear-gradient(160deg, #0b1829 0%, #060d1a 100%) !important;
  border: 1px solid rgba(255,255,255,0.09) !important;
  border-radius: 24px !important;
  box-shadow: 0 40px 80px rgba(0,0,0,0.7) !important;
  font-family: Inter, system-ui, sans-serif !important;
}

/* ── Modal header ── */
#settingsModal .modal-header,
#qrqcSettingsModal .modal-header {
  background: transparent !important;
  border-bottom: 1px solid rgba(255,255,255,0.07) !important;
  padding: 22px 28px 18px !important;
}
#settingsModal .modal-header h3,
#qrqcSettingsModal .modal-header h3 {
  font-size: 19px !important;
  font-weight: 900 !important;
  color: #edf5ff !important;
  letter-spacing: -0.3px !important;
}
#settingsModal .modal-header p,
#qrqcSettingsModal .modal-header p {
  font-size: 12px !important;
  color: rgba(168,182,199,0.5) !important;
  margin-top: 3px !important;
}

/* ── Buttons in header ── */
#settingsModal .modal-header .btn,
#qrqcSettingsModal .modal-header .btn {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 10px !important;
  color: rgba(200,210,220,0.8) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 6px 14px !important;
  transition: all 0.15s !important;
}
#settingsModal .modal-header .btn:hover,
#qrqcSettingsModal .modal-header .btn:hover {
  background: rgba(255,255,255,0.1) !important;
  color: #edf5ff !important;
}

/* ── Modal body ── */
#settingsModal .modal-body,
#qrqcSettingsModal .modal-body {
  padding: 24px 28px !important;
  gap: 0 !important;
}

/* ── Settings blocks ── */
#settingsModal .settings-block,
#qrqcSettingsModal .settings-block {
  background: rgba(255,255,255,0.025) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 16px !important;
  padding: 16px 18px !important;
  margin-bottom: 12px !important;
  transition: border-color 0.15s !important;
}
#settingsModal .settings-block:hover,
#qrqcSettingsModal .settings-block:hover {
  border-color: rgba(255,255,255,0.1) !important;
}

/* ── Settings grid ── */
#settingsModal .settings-grid,
#qrqcSettingsModal .settings-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  margin-bottom: 0 !important;
}
#settingsModal .settings-grid .settings-block,
#qrqcSettingsModal .settings-grid .settings-block {
  margin-bottom: 0 !important;
}

/* ── Labels ── */
#settingsModal .settings-block > label,
#qrqcSettingsModal .settings-block > label,
#settingsModal .settings-block label,
#qrqcSettingsModal .settings-block label {
  font-size: 11px !important;
  font-weight: 800 !important;
  color: rgba(149,209,69,0.7) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  margin-bottom: 8px !important;
  display: block !important;
}

/* ── Inputs & Selects ── */
#settingsModal input[type="text"],
#settingsModal input[type="number"],
#settingsModal input[type="time"],
#settingsModal select,
#settingsModal textarea,
#qrqcSettingsModal input[type="text"],
#qrqcSettingsModal input[type="number"],
#qrqcSettingsModal input[type="time"],
#qrqcSettingsModal select,
#qrqcSettingsModal textarea {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 12px !important;
  color: #edf5ff !important;
  font-size: 13px !important;
  padding: 10px 14px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
  transition: border-color 0.15s !important;
  outline: none !important;
  resize: vertical !important;
}
#settingsModal input:focus,
#settingsModal select:focus,
#settingsModal textarea:focus,
#qrqcSettingsModal input:focus,
#qrqcSettingsModal select:focus,
#qrqcSettingsModal textarea:focus {
  border-color: rgba(149,209,69,0.35) !important;
  background: rgba(149,209,69,0.04) !important;
}

/* ── Primary button (Appliquer) ── */
#settingsModal .btn.primary,
#qrqcSettingsModal .btn.primary {
  background: linear-gradient(135deg, #6fcf3d, #4a9f28) !important;
  border: none !important;
  border-radius: 12px !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  padding: 11px 28px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 18px rgba(95,185,50,0.25) !important;
  transition: all 0.15s !important;
}
#settingsModal .btn.primary:hover,
#qrqcSettingsModal .btn.primary:hover {
  filter: brightness(1.1) !important;
  box-shadow: 0 6px 24px rgba(95,185,50,0.35) !important;
}

/* ── Ghost buttons (Ajouter colonne, etc.) ── */
#settingsModal .btn.ghost,
#qrqcSettingsModal .btn.ghost {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 10px !important;
  color: rgba(168,182,199,0.8) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  transition: all 0.15s !important;
}
#settingsModal .btn.ghost:hover,
#qrqcSettingsModal .btn.ghost:hover {
  background: rgba(255,255,255,0.1) !important;
  color: #edf5ff !important;
}

/* ── Column manager rows ── */
#settingsModal .sqcdp-column-row {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 10px !important;
  padding: 8px 10px !important;
  margin-bottom: 6px !important;
  gap: 8px !important;
}

/* ── Category color rows ── */
#settingsModal .category-color-row {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 10px !important;
  padding: 8px 12px !important;
  margin-bottom: 5px !important;
  color: #edf5ff !important;
  font-size: 13px !important;
}

/* ── Modal actions ── */
#settingsModal .modal-actions,
#qrqcSettingsModal .modal-actions {
  margin-top: 8px !important;
  padding-top: 0 !important;
  border-top: none !important;
}

/* ── Settings block header ── */
#settingsModal .settings-block-header {
  margin-bottom: 12px !important;
}
#settingsModal .settings-block-header label {
  font-size: 11px !important;
  font-weight: 800 !important;
  color: rgba(149,209,69,0.7) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
}
#settingsModal .settings-block-header p {
  font-size: 12px !important;
  color: rgba(168,182,199,0.45) !important;
  margin-top: 2px !important;
}

/* ── FIN v6 ── */

/* ══════════════════════════════════════════════════════════════════════
   THEME CLAIR v7 — Fonds moins noirs, meilleur contraste en plein jour
   ══════════════════════════════════════════════════════════════════════ */

/* Body / app background */
body { background: #0e1c30 !important; }

/* Pages principales */
#homePage,
#formsPage,
#syncPage,
#sqcdpPage,
#qrqcPage,
#a3Page,
#myActionsPage {
  background: #0e1c30 !important;
}

/* Edge nav */
.edge-nav {
  background: linear-gradient(180deg, #14243e 0%, #0e1c30 100%) !important;
}

/* Cards / panels */
.card,
.sqcdp-card,
.home-card,
.home-shortcut-card,
.qrqc-card,
.a3-card {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.1) !important;
}

/* Modal overlays */
.modal-overlay {
  background: rgba(6,14,28,0.85) !important;
}
.modal-card {
  background: linear-gradient(155deg, #14243e, #0e1c30) !important;
  border-color: rgba(255,255,255,0.1) !important;
}

/* Tableaux SQCDP / QRQC */
.sqcdp-table thead th { background: rgba(255,255,255,0.07) !important; }
.sqcdp-table tbody tr:nth-child(even) td { background: rgba(255,255,255,0.025) !important; }

/* Charts home view */
#chartsHomeView { background: #0e1c30 !important; }
.charts-list-header { background: linear-gradient(140deg, #14243e, #192e4a) !important; }
.ch-diag-card { background: linear-gradient(140deg, #14243e 0%, #1a2f4a 100%) !important; border-color: rgba(255,255,255,0.1) !important; }

/* Kanban */
#sqcdpTodoOverlay { background: #0e1c30 !important; }

/* ── FIN v7 ── */

/* ══════════════════════════════════════════════════════════════════════
   EDGE NAV v9 — Trait fin vert par défaut, expansion au hover (tous modules)
   ══════════════════════════════════════════════════════════════════════ */

/* ── État rétracté : fin trait vert ────────────────────────────────── */
.edge-nav,
.edge-nav.is-pinned {
  position: fixed !important;
  top: 12px !important; bottom: 12px !important; left: 0 !important;
  width: 8px !important;
  min-width: 8px !important;
  border-radius: 0 12px 12px 0 !important;
  border: none !important;
  border-right: 2px solid rgba(154,230,58,0.55) !important;
  background: linear-gradient(180deg,
    rgba(154,230,58,0.22) 0%,
    rgba(79,140,255,0.14) 50%,
    rgba(154,230,58,0.22) 100%) !important;
  box-shadow: 2px 0 14px rgba(154,230,58,0.18) !important;
  padding: 0 !important;
  overflow: hidden !important;
  cursor: pointer !important;
  z-index: 99999 !important;
  pointer-events: auto !important;
  transition: width 0.28s cubic-bezier(0.34,1.1,0.64,1),
              border-radius 0.28s ease,
              background 0.28s ease,
              box-shadow 0.28s ease !important;
}

/* ── État déployé : survol OU force-hover JS ───────────────────────── */
.edge-nav:hover,
.edge-nav.force-hover {
  position: fixed !important;
  top: 0 !important; bottom: 0 !important; left: 0 !important;
  width: 260px !important;
  min-width: 260px !important;
  border-radius: 0 28px 28px 0 !important;
  border: 1px solid rgba(154,230,58,0.25) !important;
  background: #0a0f1e !important;  /* Fond opaque — pas de backdrop flou */
  box-shadow: 4px 0 40px rgba(0,0,0,0.7), 0 0 20px rgba(154,230,58,0.1) !important;
  padding: 16px 12px !important;
  overflow: visible !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 99999 !important;
}

/* Masquer contenu en état rétracté */
.edge-nav:not(:hover):not(.force-hover) > * {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease !important;
}

/* Afficher au hover ou force-hover */
.edge-nav:hover > *,
.edge-nav.force-hover > * {
  opacity: 1 !important;
  pointer-events: auto !important;
  transition: opacity 0.22s ease 0.1s !important;
}

/* Cacher bouton pin — inutile avec cette UX */
.edge-nav__collapse-btn {
  display: none !important;
}

/* ── App shell : espace minimal pour le trait ──────────────────────── */
.app-shell { padding-left: 18px !important; }
.app-shell.nav-pinned { padding-left: 18px !important; }

/* ── FIN v9 ── */

/* ── Charts connector animation ── */
@keyframes chDashAnim { to { stroke-dashoffset: -24; } }

/* ── Subgroup Hub Grid (v2 redesign) ── */
.shortcut-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  padding: 16px;
}

.shortcut-hub-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px 16px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.shortcut-hub-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.16);
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
}

.shortcut-hub-card__glow {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 14px 14px 0 0;
  opacity: 0.7;
}

.shortcut-hub-card__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shortcut-hub-card__icon .category-glyph {
  width: 26px;
  height: 26px;
}

.shortcut-hub-card__body {
  flex: 1;
  min-width: 0;
}

.shortcut-hub-card__body strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--mf-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shortcut-hub-card__body span {
  display: block;
  font-size: 11px;
  color: var(--mf-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shortcut-hub-card__arrow {
  flex-shrink: 0;
  color: var(--mf-muted);
  opacity: 0.5;
  transition: opacity 0.18s, transform 0.18s;
}

.shortcut-hub-card__arrow svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shortcut-hub-card:hover .shortcut-hub-card__arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* ── Subgroup Settings Manager (v2) ── */
.shortcut-manager-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  margin-bottom: 8px;
  transition: background 0.15s;
}

.shortcut-manager-card:hover {
  background: rgba(255,255,255,0.05);
}

.shortcut-manager-card__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shortcut-manager-card__icon .category-glyph {
  width: 22px;
  height: 22px;
}

.shortcut-manager-card__body {
  flex: 1;
  min-width: 0;
}

.shortcut-manager-card__body strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--mf-text);
}

.shortcut-manager-card__body span {
  display: block;
  font-size: 11px;
  color: var(--mf-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shortcut-manager-card__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.shortcut-manager-card__actions .btn {
  display: inline-flex;
  align-items: center;
}

/* ── Shortcut modal color picker ── */
.shortcut-color-block .shortcut-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.shortcut-color-picker {
  width: 42px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 2px;
  background: transparent;
  cursor: pointer;
}

.shortcut-icon-preview {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #5b8cff;
  transition: background 0.2s;
}

.shortcut-icon-preview .category-glyph {
  width: 22px;
  height: 22px;
}

/* ── Shortcut empty state ── */
.shortcut-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--mf-muted);
  text-align: center;
  gap: 4px;
}

.shortcut-empty p {
  margin: 0;
  font-size: 13px;
}

/* ── Administration des membres v2 ── */
.admin-row.adm2 {
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px 20px; border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}
.adm2-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.adm2-avatar {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.adm2-id { flex: 1; min-width: 140px; }
.adm2-id strong { display: block; font-size: 15px; }
.adm2-id span { display: block; font-size: 12px; color: var(--mf-muted); margin-top: 1px; }
.adm2-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.adm2-badge {
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 100px;
  background: rgba(255,255,255,0.07); color: var(--mf-muted);
  border: 1px solid rgba(255,255,255,0.08);
}
.adm2-badge--admin { background: rgba(149,209,69,0.14); color: #95d145; border-color: rgba(149,209,69,0.3); }
.adm2-badge--beta { background: rgba(168,85,247,0.14); color: #c084fc; border-color: rgba(168,85,247,0.3); }
.adm2-badge--ok { background: rgba(79,140,255,0.12); color: #7db8ff; border-color: rgba(79,140,255,0.25); }
.adm2-badge--warn { background: rgba(249,115,22,0.12); color: #fb923c; border-color: rgba(249,115,22,0.25); }

/* Switches */
.adm2-toggles { display: flex; gap: 22px; flex-wrap: wrap; }
.adm2-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.adm2-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.adm2-track {
  width: 40px; height: 22px; border-radius: 100px; flex-shrink: 0; position: relative;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.18s;
}
.adm2-track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #cbd5e1; transition: transform 0.18s, background 0.18s;
}
.adm2-switch input:checked + .adm2-track { background: rgba(149,209,69,0.5); border-color: rgba(149,209,69,0.5); }
.adm2-switch input:checked + .adm2-track::after { transform: translateX(18px); background: #95d145; }
.adm2-switch input:checked + .adm2-track--beta { background: rgba(168,85,247,0.45); border-color: rgba(168,85,247,0.5); }
.adm2-switch input:checked + .adm2-track--beta::after { background: #c084fc; }
.adm2-lab { font-size: 13px; font-weight: 700; line-height: 1.2; }
.adm2-lab em { display: block; font-style: normal; font-size: 11px; font-weight: 500; color: var(--mf-muted); }

/* Périmètres : chips compactes */
.adm2-groups-title {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mf-muted); margin-bottom: 8px;
}
.adm2 .admin-group-checklist { display: flex; flex-wrap: wrap; gap: 8px; }
.adm2 .admin-group-check {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 100px; cursor: pointer;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  font-size: 12px; font-weight: 600; transition: 0.15s;
}
.adm2 .admin-group-check:hover { border-color: rgba(255,255,255,0.25); }
.adm2 .admin-group-check input {
  appearance: none; -webkit-appearance: none; margin: 0;
  width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.3); background: transparent;
  display: inline-block; position: relative; cursor: pointer; transition: 0.15s;
}
.adm2 .admin-group-check input:checked { background: #95d145; border-color: #95d145; }
.adm2 .admin-group-check input:checked::after {
  content: "✓"; position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 10px; font-weight: 900; color: #10240a;
}
.adm2 .admin-group-check:has(input:checked) {
  background: rgba(149,209,69,0.1); border-color: rgba(149,209,69,0.35); color: #c8e99a;
}

/* Pied de carte : code + actions */
.adm2-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid rgba(255,255,255,0.06); }
.adm2-pw {
  height: 34px; border-radius: 8px; padding: 0 12px; width: 200px;
  border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05);
  color: inherit; font-size: 13px;
}
.adm2-pw:focus { outline: none; border-color: rgba(149,209,69,0.5); }
.adm2-flex { flex: 1; }
.adm2-note { font-size: 12px; color: var(--mf-muted); font-style: italic; }

/* ── Administration des membres v3 — table compacte ── */
.adm3-table { display: flex; flex-direction: column; gap: 8px; }
.adm3-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) auto minmax(200px, 1.6fr) auto;
  gap: 14px; align-items: center;
  padding: 12px 16px; border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  transition: background 0.15s, border-color 0.15s;
}
.adm3-row:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.12); }
@media (max-width: 900px) { .adm3-row { grid-template-columns: 1fr; } }

.adm3-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.adm3-av {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: #fff;
}
.adm3-names { min-width: 0; }
.adm3-names strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm3-names span { display: block; font-size: 11px; color: var(--mf-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.adm3-cell--role { display: flex; gap: 14px; }
.adm3-sw { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; position: relative; }
.adm3-sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.adm3-tr {
  width: 34px; height: 19px; border-radius: 100px; flex-shrink: 0; position: relative;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.15s;
}
.adm3-tr::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 13px; height: 13px; border-radius: 50%;
  background: #cbd5e1; transition: transform 0.15s, background 0.15s;
}
.adm3-sw input:checked ~ .adm3-tr { background: rgba(149,209,69,0.5); border-color: rgba(149,209,69,0.5); }
.adm3-sw input:checked ~ .adm3-tr::after { transform: translateX(15px); background: #95d145; }
.adm3-sw input:checked ~ .adm3-tr--b { background: rgba(168,85,247,0.45); border-color: rgba(168,85,247,0.5); }
.adm3-sw input:checked ~ .adm3-tr--b::after { background: #c084fc; }
.adm3-swlab { font-size: 12px; font-weight: 700; }

.adm3-cell--groups { display: flex; flex-wrap: wrap; gap: 6px; }
.adm3-chip {
  padding: 5px 11px; border-radius: 100px; cursor: pointer;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12);
  color: var(--mf-muted); font-size: 11.5px; font-weight: 600;
  transition: 0.13s;
}
.adm3-chip:hover { border-color: rgba(255,255,255,0.3); color: var(--mf-text); }
.adm3-chip.on {
  background: rgba(149,209,69,0.14); border-color: rgba(149,209,69,0.45);
  color: #c8e99a;
}
.adm3-chip.on::before { content: "✓ "; font-weight: 900; }

.adm3-cell--actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.adm3-pw {
  height: 32px; border-radius: 8px; padding: 0 10px; width: 150px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05);
  color: inherit; font-size: 12.5px;
}
.adm3-pw:focus { outline: none; border-color: rgba(149,209,69,0.5); }
.adm3-badge {
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 100px;
  background: rgba(149,209,69,0.12); color: #95d145; border: 1px solid rgba(149,209,69,0.3);
  white-space: nowrap;
}
/* ── Admin v4 : fix chevauchement switches + barre Valider ── */
.adm3-sw {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  width: auto !important;
  cursor: pointer;
}
.adm3-sw input {
  position: absolute !important;
  opacity: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  left: 0; top: 0;
  cursor: pointer; z-index: 2;
}
.adm3-tr {
  display: inline-block !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 19px !important;
  flex-shrink: 0 !important;
}
.adm3-swlab {
  display: inline-block !important;
  white-space: nowrap !important;
  font-size: 12px; font-weight: 700;
}
.adm3-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin-bottom: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  position: sticky; top: 0; z-index: 5;
  backdrop-filter: blur(8px);
}
.adm3-bar-info { flex: 1; font-size: 12.5px; color: var(--mf-muted); }
.adm3-bar-info--dirty { color: #fbbf24; font-weight: 700; }
.adm3-row.is-dirty { border-color: rgba(251,191,36,0.45); background: rgba(251,191,36,0.05); }
.adm3-dot { color: #fbbf24; font-size: 10px; vertical-align: middle; }
/* ── Admin v5 : messages visibles dans le panneau ── */
.adm3-msg {
  display: none; padding: 10px 14px; margin-bottom: 10px;
  border-radius: 10px; font-size: 13px; font-weight: 600;
}
.adm3-msg--error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.4); color: #fca5a5; }
.adm3-msg--success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.35); color: #86efac; }
.adm3-msg--info { background: rgba(79,140,255,0.1); border: 1px solid rgba(79,140,255,0.3); color: #93c5fd; }

/* ══════════════════════════════════════════════════════════════════════
   LETTRES SQCDP — colonne rétrécie à droite du Power BI
   Au survol (ou au toucher), le panneau s'agrandit vers la gauche par-dessus
   le Power BI : les jours deviennent cliquables (gris → vert → rouge).
   ══════════════════════════════════════════════════════════════════════ */
.sqcdp-bi-row {
  display: flex;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 16px;
}

.sqcdp-bi-row > .powerbi-card {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
}

.sqcdp-letters-dock {
  position: relative;
  flex: 0 0 196px;
  z-index: 30;
}

.sqcdp-letters-panel {
  --letter-cell: 8px;
  --letter-gap: 2px;
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 196px;
  max-height: 100%;
  overflow: hidden;
  padding: 10px;
  box-sizing: border-box;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(14, 22, 35, 0.98), rgba(10, 18, 29, 0.99));
  border: 1px solid var(--line-soft);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  outline: none;
  transition: box-shadow 0.15s ease;
}

/* ── État agrandi ── */
.sqcdp-letters-dock:hover .sqcdp-letters-panel,
.sqcdp-letters-dock:has(:is(input, select):focus) .sqcdp-letters-panel,
.sqcdp-letters-dock.is-open .sqcdp-letters-panel {
  --letter-cell: 26px;
  --letter-gap: 3px;
  width: max-content;
  max-width: min(1240px, calc(100vw - 80px));
  max-height: none;
  overflow: visible;
  padding: 12px 14px;
  border-color: rgba(149, 209, 69, 0.3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.sqcdp-letters-dock:hover .sqcdp-letters-panel.is-compact,
.sqcdp-letters-dock:has(:is(input, select):focus) .sqcdp-letters-panel.is-compact,
.sqcdp-letters-dock.is-open .sqcdp-letters-panel.is-compact {
  --letter-cell: 22px;
  --letter-gap: 2px;
}

.sqcdp-letters-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.sqcdp-letters-title {
  margin-right: auto;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.sqcdp-letters-month-label {
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-transform: capitalize;
}

.sqcdp-letters-toolbar input[type="month"] {
  height: 36px;
  width: auto;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: #1b2834;
  color: var(--text);
  color-scheme: dark;
}

.sqcdp-letters-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.sqcdp-letters-empty {
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
}

.sqcdp-letter-card {
  --letter-accent: var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: 10px;
  background: #18222d;
  border: 1px solid var(--letter-accent);
}

.sqcdp-letter-card--s { --letter-accent: rgba(46, 160, 67, 0.45); }
.sqcdp-letter-card--q { --letter-accent: rgba(47, 129, 247, 0.45); }
.sqcdp-letter-card--c { --letter-accent: rgba(243, 156, 18, 0.45); }
.sqcdp-letter-card--m { --letter-accent: rgba(243, 156, 18, 0.45); }
.sqcdp-letter-card--d { --letter-accent: rgba(224, 49, 49, 0.45); }
.sqcdp-letter-card--p { --letter-accent: rgba(168, 85, 247, 0.45); }

.sqcdp-letter-card__head {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: calc(7 * var(--letter-cell) + 6 * var(--letter-gap));
}

.sqcdp-letter-card__axis {
  font-weight: 800;
  font-size: 11px;
}

.sqcdp-letter-card__shape {
  flex: none;
  width: 42px;
  height: 24px;
  padding: 0 4px;
  border-radius: 6px;
  border: 1px solid var(--line-soft);
  background: #1b2834;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  color-scheme: dark;
}

.sqcdp-letter-card__name {
  flex: 1;
  min-width: 0;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
}

.sqcdp-letter-card__name:hover,
.sqcdp-letter-card__name:focus {
  border-color: var(--line-soft);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.sqcdp-letter-card__delete {
  flex: none;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.5;
}

.sqcdp-letter-card__delete:hover {
  opacity: 1;
  color: #ffd5d5;
  background: rgba(255, 77, 79, 0.18);
}

.sqcdp-letter-grid {
  display: grid;
  grid-template-columns: repeat(7, var(--letter-cell));
  grid-auto-rows: var(--letter-cell);
  gap: var(--letter-gap);
}

.sqcdp-day {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(164, 211, 255, 0.14);
  border-radius: calc(var(--letter-cell) * 0.2);
  background: #3a4552;
  color: #d6dee8;
  font-size: calc(var(--letter-cell) * 0.42);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

button.sqcdp-day {
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.12s ease;
}

button.sqcdp-day:hover {
  filter: brightness(1.2);
  transform: scale(1.08);
}

.sqcdp-day.is-future {
  background: #2c3540;
  color: #8d9aab;
}

.sqcdp-day.is-green {
  background: #2ea043;
  border-color: #56d364;
  color: #fff;
}

.sqcdp-day.is-red {
  background: #d62f32;
  border-color: #ff6b6d;
  color: #fff;
}

.sqcdp-day.is-today {
  box-shadow: 0 0 0 2px #ffd166;
}

.sqcdp-day--blank {
  visibility: hidden;
}

.sqcdp-day--out {
  background: transparent;
  border-style: dashed;
  border-color: rgba(164, 211, 255, 0.1);
}

.sqcdp-letter-card__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
}

.sqcdp-letter-count::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 3px;
  border-radius: 2px;
}

.sqcdp-letter-count.is-green::before { background: #2ea043; }
.sqcdp-letter-count.is-red::before { background: #d62f32; }

/* ── État rétréci : mini-lettres en couleur, sans chiffres ni réglages ── */
.sqcdp-letters-dock:not(:hover):not(:has(:is(input, select):focus)):not(.is-open) :is(
  #sqcdpLettersMonth,
  #btnSqcdpLettersCurrentMonth,
  #btnAddSqcdpLetter,
  .sqcdp-letter-card__shape,
  .sqcdp-letter-card__name,
  .sqcdp-letter-card__delete
) {
  display: none;
}

.sqcdp-letters-dock:not(:hover):not(:has(:is(input, select):focus)):not(.is-open) .sqcdp-day {
  font-size: 0;
  border-width: 0;
  pointer-events: none;
}

.sqcdp-letters-dock:not(:hover):not(:has(:is(input, select):focus)):not(.is-open) .sqcdp-day.is-today {
  box-shadow: 0 0 0 1px #ffd166;
}

.sqcdp-letters-dock:not(:hover):not(:has(:is(input, select):focus)):not(.is-open) .sqcdp-letter-card__foot {
  justify-content: flex-start;
  gap: 5px;
}

@media (max-width: 900px) {
  .sqcdp-bi-row {
    flex-direction: column;
  }

  .sqcdp-letters-dock {
    flex: none;
  }

  .sqcdp-letters-panel,
  .sqcdp-letters-dock .sqcdp-letters-panel {
    position: static;
    width: auto;
    max-width: none;
    --letter-cell: 22px;
  }
}

/* Alerte : les lettres ne sont pas enregistrées côté serveur (visible même rétréci). */
.sqcdp-letters-warning {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 77, 79, 0.5);
  background: rgba(255, 77, 79, 0.14);
  color: #ffd5d5;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.sqcdp-letters-warning[hidden] {
  display: none;
}

.sqcdp-letters-warning.is-ok {
  border-color: rgba(46, 160, 67, 0.45);
  background: rgba(46, 160, 67, 0.12);
  color: #b8f0c4;
  font-weight: 600;
}
