/* ============================================================
   Supa - CRM prospects & clients
   Feuille de style principale (mobile-first)
   ============================================================ */

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef2ff;
  --accent: #06b6d4;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e5e7f0;
  --bg: #f4f5fb;
  --card: #ffffff;
  --success: #10b981;
  --success-soft: #ecfdf5;
  --warn: #f59e0b;
  --warn-soft: #fffbeb;
  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --info: #0ea5e9;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .18);
  --shadow-lg: 0 24px 60px -24px rgba(15, 23, 42, .35);
  --top-h: 60px;
  --bottom-h: 62px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body { padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom, 0px) + 14px); }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 10px; }
a { color: var(--primary); text-decoration: none; }
svg { display: block; }
button { font-family: inherit; }


/* ---------------------------------------------------------- */
/* Barre superieure                                           */
/* ---------------------------------------------------------- */

.app-top {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}

.app-top__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--top-h);
  padding: 0 14px;
  max-width: 1240px;
  margin: 0 auto;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--primary), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
  flex: none;
}

.brand__text { min-width: 0; }
.brand__name { font-weight: 800; font-size: 16px; line-height: 1.1; }
.brand__sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.app-top__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---------------------------------------------------------- */
/* Navigation basse                                           */
/* ---------------------------------------------------------- */

.app-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.app-bottom__inner {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  max-width: 640px;
  margin: 0 auto;
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: var(--bottom-h);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  padding: 0 2px;
  background: transparent;
  border: 0;
  cursor: pointer;
  width: 100%;
}

.nav-item svg { width: 22px; height: 22px; }
.nav-item.is-active { color: var(--primary); }
.nav-item.is-active svg { stroke-width: 2.2; }

}

.nav-item svg { width: 22px; height: 22px; }
.nav-item.is-active { color: var(--primary); }
.nav-item.is-active svg { stroke-width: 2.2; }

/* ---------------------------------------------------------- */
/* Mise en page                                               */
/* ---------------------------------------------------------- */

.wrap { max-width: 1240px; margin: 0 auto; padding: 16px 14px 8px; }

.page-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.page-head__title { font-size: 22px; }
.page-head__sub { color: var(--muted); font-size: 13.5px; margin: 0; }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.section { margin-bottom: 18px; }
.section__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.section__head h2 { font-size: 16px; }
.section__head .spacer { margin-left: auto; }
.section__note { color: var(--muted); font-size: 12.5px; }

/* ---------------------------------------------------------- */
/* Cartes                                                     */
/* ---------------------------------------------------------- */

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

.card--flush { padding: 0; overflow: hidden; }

.card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.card__head h3 { font-size: 15px; }
.card__head .spacer { margin-left: auto; }

/* ---------------------------------------------------------- */
/* KPI                                                        */
/* ---------------------------------------------------------- */

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

.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi__label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi__value { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.kpi__foot { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi__icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
}
.kpi--accent .kpi__icon { background: #ecfeff; color: var(--accent); }
.kpi--success .kpi__icon { background: var(--success-soft); color: var(--success); }
.kpi--warn .kpi__icon { background: var(--warn-soft); color: var(--warn); }

.trend { font-weight: 700; font-size: 12.5px; }
.trend--up { color: var(--success); }
.trend--down { color: var(--danger); }

.progress { height: 8px; background: #eef0f7; border-radius: 99px; overflow: hidden; }
.progress__bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 99px; }

/* ---------------------------------------------------------- */
/* Boutons                                                    */
/* ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .16s ease, background .16s ease;
}

.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(.98); }
.btn:hover { box-shadow: var(--shadow); }
.btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); }
.btn--ghost { background: #fff; color: var(--primary); border-color: #dcdcf7; }
.btn--soft { background: var(--primary-soft); border-color: transparent; color: var(--primary-dark); }
.btn--danger { background: var(--danger-soft); border-color: #fbd5d5; color: #b91c1c; }
.btn--success { background: var(--success-soft); border-color: #c7f0dd; color: #047857; }
.btn--sm { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.btn--block { width: 100%; }
.btn--icon { padding: 9px; border-radius: 11px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------------------------------------------------- */
/* Badges et pastilles                                        */
/* ---------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 99px;
  background: #eef0f7;
  color: var(--muted);
  white-space: nowrap;
}

.badge--primary { background: var(--primary-soft); color: var(--primary-dark); }
.badge--success { background: var(--success-soft); color: #047857; }
.badge--warn { background: var(--warn-soft); color: #b45309; }
.badge--danger { background: var(--danger-soft); color: #b91c1c; }
.badge--accent { background: #ecfeff; color: #0e7490; }
.badge--dot::before {
  content: "";
  width: 7px; height: 7px; border-radius: 99px;
  background: currentColor;
}

/* ---------------------------------------------------------- */
/* Formulaires                                                */
/* ---------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12.5px; font-weight: 600; color: #334155; }
.field .hint { font-size: 12px; color: var(--muted); }

.input, .select, .textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.textarea { min-height: 90px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .14);
}

.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
.form-grid--2 { grid-template-columns: 1fr; }

.search-bar { position: relative; }
.search-bar svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: var(--muted);
}
.search-bar .input { padding-left: 36px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters .input, .filters .select { width: auto; min-width: 130px; flex: 1 1 130px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; -webkit-overflow-scrolling: touch; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 99px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

.switch { display: flex; align-items: center; gap: 10px; }
.switch input { width: 42px; height: 24px; appearance: none; background: #d8dbe8; border-radius: 99px; position: relative; cursor: pointer; transition: background .18s ease; }
.switch input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 99px; transition: transform .18s ease;
}
.switch input:checked { background: var(--success); }
.switch input:checked::after { transform: translateX(18px); }

/* ---------------------------------------------------------- */
/* Listes et tableaux                                         */
/* ---------------------------------------------------------- */

.list { display: flex; flex-direction: column; }

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.list-item:last-child { border-bottom: 0; }
.list-item__body { min-width: 0; flex: 1; }
.list-item__title { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.list-item__meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.list-item__end { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 45%; }
.list-item__end .small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {

  width: 42px; height: 42px; border-radius: 12px; object-fit: cover; flex: none;
  background: var(--primary-soft); color: var(--primary-dark);
  display: grid; place-items: center; font-weight: 700;
}

.amount { font-weight: 700; font-size: 14px; }

.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; white-space: nowrap; }
table.data th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafbfe;
}
table.data td { padding: 12px; border-bottom: 1px solid #f1f2f8; }
table.data tr:last-child td { border-bottom: 0; }

.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.empty svg { width: 40px; height: 40px; margin: 0 auto 10px; color: #c3c8d8; }
.empty p { margin: 0; font-size: 13.5px; }

/* ---------------------------------------------------------- */
/* Pipeline (kanban)                                          */
/* ---------------------------------------------------------- */

.kanban {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 14px 14px;
  margin: 0 -14px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.kanban__col {
  flex: 0 0 82%;
  max-width: 82%;
  scroll-snap-align: start;
  background: #eff1f8;
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 200px;
}

.kanban__head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 6px; }
.kanban__dot { width: 9px; height: 9px; border-radius: 99px; flex: none; }
.kanban__title { font-weight: 700; font-size: 13.5px; }
.kanban__count { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 700; }
.kanban__value { font-size: 12px; color: var(--muted); padding: 0 4px 4px; }

.kanban__body { display: flex; flex-direction: column; gap: 8px; min-height: 60px; flex: 1; }
.kanban__body.is-over { outline: 2px dashed var(--primary); outline-offset: 2px; border-radius: 12px; }

.pcard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
  box-shadow: var(--shadow);
  cursor: grab;
  touch-action: pan-y;
}
.pcard.is-dragging { opacity: .45; }
.pcard__top { display: flex; gap: 9px; align-items: center; }
.pcard__name { font-weight: 700; font-size: 14px; }
.pcard__company { font-size: 12px; color: var(--muted); }
.pcard__foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pcard__value { font-weight: 700; font-size: 13.5px; color: var(--primary-dark); }
.pcard__move { display: flex; gap: 6px; margin-top: 9px; }
.pcard__move .btn { flex: 1; padding: 6px 8px; font-size: 12px; }

/* ---------------------------------------------------------- */
/* Timeline d'activite                                        */
/* ---------------------------------------------------------- */

.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline__item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.timeline__item:last-child { border-bottom: 0; }
.timeline__icon {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center; background: var(--primary-soft); color: var(--primary);
}
.timeline__icon svg { width: 16px; height: 16px; }
.timeline__text { font-size: 13.5px; }
.timeline__time { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ---------------------------------------------------------- */
/* Echeances                                                  */
/* ---------------------------------------------------------- */

.task { display: flex; gap: 10px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task__check {
  width: 21px; height: 21px; border-radius: 7px; border: 1.6px solid #cbd2e1; flex: none;
  background: #fff; display: grid; place-items: center; cursor: pointer; margin-top: 1px;
}
.task__check svg { width: 13px; height: 13px; color: #fff; opacity: 0; }
.task.is-done .task__check { background: var(--success); border-color: var(--success); }
.task.is-done .task__check svg { opacity: 1; }
.task.is-done .task__title { text-decoration: line-through; color: var(--muted); }
.task__body { min-width: 0; flex: 1; }
.task__title { font-weight: 600; font-size: 14px; }
.task__meta { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.task--late .task__meta .late { color: var(--danger); font-weight: 700; }

/* ---------------------------------------------------------- */
/* Graphiques                                                 */
/* ---------------------------------------------------------- */

.chart-box { position: relative; height: 240px; }
.chart-box--sm { height: 200px; }

.legend { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.legend__row { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.legend__dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend__value { margin-left: auto; font-weight: 700; }
.calendar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.calendar__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.calendar__month { font-weight: 700; text-transform: capitalize; }
.calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar__dow { text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; padding: 4px 0; }
.calendar__day {

  aspect-ratio: 1 / 1;
  border-radius: 11px;
  border: 1px solid transparent;
  background: #fafbfe;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  font-family: inherit;
  padding: 0;
}

.calendar__day--muted { color: #c7cbd9; background: transparent; }
.calendar__day--today { border-color: var(--primary); color: var(--primary-dark); }
.calendar__day--active { background: var(--primary); color: #fff; }
.calendar__day--has { background: var(--primary-soft); }
.calendar__day--has.calendar__day--active { background: var(--primary); color: #fff; }
.calendar__dots { display: flex; gap: 3px; }
.calendar__dot { width: 5px; height: 5px; border-radius: 99px; background: var(--primary); }
.calendar__day--active .calendar__dot { background: #fff; }

/* ---------------------------------------------------------- */
/* Fenetres modales                                           */
/* ---------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 42, .5);
  padding: 0;
}
.modal__panel {
  background: #fff;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow-lg);
  animation: slide-up .22s ease;
}
@keyframes slide-up { from { transform: translateY(14px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.modal__head h2 { font-size: 17px; }
.modal__close { margin-left: auto; background: #f1f2f8; border: 0; width: 34px; height: 34px; border-radius: 11px; cursor: pointer; display: grid; place-items: center; color: var(--muted); }

/* ---------------------------------------------------------- */
/* Notifications                                              */
/* ---------------------------------------------------------- */

.toasts {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom, 0px) + 16px);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(94vw, 460px);
}

.toast {
  background: #0f172a;
  color: #fff;
  border-radius: 13px;
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 9px;
  animation: toast-in .2s ease;
}
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast svg { width: 17px; height: 17px; flex: none; }
.toast--success { background: #065f46; }
.toast--error { background: #991b1b; }
.toast--info { background: #1e293b; }

/* ---------------------------------------------------------- */
/* Connexion                                                  */
/* ---------------------------------------------------------- */

.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 480px at 12% -10%, rgba(79, 70, 229, .32), transparent 60%),
    radial-gradient(900px 420px at 95% 6%, rgba(6, 182, 212, .28), transparent 55%),
    linear-gradient(180deg, #101a34 0%, #17224a 46%, #0d1428 100%);
  color: #fff;
  padding: calc(env(safe-area-inset-top, 0px) + 30px) 18px calc(env(safe-area-inset-bottom, 0px) + 26px);
}

.auth__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth__brand .brand__mark { width: 44px; height: 44px; font-size: 21px; background: #fff; color: var(--primary); }
.auth__brand-name { font-weight: 800; font-size: 19px; }
.auth__brand-sub { font-size: 12.5px; color: rgba(255, 255, 255, .72); }

.auth__hero { margin-bottom: 20px; }
.auth__hero h1 { font-size: 25px; line-height: 1.22; margin-bottom: 8px; }
.auth__hero p { color: rgba(255, 255, 255, .74); font-size: 14px; margin: 0; }

.auth__points { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 24px; }
.auth__point { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: rgba(255, 255, 255, .86); }
.auth__point span.ico {
  width: 26px; height: 26px; border-radius: 9px; background: rgba(255, 255, 255, .13);
  display: grid; place-items: center; flex: none;
}
.auth__point span.ico svg { width: 15px; height: 15px; }

.auth__panel {
  margin-top: auto;
  background: rgba(255, 255, 255, .98);
  color: var(--ink);
  border-radius: 20px;
  padding: 18px 16px;
  box-shadow: var(--shadow-lg);
}
.auth__panel h2 { font-size: 17px; margin-bottom: 4px; }
.auth__panel .sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.auth__foot { text-align: center; font-size: 12.5px; color: rgba(255, 255, 255, .6); margin-top: 16px; }
.auth__aside { display: block; }

/* ---------------------------------------------------------- */
/* Installer l'application                                    */
/* ---------------------------------------------------------- */

.install-card {
  background: linear-gradient(135deg, #eef2ff, #ecfeff);
  border: 1px solid #dfe3fb;
  border-radius: var(--radius);
  padding: 16px;
}
.install-card__logos { display: flex; gap: 12px; align-items: center; margin: 10px 0 12px; }
.install-card__logos svg { width: 26px; height: 26px; color: #334155; }

.install-steps { margin: 0; padding-left: 20px; font-size: 13.5px; color: #334155; }
.install-steps li { margin-bottom: 6px; }
.install-steps svg { width: 15px; height: 15px; display: inline-block; vertical-align: -2px; }

/* ---------------------------------------------------------- */
/* Administration                                             */
/* ---------------------------------------------------------- */

.admin-top { background: #0f172a; border-bottom-color: #1e293b; color: #fff; }
.admin-top .brand__sub { color: #94a3b8; }
.admin-top .btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); color: #fff; }
.admin-top .btn:hover { background: rgba(255, 255, 255, .18); }

.lock {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 20px) 18px calc(env(safe-area-inset-bottom, 0px) + 20px);
  background: linear-gradient(180deg, #101a34, #0d1428);
}
.lock__panel { background: #fff; border-radius: 20px; padding: 22px 18px; max-width: 440px; width: 100%; box-shadow: var(--shadow-lg); }

.stat-mini { display: grid; grid-template-columns: 1fr; gap: 10px; }
.stat-mini__item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat-mini__label { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.stat-mini__value { font-size: 20px; font-weight: 800; margin-top: 2px; }

/* ---------------------------------------------------------- */
/* Utilitaires                                                */
/* ---------------------------------------------------------- */

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.spacer { margin-left: auto; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0 !important; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 26px; color: var(--muted); font-size: 13.5px; }
.spinner {
  width: 18px; height: 18px; border-radius: 99px;
  border: 2px solid #d9dce9; border-top-color: var(--primary);
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Tablette et ordinateur
   ============================================================ */

@media (min-width: 620px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .stat-mini { grid-template-columns: repeat(2, 1fr); }
  .kanban__col { flex-basis: 46%; max-width: 46%; }
}

@media (min-width: 768px) {
  body { font-size: 15.5px; }
  .wrap { padding: 22px 22px 12px; }
  .page-head { flex-direction: row; align-items: center; justify-content: space-between; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-mini { grid-template-columns: repeat(4, 1fr); }
  .kanban { flex-wrap: nowrap; }
  .kanban__col { flex: 0 0 300px; max-width: 300px; }
  .modal { align-items: center; padding: 20px; }
  .modal__panel { border-radius: 20px; max-height: 88vh; }
  .split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
  .split--even { grid-template-columns: 1fr 1fr; }
  .form-grid--3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
}

@media (min-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .auth { flex-direction: row; align-items: center; gap: 40px; padding: 40px; }
  .auth__intro { flex: 1; max-width: 560px; }
  .auth__aside {
    display: block; flex: 0 0 440px; max-width: 440px; margin: 0;
  }
  .auth__foot { text-align: left; }
}

@media (min-width: 1280px) {
  .kanban__col { flex: 1 1 220px; max-width: none; }
}
