/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #eef1f5;
  --white: #ffffff;
  --text: #2d3748;
  --text-muted: #718096;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --radius-lg: 16px;

  /* Tile gradients */
  --grad-punk: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --grad-sante: linear-gradient(135deg, #059669 0%, #34d399 100%);
  --grad-travail: linear-gradient(135deg, #ea580c 0%, #fbbf24 100%);
  --grad-roadmap: linear-gradient(135deg, #0284c7 0%, #7dd3fc 100%);
  --grad-finance: linear-gradient(135deg, #7c3aed 0%, #c084fc 100%);
  --grad-gocookit: linear-gradient(135deg, #dc2626 0%, #fb923c 100%);
}

html { font-size: 16px; }

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

[hidden] {
  display: none !important;
}

/* ── Topbar ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar__brand {
  display: flex;
  align-items: baseline;
  gap: 0;
  font-weight: 700;
  font-size: 1.15rem;
}

.topbar__logo { color: var(--teal); }
.topbar__domain { color: var(--text-muted); font-weight: 500; }

.topbar__nav {
  display: flex;
  gap: 0.25rem;
}

.topbar__link {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}

.topbar__link:hover { background: #f1f5f9; color: var(--text); }
.topbar__link--active { background: #ecfdf5; color: var(--teal-dark); }

.topbar__user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.topbar__email {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad-punk);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid #e2e8f0;
  box-shadow: none;
}

.btn--ghost:hover {
  background: #f8fafc;
  color: var(--text);
}

/* ── Auth gate ── */
.auth-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(13, 148, 136, 0.12), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.1), transparent 35%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}

.auth-card__brand {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.auth-card__title {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.auth-card__subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  background: #f1f5f9;
  padding: 0.3rem;
  border-radius: 10px;
  margin-bottom: 1.25rem;
}

.auth-tab {
  border: none;
  background: transparent;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.auth-tab--active {
  background: var(--white);
  color: var(--teal-dark);
  box-shadow: var(--shadow);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.auth-field input,
.auth-field select,
.auth-field textarea {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.7rem 0.85rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-field textarea {
  resize: vertical;
  min-height: 84px;
}

.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.auth-field--inline {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  font-weight: 500;
}

.auth-field--inline input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.auth-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-password-wrap input {
  flex: 1;
  padding-right: 5.5rem;
}

.auth-password-toggle {
  position: absolute;
  right: 0.45rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.45rem;
}

.auth-password-toggle:hover {
  color: var(--text);
}

.auth-error {
  font-size: 0.82rem;
  color: #b91c1c;
  background: #fef2f2;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
}

.auth-info {
  font-size: 0.82rem;
  color: var(--teal-dark);
  background: #ecfdf5;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
}

.auth-submit {
  width: 100%;
  margin-top: 0.25rem;
}

.auth-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

/* ── Dashboard layout ── */
.dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
}

/* ── Welcome card ── */
.welcome-card {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem 2.5rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.welcome-card--habits {
  display: grid;
  grid-template-columns: 1fr 220px;
  grid-template-rows: auto 1fr;
  gap: 1.5rem 2rem;
  align-items: start;
}

.welcome-card__header {
  grid-column: 1 / -1;
}

.welcome-card__header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.welcome-card__header-top .welcome-card__subtitle {
  margin-bottom: 0;
}

.welcome-card--habits .welcome-card__visual {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Santé journalier (dashboard) */
.dash-health {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
}

.dash-health__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.dash-health__title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #059669;
}

.dash-health__more {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal-dark);
  text-decoration: none;
}

.dash-health__more:hover { text-decoration: underline; }

.dash-health__section + .dash-health__section {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid #eef2f7;
}

.dash-health__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.dash-health__moods {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.dash-health__mood {
  appearance: none;
  border: none;
  background: #fff;
  border-radius: 8px;
  width: 2rem;
  height: 2rem;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 0 1px #e2e8f0;
  transition: transform 0.12s, box-shadow 0.12s;
}

.dash-health__mood:hover { transform: scale(1.06); }

.dash-health__mood--active {
  box-shadow: 0 0 0 2px #059669;
  background: #ecfdf5;
}

.dash-health__sleep {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-health__range {
  flex: 1;
  accent-color: #059669;
}

.dash-health__sleep-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  min-width: 3.2rem;
  text-align: right;
}

.dash-health__meals {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.dash-health__meal {
  appearance: none;
  border: none;
  background: #fff;
  border-radius: 8px;
  padding: 0.35rem 0.45rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 0 0 1px #e2e8f0;
}

.dash-health__meal--done {
  background: #ecfdf5;
  color: #047857;
  box-shadow: 0 0 0 1px #a7f3d0;
  cursor: default;
}

.dash-health__kcal {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
}

.ticket-add {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px dashed #e2e8f0;
}

.ticket-add__input {
  flex: 1;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  font-family: inherit;
  font-size: 0.82rem;
  background: #fff;
}

.ticket-add__input:focus {
  outline: none;
  border-color: #059669;
}

.ticket-add__btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.habits-columns {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.welcome-card__greeting {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.welcome-card__greeting strong { font-weight: 700; }

.welcome-card__subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

/* Habits progress bar */
.habits-progress {
  margin-bottom: 1.25rem;
}

.habits-progress__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
}

.habits-progress__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.habits-progress__count {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--teal-dark);
}

.habits-progress__bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.habits-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal) 0%, #34d399 100%);
  border-radius: 99px;
  transition: width 0.4s ease;
}

/* 4 colonnes d'habitudes */
.habits-col {
  background: #f8fafc;
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.habits-col__title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal-dark);
  margin-bottom: 0.15rem;
}

.habits-col__desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e2e8f0;
}

.habits-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.habits-list li {
  list-style: none;
}

/* Checkbox habit row */
.habit-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  cursor: pointer;
  user-select: none;
  padding: 0.15rem 0;
  border-radius: 6px;
  transition: color 0.15s;
}

.habit-row:hover {
  color: var(--text);
}

.habit-row--done {
  color: var(--text);
}

.habit-row--done .habit-row__label {
  text-decoration: none;
}

.habit-row:has(.habit-row__input:checked) {
  color: var(--text);
}

.habit-row:has(.habit-row__input:checked) .habit-row__label {
  opacity: 0.75;
}

.habit-row__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.habit-row__box {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: white;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.habit-row__box::after {
  content: "✓";
  font-size: 0.6rem;
  font-weight: 700;
  color: white;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.15s, transform 0.15s;
}

.habit-row__input:checked + .habit-row__box {
  background: var(--teal);
  border-color: var(--teal);
}

.habit-row__input:checked + .habit-row__box::after {
  opacity: 1;
  transform: scale(1);
}

.habit-row__input:focus-visible + .habit-row__box {
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.25);
}

/* Tickets : orange quand non coché */
.habit-row--ticket:not(:has(.habit-row__input:checked)) .habit-row__box {
  border-color: #f59e0b;
  background: #fffbeb;
}

.habit-row--ticket:not(:has(.habit-row__input:checked)) .habit-row__box::after {
  content: "!";
  opacity: 1;
  transform: scale(1);
  color: #f59e0b;
  font-size: 0.72rem;
}

.habit-row--ticket .habit-row__label {
  font-weight: 500;
}

.habit-row__label {
  flex: 1;
}

/* Widget calories */
.calories-widget {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  flex-wrap: wrap;
}

.calories-widget__input {
  width: 5.5rem;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--teal-dark);
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  padding: 0.1rem 0.25rem;
}

.calories-widget__input:hover,
.calories-widget__input:focus {
  border-color: #cbd5e1;
  background: #fff;
  outline: none;
}

.calories-widget__input:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
}

.calories-widget__value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--teal-dark);
}

.calories-widget__sep {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.calories-widget__target {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-pill {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border-radius: 10px;
  padding: 0.6rem 1rem;
  min-width: 90px;
}

.stat-pill__value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal-dark);
}

.stat-pill__label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Orbit visual (remplace la carte) */
.orbit-map {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto;
}

.orbit-map__ring {
  position: absolute;
  border: 1.5px dashed #cbd5e1;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.orbit-map__ring--1 { width: 80px; height: 80px; }
.orbit-map__ring--2 { width: 140px; height: 140px; }
.orbit-map__ring--3 { width: 200px; height: 200px; }

.orbit-map__center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  background: var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.4);
}

.orbit-map__dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.orbit-map__dot--done { background: var(--teal); }
.orbit-map__dot--partial { background: #5eead4; }
.orbit-map__dot--pending { background: #cbd5e1; }

.orbit-map__dot--1 { top: 15%; left: 55%; }
.orbit-map__dot--2 { top: 50%; left: 88%; }
.orbit-map__dot--3 { top: 82%; left: 45%; }
.orbit-map__dot--4 { top: 35%; left: 10%; }

/* Week streak under orbit */
.week-streak {
  margin-top: 1rem;
  text-align: center;
}

.week-streak__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.week-streak__nav-label {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 8.5rem;
}

.week-streak__nav-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  flex-shrink: 0;
}

.week-streak__nav-btn:hover:not(:disabled) {
  background: #f8fafc;
  color: #0f172a;
}

.week-streak__nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.week-streak__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.week-streak__range {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
}

.habits-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.45rem;
  background: #fff;
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: var(--shadow);
  border: 1px solid #e2e8f0;
}

.habits-week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.55rem 0.2rem;
  border-radius: 12px;
  background: #fafbfc;
  border: 2px solid transparent;
  cursor: default;
  font-family: inherit;
  text-align: center;
}

.habits-week-day--clickable {
  cursor: pointer;
}

.habits-week-day--clickable:hover {
  background: #f1f5f9;
}

.habits-week-day--today {
  background: #ecfdf5;
  outline: 2px solid #6ee7b7;
  outline-offset: -2px;
}

.habits-week-day--selected {
  background: #ecfdf5;
  border-color: #34d399;
}

.habits-week-day__label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #94a3b8;
}

.habits-week-day__num {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

.habits-week-day__progress {
  width: 100%;
  height: 4px;
  background: #ecfdf5;
  border-radius: 99px;
  overflow: hidden;
}

.habits-week-day__progress span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: #34d399;
}

.habits-week-day--orange .habits-week-day__progress span {
  background: #f97316;
}

.habits-week-day--red .habits-week-day__progress span {
  background: #ef4444;
}

.habits-week-day--inactive .habits-week-day__progress {
  background: #f1f5f9;
}

.habits-week-day--inactive .habits-week-day__progress span {
  background: transparent;
}

.habits-week-day__pct {
  min-height: 0.85rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: #059669;
}

.habits-week-day--orange .habits-week-day__pct {
  color: #ea580c;
}

.habits-week-day--red .habits-week-day__pct {
  color: #dc2626;
}

.habits-day-detail {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
}

.habits-day-detail[hidden] {
  display: none;
}

.habits-day-detail__title {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  text-transform: capitalize;
}

.habits-day-detail__track {
  height: 8px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.55rem;
}

.habits-day-detail__bar {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: #34d399;
  transition: width 0.25s ease;
}

.habits-day-detail__bar--orange {
  background: #f97316;
}

.habits-day-detail__bar--red {
  background: #ef4444;
}

.habits-day-detail__bar--inactive {
  background: #e2e8f0;
}

.habits-day-detail__score {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}

.week-history-grid {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.habits-history-panel {
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
}

.habits-history-panel[hidden] {
  display: none !important;
}

.habits-history-panel .habits-week {
  margin-bottom: 0.75rem;
}

.habits-history-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.65rem;
}

.habits-history-panel__title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.habits-history-panel .week-streak__nav {
  margin-bottom: 0;
}

.week-history-grid[hidden] {
  display: none;
}

.week-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  min-width: 520px;
}

.week-history-table th,
.week-history-table td {
  padding: 0.45rem 0.35rem;
  border-bottom: 1px solid #f1f5f9;
  text-align: center;
  vertical-align: middle;
}

.week-history-table__habit-col,
.week-history-table__habit {
  text-align: left;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  min-width: 7.5rem;
  max-width: 9.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.week-history-table thead th {
  background: #f8fafc;
  font-weight: 600;
  color: #64748b;
}

.week-history-table__day-col {
  min-width: 2.1rem;
}

.week-history-table__day-col--clickable {
  cursor: pointer;
}

.week-history-table__day-col--clickable:hover {
  background: #f1f5f9;
}

.week-history-table__day-col--today {
  box-shadow: inset 0 -2px 0 var(--teal);
}

.week-history-table__day-col--selected {
  background: #ecfeff;
}

.week-history-table__day-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.week-history-table__day-date {
  display: block;
  font-size: 0.82rem;
  color: #0f172a;
}

.week-history-table__group td {
  background: #f8fafc;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  padding-top: 0.55rem;
}

.week-history-table__habit {
  font-size: 0.76rem;
  color: #334155;
  padding-left: 0.55rem;
}

.week-history-table__habit--ticket {
  color: #94a3b8;
}

.week-history-table__cell {
  font-weight: 700;
  color: #cbd5e1;
}

.week-history-table__cell--done {
  color: #059669;
}

.week-history-table__cell--miss {
  color: #fecaca;
}

.week-history-table__cell--ticket-open {
  color: #f97316;
}

.week-history-table__cell--inactive,
.week-history-table__cell--future {
  color: #e2e8f0;
}

.week-history-table__summary td {
  background: #fafbfc;
  font-weight: 700;
  border-bottom: none;
}

.week-history-table__summary td:first-child {
  text-align: left;
  padding-left: 0.55rem;
  color: #64748b;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.week-history-table__cell--score.week-history-table__cell--green {
  color: #059669;
}

.week-history-table__cell--score.week-history-table__cell--orange {
  color: #f97316;
}

.week-history-table__cell--score.week-history-table__cell--red {
  color: #ef4444;
}

.week-streak__days {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}

.week-streak__day {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: #e2e8f0;
  color: var(--text-muted);
  border: 2px solid transparent;
  padding: 0;
  cursor: default;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.week-streak__day--clickable {
  cursor: pointer;
}

.week-streak__day--clickable:hover {
  transform: translateY(-1px);
}

.week-streak__day--inactive {
  background: #e2e8f0;
  color: #94a3b8;
}

.week-streak__day--red {
  background: #ef4444;
  color: #fff;
}

.week-streak__day--orange {
  background: #f97316;
  color: #fff;
}

.week-streak__day--green {
  background: #059669;
  color: #fff;
}

.week-streak__day--today {
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.week-streak__day--selected {
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.2);
  transform: translateY(-1px);
}

.day-history {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: left;
}

.day-history[hidden] {
  display: none !important;
}

.day-history__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.day-history__title {
  font-size: 0.92rem;
  font-weight: 700;
}

.day-history__close {
  border: none;
  background: #f1f5f9;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}

.day-history__score {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.day-history__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 180px;
  overflow-y: auto;
}

.day-history__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text);
}

.day-history__item mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #94a3b8;
  flex-shrink: 0;
}

.day-history__item--done mark {
  background: #059669;
  color: #fff;
}

.day-history__item--ticket mark {
  background: #f97316;
  color: #fff;
}

.day-history__calories {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--teal);
  color: white;
  box-shadow: 0 3px 10px rgba(13, 148, 136, 0.3);
}

.btn--primary:hover { background: var(--teal-dark); }

.btn--white {
  background: white;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.btn--sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
}

/* ── Tiles grid ── */
.tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.tile {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  color: white;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s;
}

.tile:hover { transform: translateY(-3px); }

.tile--punk { background: var(--grad-punk); }
.tile--sante { background: var(--grad-sante); }
.tile--travail { background: var(--grad-travail); }
.tile--roadmap { background: var(--grad-roadmap); }
.tile--finance { background: var(--grad-finance); }
.tile--gocookit { background: var(--grad-gocookit); }

.tile__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.tile__desc {
  font-size: 0.82rem;
  opacity: 0.85;
  margin-bottom: 1.25rem;
}

.tile__items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: auto;
}

.tile__items--single { gap: 0.5rem; }

.tile__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
}

.tile__item--wide { grid-template-columns: auto 1fr auto; }

.tile__count {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  min-width: 2rem;
}

.tile__item-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.tile__info {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 0.75rem;
  font-style: italic;
}

/* ── Profile / Activity card ── */
.profile-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem 2.5rem;
}

.profile-card__title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.profile-card__subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.profile-card__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.profile-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.6rem;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  transition: border-color 0.15s, box-shadow 0.15s;
  align-items: center;
}

.profile-item:hover {
  border-color: var(--teal);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.12);
}

.profile-item__icon {
  grid-row: 1 / 3;
  font-size: 1.4rem;
}

.profile-item__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.profile-item__status {
  font-size: 0.75rem;
  font-weight: 700;
}

.profile-item__status--ok { color: #059669; }
.profile-item__status--warn { color: #dc2626; }

.profile-item__meta {
  grid-column: 2;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.profile-item--done {
  border-color: #d1fae5;
  background: #f0fdf4;
}

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .welcome-card--habits {
    grid-template-columns: 1fr;
  }

  .welcome-card--habits .welcome-card__visual {
    grid-column: 1;
    grid-row: 3;
    justify-self: center;
  }

  .habits-columns {
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .welcome-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .habits-progress { max-width: 100%; }

  .tiles-grid { grid-template-columns: 1fr; }
  .profile-card__grid { grid-template-columns: repeat(2, 1fr); }

  .topbar {
    flex-wrap: wrap;
    gap: 0.5rem;
    height: auto;
    min-height: 64px;
    padding: 0.65rem 1rem;
  }

  .topbar__nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .topbar__nav::-webkit-scrollbar { display: none; }

  .topbar__link { white-space: nowrap; flex-shrink: 0; }
}

@media (max-width: 540px) {
  .profile-card__grid { grid-template-columns: 1fr; }
  .dashboard { padding: 1.25rem 1rem 2rem; }
  .welcome-card, .profile-card { padding: 1.5rem; }
  .habits-columns { grid-template-columns: 1fr; }
  .habits-week { grid-template-columns: repeat(4, 1fr); }
  .topbar__email { display: none; }
  .topbar { padding: 0 1rem; }
  .welcome-card__header-top { flex-direction: column; align-items: stretch; }
}

/* ── Habit editor modal ── */
body.modal-open {
  overflow: hidden;
}

.habits-editor {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.habits-editor[hidden] {
  display: none !important;
}

.habits-editor__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.habits-editor__panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(90vh, 860px);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.habits-editor__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.habits-editor__title {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.habits-editor__subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.habits-editor__close {
  border: none;
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}

.habits-editor__close:hover {
  background: #e2e8f0;
  color: var(--text);
}

.habits-editor__body {
  padding: 1rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.habits-editor__list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.habits-editor__section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal-dark);
  margin-bottom: 0.65rem;
}

.habits-editor__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.habits-editor__input,
.habits-editor__select {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.habits-editor__input:focus,
.habits-editor__select:focus {
  outline: 2px solid rgba(13, 148, 136, 0.25);
  border-color: var(--teal);
}

.habits-editor__ticket {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.habits-editor__delete {
  border: none;
  background: #fee2e2;
  color: #b91c1c;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.habits-editor__delete:hover {
  background: #fecaca;
}

.habits-editor__add-col {
  margin-top: 0.35rem;
}

.habits-editor__add {
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.habits-editor__add-title {
  font-size: 0.9rem;
  margin-bottom: 0.65rem;
}

.habits-editor__add-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.habits-editor__error {
  margin-top: 0.75rem;
  color: #b91c1c;
  font-size: 0.85rem;
}

.habits-editor__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

@media (max-width: 640px) {
  .habits-editor__row,
  .habits-editor__add-row {
    grid-template-columns: 1fr;
  }
}

/* ── Roadmap page ── */
.dashboard--roadmap {
  max-width: 980px;
}

.roadmap-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--grad-roadmap);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.roadmap-hero__eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.35rem;
}

.page-title--roadmap {
  color: #fff;
  margin-bottom: 0.35rem;
}

.roadmap-hero__lead {
  opacity: 0.92;
  max-width: 42ch;
}

.roadmap-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.roadmap-stat {
  background: var(--white);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
}

.roadmap-stat span {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.roadmap-stat small {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.roadmap-stat--wide span {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roadmap-toolbar {
  margin-bottom: 1rem;
}

.roadmap-filters {
  display: inline-flex;
  gap: 0.35rem;
  background: #e2e8f0;
  padding: 0.3rem;
  border-radius: 10px;
}

.roadmap-filter {
  border: none;
  background: transparent;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.roadmap-filter--active {
  background: var(--white);
  color: #0369a1;
  box-shadow: var(--shadow);
}

.roadmap-board {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.roadmap-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.roadmap-card {
  border: 1px solid #e2e8f0;
  border-left-width: 4px;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  background: #fff;
}

.roadmap-card--planned { border-left-color: #94a3b8; }
.roadmap-card--active { border-left-color: #0284c7; }
.roadmap-card--done { border-left-color: #059669; opacity: 0.92; }

.roadmap-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.roadmap-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.roadmap-pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-muted);
}

.roadmap-pill--q1 { background: #dbeafe; color: #1d4ed8; }
.roadmap-pill--q2 { background: #e0f2fe; color: #0369a1; }
.roadmap-pill--q3 { background: #fef3c7; color: #b45309; }
.roadmap-pill--q4 { background: #ede9fe; color: #6d28d9; }
.roadmap-pill--planned { background: #f1f5f9; color: #64748b; }
.roadmap-pill--active { background: #dbeafe; color: #1d4ed8; }
.roadmap-pill--done { background: #d1fae5; color: #047857; }

.roadmap-card__date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.roadmap-card__actions {
  display: flex;
  gap: 0.25rem;
}

.roadmap-icon-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
}

.roadmap-icon-btn:hover { background: #e2e8f0; color: var(--text); }
.roadmap-icon-btn--danger:hover { background: #fee2e2; color: #b91c1c; }

.roadmap-card__title {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.roadmap-card__desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.roadmap-card__progress-wrap {
  margin-top: 0.25rem;
}

.roadmap-progress-block {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.roadmap-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.roadmap-progress-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.roadmap-progress-value {
  font-size: 0.9rem;
  color: #0369a1;
}

.roadmap-progress-value span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.roadmap-gauge {
  width: 100%;
}

.roadmap-gauge__bar {
  height: 10px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.roadmap-gauge__bar div {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #7dd3fc);
  border-radius: 99px;
  transition: width 0.2s ease;
}

.roadmap-gauge__bar--done div {
  background: linear-gradient(90deg, #059669, #34d399);
}

.roadmap-validated {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #047857;
}

.roadmap-reached {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0369a1;
}

.roadmap-validate-btn {
  margin-top: 0.35rem;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  background: #059669;
  color: #fff;
}

.roadmap-validate-btn:hover {
  background: #047857;
}

.roadmap-progress-block--done .roadmap-progress-value span {
  color: #047857;
}

.roadmap-progress-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.roadmap-progress-total span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.roadmap-progress-total-input {
  width: 96px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.55rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  text-align: right;
}

.roadmap-progress-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.roadmap-progress-btn {
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.roadmap-progress-btn:hover {
  background: #e0f2fe;
}

.roadmap-progress-btn--custom {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
}

.roadmap-progress-btn--custom:hover {
  background: #0369a1;
}

.roadmap-progress-custom {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  margin-left: auto;
}

.roadmap-progress-custom-input {
  width: 72px;
  font-family: inherit;
  font-size: 0.82rem;
  padding: 0.35rem 0.5rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
}

.roadmap-card__progress {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.roadmap-card__progress-bar {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.roadmap-card__progress-bar div {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #7dd3fc);
  border-radius: 99px;
}

.roadmap-card__progress span {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0369a1;
  min-width: 2.5rem;
  text-align: right;
}

.roadmap-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
}

.roadmap-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.roadmap-modal[hidden] { display: none !important; }

.roadmap-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.roadmap-modal__panel {
  position: relative;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.roadmap-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}

.roadmap-modal__close {
  border: none;
  background: #f1f5f9;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
}

.roadmap-form {
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.roadmap-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.roadmap-form input[type="range"] {
  width: 100%;
  accent-color: #0284c7;
}

@media (max-width: 768px) {
  .roadmap-progress-custom {
    margin-left: 0;
    width: 100%;
  }

  .roadmap-progress-custom-input {
    flex: 1;
  }
}

.roadmap-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding-top: 0.25rem;
}

@media (max-width: 768px) {
  .roadmap-hero {
    flex-direction: column;
  }

  .roadmap-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .roadmap-form__row {
    grid-template-columns: 1fr;
  }
}

/* ── Travail page (Notion-like) ── */
.app--travail {
  min-height: 100vh;
}

.travail-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.travail-sidebar {
  background: #fff;
  border-right: 1px solid #e2e8f0;
  padding: 1.25rem 1rem;
}

.travail-sidebar__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.travail-sidebar__eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c2410c;
  margin-bottom: 0.25rem;
}

.travail-sidebar__title {
  font-size: 1.2rem;
}

.travail-pages {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.travail-page-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.travail-page-link:hover,
.travail-page-link--active {
  background: #fff7ed;
}

.travail-page-link--active {
  color: #c2410c;
  font-weight: 600;
}

.travail-page-link__icon {
  font-size: 1rem;
}

.travail-editor {
  background: #fafafa;
  padding: 2rem clamp(1rem, 4vw, 3rem);
}

.travail-editor__empty {
  max-width: 520px;
  margin: 4rem auto;
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.travail-editor__content {
  max-width: 820px;
  margin: 0 auto;
}

.travail-editor__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.travail-page-icon {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 1.35rem;
  cursor: pointer;
}

.travail-page-title {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  outline: none;
}

.travail-blocks {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}

.travail-block {
  position: relative;
  padding: 0.15rem 0.15rem 0.15rem 1.75rem;
}

.travail-block__remove {
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: transparent;
  cursor: pointer;
  font-size: 1rem;
}

.travail-block:hover .travail-block__remove {
  color: #94a3b8;
  background: #f1f5f9;
}

.travail-block__remove:hover {
  color: #b91c1c !important;
  background: #fee2e2 !important;
}

.travail-block__heading {
  font-size: 1.25rem;
  font-weight: 700;
  outline: none;
  min-height: 1.5rem;
}

.travail-block__paragraph,
.travail-block__bullet-text,
.travail-block__todo-text {
  outline: none;
  min-height: 1.4rem;
  line-height: 1.55;
}

.travail-block__heading:empty::before,
.travail-block__paragraph:empty::before,
.travail-block__bullet-text:empty::before,
.travail-block__todo-text:empty::before {
  content: attr(data-placeholder);
  color: #cbd5e1;
}

.travail-block__todo {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.travail-block__todo input {
  margin-top: 0.25rem;
  accent-color: #ea580c;
}

.travail-block__todo-text--done {
  text-decoration: line-through;
  color: var(--text-muted);
}

.travail-block__bullet {
  display: flex;
  gap: 0.45rem;
}

.travail-block__bullet-dot {
  color: #ea580c;
  font-weight: 700;
}

.travail-block--divider hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 0.75rem 0;
}

.travail-add-bar {
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
}

.travail-add-bar__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

.travail-add-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.travail-add-btn {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #c2410c;
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.travail-sidebar__actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: stretch;
}

.travail-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.travail-breadcrumb__sep {
  color: #94a3b8;
  font-size: 0.85rem;
}

.travail-breadcrumb__item {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.15rem 0.25rem;
  border-radius: 6px;
}

.travail-breadcrumb__item:hover,
.travail-breadcrumb__item--active {
  color: #c2410c;
  background: #fff7ed;
}

.travail-add-bar__groups {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.travail-add-bar__group > span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9a3412;
  margin-bottom: 0.35rem;
}

.travail-card__title,
.travail-credential-card .travail-card__title,
.travail-account-card .travail-card__title,
.travail-collab-card .travail-card__title,
.travail-link-card .travail-card__title {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.45rem;
  outline: none;
}

.travail-card__field {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font-family: inherit;
  font-size: 0.88rem;
  margin-bottom: 0.45rem;
}

.travail-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.travail-table,
.travail-link-card,
.travail-account-card,
.travail-collab-card,
.travail-credential-card {
  background: #fff;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  box-shadow: var(--shadow);
}

.travail-table__grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.travail-table__grid th,
.travail-table__grid td {
  border: 1px solid #e2e8f0;
  padding: 0;
}

.travail-table__grid input {
  width: 100%;
  border: none;
  padding: 0.5rem 0.55rem;
  font-family: inherit;
  font-size: 0.88rem;
  background: transparent;
}

.travail-table__grid th input {
  font-weight: 700;
  background: #fff7ed;
}

.travail-link-card {
  border-left: 4px solid #2563eb;
}

.travail-account-card {
  border-left: 4px solid #059669;
}

.travail-collab-card {
  border-left: 4px solid #7c3aed;
}

.travail-credential-card {
  border-left: 4px solid #dc2626;
}

.travail-add-btn:hover {
  background: #ffedd5;
}

@media (max-width: 900px) {
  .travail-shell {
    grid-template-columns: 1fr;
  }

  .travail-sidebar {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }

  .travail-pages {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ── Shared workspace (Travail + Punk) ── */
.app--travail {
  --ws-accent: #c2410c;
  --ws-accent-bg: #fffbf7;
  --ws-accent-border: #f1f5f9;
  --ws-accent-dark: #9a3412;
}

.app--punk {
  --ws-accent: #0369a1;
  --ws-accent-bg: #e0f2fe;
  --ws-accent-border: #bae6fd;
  --ws-accent-dark: #0c4a6e;
}

.app--finance {
  --ws-accent: #7c3aed;
  --ws-accent-bg: #f5f3ff;
  --ws-accent-border: #ddd6fe;
  --ws-accent-dark: #5b21b6;
}

.app--gocookit {
  --ws-accent: #dc2626;
  --ws-accent-bg: #fff7ed;
  --ws-accent-border: #fed7aa;
  --ws-accent-dark: #b91c1c;
}

.app--sante {
  --ws-accent: #059669;
  --ws-accent-bg: #ecfdf5;
  --ws-accent-border: #a7f3d0;
  --ws-accent-dark: #065f46;
}

.ws-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.ws-sidebar {
  background: #fff;
  border-right: 1px solid #e2e8f0;
  padding: 1.25rem 1rem;
}

.ws-sidebar__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ws-sidebar__eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ws-accent);
  margin-bottom: 0.25rem;
}

.ws-sidebar__title { font-size: 1.2rem; }

.ws-sidebar__actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ws-pages { display: flex; flex-direction: column; gap: 0.25rem; }

.ws-page-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
}

.ws-page-link:hover,
.ws-page-link--active {
  background: var(--ws-accent-bg);
  color: var(--ws-accent);
  font-weight: 600;
}

.ws-editor {
  background: #fafafa;
  padding: 2rem clamp(1rem, 4vw, 3rem);
}

.ws-editor__empty {
  max-width: 520px;
  margin: 4rem auto;
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.ws-editor__content { max-width: 820px; margin: 0 auto; }

.ws-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.ws-breadcrumb__sep { color: #94a3b8; }
.ws-breadcrumb__item {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  padding: 0.15rem 0.25rem;
}

.ws-breadcrumb__item:hover,
.ws-breadcrumb__item--active {
  color: var(--ws-accent);
  background: var(--ws-accent-bg);
}

.ws-editor__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.ws-editor__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: auto;
  position: relative;
  z-index: 2;
}

.ws-page-title {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  outline: none;
}

.ws-blocks { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1.5rem; min-height: 2rem; }

/* ── Lignes + menu insertion (épuré) ── */
.ws-block-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.35rem;
  align-items: start;
  position: relative;
}

.ws-block-row__add {
  appearance: none;
  -webkit-appearance: none;
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}

.ws-block-row:hover .ws-block-row__add,
.ws-block-row--menu-open .ws-block-row__add {
  opacity: 1;
  background: #f1f5f9;
  color: var(--ws-accent);
}

.ws-block-row__add:hover {
  background: var(--ws-accent-bg);
  color: var(--ws-accent);
}

.ws-block-row__slot { min-width: 0; }

.ws-block-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 0.15rem);
  z-index: 40;
  min-width: 11.5rem;
  max-width: 15rem;
  padding: 0.35rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.ws-block-menu__head {
  margin: 0;
  padding: 0.2rem 0.5rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
}

.ws-block-menu__group + .ws-block-menu__group {
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  border-top: 1px solid #f1f5f9;
}

.ws-block-menu__label {
  margin: 0 0 0.2rem;
  padding: 0 0.5rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ws-block-menu__item {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  border: none;
  background: transparent;
  text-align: left;
  padding: 0.42rem 0.55rem;
  border-radius: 6px;
  font: inherit;
  font-size: 0.86rem;
  color: #334155;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.ws-block-menu__item:hover,
.ws-block-menu__item:focus-visible {
  background: var(--ws-accent-bg);
  color: var(--ws-accent);
  outline: none;
}

/* ── Bloc texte unifié (sans bordure) ── */
.ws-textflow {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.ws-textflow__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  margin-bottom: 0.25rem;
  opacity: 0;
  transition: opacity 0.15s;
}

.ws-block--textflow:hover .ws-textflow__toolbar,
.ws-block--textflow:focus-within .ws-textflow__toolbar {
  opacity: 1;
}

.ws-textflow__tool {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.12s;
}

.ws-textflow__tool:hover {
  color: var(--ws-accent);
}

.ws-textflow__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ws-textflow__heading {
  font-size: 1.25rem;
  font-weight: 700;
  outline: none;
  min-height: 1.5rem;
  border: none;
  background: transparent;
  white-space: pre-wrap;
}

.ws-textflow__paragraph {
  outline: none;
  min-height: 1.4rem;
  line-height: 1.55;
  border: none;
  background: transparent;
  white-space: pre-wrap;
}

.ws-textflow__todo {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.ws-textflow__todo input[type="checkbox"] {
  margin-top: 0.25rem;
  flex-shrink: 0;
  cursor: pointer;
}

.ws-textflow__todo-text {
  flex: 1;
  outline: none;
  min-height: 1.4rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.ws-textflow__todo-text--done {
  text-decoration: line-through;
  color: #94a3b8;
}

.ws-textflow__bullet {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.ws-textflow__bullet-dot {
  color: #64748b;
  line-height: 1.55;
  user-select: none;
}

.ws-textflow__bullet-text {
  flex: 1;
  outline: none;
  min-height: 1.4rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.ws-textflow__divider-wrap {
  position: relative;
  padding: 0.15rem 0;
  user-select: none;
  outline: none;
}

.ws-textflow__divider-wrap:focus {
  outline: 2px solid rgba(13, 148, 136, 0.2);
  border-radius: 6px;
}

.ws-textflow__divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 0.35rem 0;
}

.ws-textflow__heading:empty::before,
.ws-textflow__paragraph:empty::before,
.ws-textflow__todo-text:empty::before,
.ws-textflow__bullet-text:empty::before {
  content: none;
}

.ws-textflow__heading:empty:focus::before,
.ws-textflow__paragraph:empty:focus::before,
.ws-textflow__todo-text:empty:focus::before,
.ws-textflow__bullet-text:empty:focus::before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
}

.ws-block {
  display: flex;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.15rem 0;
  position: relative;
}

.ws-block__toolbar {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  margin-top: 0.1rem;
}

.ws-block__move,
.ws-block__remove {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: transparent;
  cursor: pointer;
  font-size: 0.7rem;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}

.ws-block:hover .ws-block__toolbar button:not(:disabled) {
  color: #94a3b8;
  background: #f1f5f9;
}

.ws-block__toolbar button:disabled {
  display: none;
}

.ws-block__remove {
  font-size: 0.9rem;
  margin-left: 1px;
}

.ws-block > :not(.ws-block__toolbar) {
  flex: 1;
  min-width: 0;
}

.ws-block__heading { font-size: 1.25rem; font-weight: 700; outline: none; min-height: 1.5rem; }
.ws-block__paragraph,
.ws-block__bullet-text,
.ws-block__todo-text { outline: none; min-height: 1.4rem; line-height: 1.55; }

.ws-block__heading:empty::before,
.ws-block__paragraph:empty::before,
.ws-block__bullet-text:empty::before,
.ws-block__todo-text:empty::before {
  content: attr(data-placeholder);
  color: #cbd5e1;
}

.ws-block__todo { display: flex; gap: 0.55rem; align-items: flex-start; }
.ws-block__todo input { margin-top: 0.25rem; accent-color: var(--ws-accent); }
.ws-block__todo-text--done { text-decoration: line-through; color: var(--text-muted); }
.ws-block__bullet { display: flex; gap: 0.45rem; }
.ws-block__bullet-dot { color: var(--ws-accent); font-weight: 700; }
.ws-block--divider hr { border: none; border-top: 1px solid #e2e8f0; margin: 0.75rem 0; }

.ws-add-bar {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.ws-add-bar__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

.ws-add-bar__groups { display: flex; flex-direction: column; gap: 0.85rem; }
.ws-add-bar__group > span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ws-accent-dark);
  margin-bottom: 0.35rem;
}

.ws-add-bar__actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.ws-add-btn {
  border: 1px solid #eef2f6;
  background: var(--ws-accent-bg);
  color: var(--ws-accent);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.ws-add-btn:hover { filter: brightness(0.97); }

.ws-card {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  box-shadow: none;
}

.ws-card__title {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  outline: none;
}

.ws-card__field,
.ws-card__textarea {
  width: 100%;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font-family: inherit;
  font-size: 0.88rem;
  margin-bottom: 0.45rem;
  background: #fafbfc;
  transition: border-color 0.15s, background 0.15s;
}

.ws-card__field:focus,
.ws-card__textarea:focus {
  outline: none;
  border-color: #e2e8f0;
  background: #fff;
}

.ws-card__textarea { min-height: 88px; resize: vertical; }
.ws-card__actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }

.ws-table {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.ws-table__grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  table-layout: fixed;
}

.ws-table__grid th,
.ws-table__grid td {
  border: none;
  padding: 0.55rem 0.65rem;
  vertical-align: top;
  min-height: 2.75rem;
  background: transparent;
}

.ws-table__grid tbody tr:hover td {
  background: rgba(248, 250, 252, 0.85);
}

.ws-table__grid th input,
.ws-table__grid th textarea,
.ws-table__grid td textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.45;
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  outline: none;
}

.ws-table__cell--head {
  font-weight: 700;
  color: #334155;
}

.ws-table__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.ws-table__head-cell {
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
}

.ws-table__head-cell .ws-table__cell {
  flex: 1;
}

.ws-table__del {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 6px;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.ws-table__del:hover {
  background: #fee2e2;
  color: #dc2626;
}

.ws-table__del-col {
  width: 28px;
  padding: 0.35rem !important;
  vertical-align: middle;
  text-align: center;
}

.ws-table__corner {
  width: 28px;
  padding: 0.35rem !important;
}

.ws-table[data-density="compact"] .ws-table__grid th,
.ws-table[data-density="compact"] .ws-table__grid td {
  padding: 0.35rem 0.45rem;
  min-height: 2.1rem;
}

.ws-table[data-density="compact"] .ws-table__grid {
  font-size: 0.78rem;
}

.ws-table__density {
  margin-left: auto;
  font-family: inherit;
  font-size: 0.78rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.25rem 0.4rem;
}

.ws-link-card { border-left: 2px solid rgba(37, 99, 235, 0.2); }
.ws-client-card { border-left: 2px solid rgba(5, 150, 105, 0.2); }
.ws-bank-card { border-left: 2px solid rgba(202, 138, 4, 0.35); }

.ws-bank-card__balance-row {
  display: grid;
  grid-template-columns: 1fr 5rem;
  gap: 0.45rem;
}

.ws-bank-card__currency { text-align: center; }

.ws-card__action {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0284c7;
  cursor: pointer;
  padding: 0;
}

.ws-card__action:hover { text-decoration: underline; }

.ws-account-card { border-left: 2px solid rgba(5, 150, 105, 0.2); }
.ws-collab-card { border-left: 2px solid rgba(124, 58, 237, 0.2); }
.ws-credential-card { border-left: 2px solid rgba(220, 38, 38, 0.18); }
.ws-note-card { border-left: 2px solid rgba(3, 105, 161, 0.2); }
.ws-tag-card { border-left: 2px solid rgba(139, 92, 246, 0.2); }
.ws-calc-card { border-left: 2px solid rgba(8, 145, 178, 0.2); }

.ws-calc-card__expr { font-family: ui-monospace, monospace; }
.ws-calc-card__result {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ws-accent);
  margin: 0.35rem 0 0.55rem;
  padding: 0.5rem 0.65rem;
  background: #fafbfc;
  border-radius: 8px;
}

.ws-subpage-add {
  position: relative;
}

.ws-subpage-add__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 10.5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  padding: 0.35rem;
  z-index: 30;
}

.ws-subpage-add__menu[hidden] {
  display: none;
}

.ws-subpage-add__item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  font: inherit;
  font-size: 0.875rem;
  color: #334155;
  cursor: pointer;
}

.ws-subpage-add__item:hover,
.ws-subpage-add__item:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.ws-subpages {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.ws-subpages:not([hidden]) + .ws-blocks {
  margin-top: 0;
}

.ws-subpages__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.ws-subpages__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ws-subpages__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ws-subpages__empty {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 0;
}

.ws-subpage-card {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid #f1f5f9;
  background: #fafbfc;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.ws-subpage-card:hover {
  background: #fff;
  border-color: #e2e8f0;
}

.ws-subpage-card__icon { font-size: 1rem; line-height: 1; }
.ws-subpage-card__title { font-weight: 600; }

@media (max-width: 900px) {
  .ws-shell { grid-template-columns: 1fr; }
}

/* ── Santé — journal bien-être ── */
.dashboard--sante {
  max-width: 960px;
}

.sante-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--grad-sante);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.sante-hero__eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.35rem;
}

.page-title--sante {
  color: #fff;
  margin-bottom: 0.35rem;
}

.sante-hero__lead {
  opacity: 0.92;
  font-size: 0.95rem;
}

.sante-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.sante-stat {
  background: var(--white);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
}

.sante-stat span {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: #059669;
}

.sante-stat small {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sante-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  width: fit-content;
}

.sante-tab {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sante-tab:hover { background: #f0fdf4; color: #047857; }
.sante-tab--active { background: #ecfdf5; color: #059669; }

.sante-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.sante-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
}

.sante-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.sante-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.sante-card__hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.sante-card--mood { grid-column: span 2; }

.sante-mood-picker {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.sante-mood-btn {
  flex: 1;
  min-width: 4.5rem;
  border: 2px solid #f1f5f9;
  background: #fafbfc;
  border-radius: 14px;
  padding: 0.65rem 0.4rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.sante-mood-btn:hover { border-color: #a7f3d0; background: #f0fdf4; }
.sante-mood-btn--active {
  border-color: #34d399;
  background: #ecfdf5;
  transform: scale(1.03);
}

.sante-mood-btn__emoji {
  display: block;
  font-size: 1.75rem;
  line-height: 1.2;
}

.sante-mood-btn__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.sante-sleep-ring {
  --sleep-pct: 75%;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  background: conic-gradient(#34d399 var(--sleep-pct), #ecfdf5 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  position: relative;
}

.sante-sleep-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  background: var(--white);
  border-radius: 50%;
}

.sante-sleep-ring__value,
.sante-sleep-ring__label {
  position: relative;
  z-index: 1;
}

.sante-sleep-ring__value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #059669;
  line-height: 1;
}

.sante-sleep-ring__label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sante-field {
  display: block;
  margin-bottom: 0.65rem;
}

.sante-field > span {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.sante-input,
.sante-range {
  width: 100%;
  font-family: inherit;
  font-size: 0.88rem;
}

.sante-input {
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  background: #fafbfc;
}

.sante-input--area {
  resize: vertical;
  min-height: 3rem;
}

.sante-range { accent-color: #059669; }

.sante-today-list { margin-bottom: 0.5rem; }

.sante-sport-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f8fafc;
}

.sante-sport-row:last-child { border-bottom: none; }

.sante-sport-row__icon { font-size: 1.25rem; }
.sante-sport-row__body { flex: 1; min-width: 0; }
.sante-sport-row__body strong { display: block; font-size: 0.9rem; }
.sante-sport-row__body small { color: var(--text-muted); font-size: 0.78rem; }

.sante-habits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sante-habit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sante-habit__label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
}

.sante-habit__text { font-size: 0.9rem; }
.sante-habit__text--done { text-decoration: line-through; color: var(--text-muted); }

.sante-link-btn {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #059669;
  cursor: pointer;
  padding: 0;
}

.sante-link-btn:hover { text-decoration: underline; }

.sante-icon-btn {
  border: none;
  background: #f8fafc;
  color: var(--text-muted);
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.sante-icon-btn:hover { background: #fee2e2; color: #dc2626; }

.sante-empty-inline,
.sante-empty {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.sante-empty { text-align: center; padding: 2rem 1rem; }

.sante-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.sante-week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 0.25rem;
  border-radius: 12px;
  background: #fafbfc;
}

.sante-week-day--today {
  background: #ecfdf5;
  outline: 2px solid #6ee7b7;
}

.sante-week-day__label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sante-week-day__num {
  font-size: 1.1rem;
  font-weight: 700;
}

.sante-week-day__mood { font-size: 1.25rem; line-height: 1; }

.sante-week-day__sleep {
  width: 100%;
  height: 4px;
  background: #ecfdf5;
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.sante-week-day__sleep::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--h, 0%);
  background: #34d399;
  border-radius: 99px;
}

.sante-week-day__sport {
  font-size: 0.68rem;
  font-weight: 700;
  color: #059669;
  min-height: 0.85rem;
}

.sante-journal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.sante-journal-toolbar__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.sante-journal-toolbar__actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.sante-chip-btn {
  border: 1px solid #d1fae5;
  background: #ecfdf5;
  color: #047857;
  border-radius: 99px;
  padding: 0.35rem 0.75rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.sante-chip-btn:hover { background: #d1fae5; }

.sante-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sante-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
}

.sante-timeline-item__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 0.35rem;
  flex-shrink: 0;
}

.sante-timeline-item--sport .sante-timeline-item__dot { background: #059669; }
.sante-timeline-item--sleep .sante-timeline-item__dot { background: #6366f1; }
.sante-timeline-item--mood .sante-timeline-item__dot { background: #f59e0b; }
.sante-timeline-item--metric .sante-timeline-item__dot { background: #0284c7; }

.sante-timeline-item__body { flex: 1; min-width: 0; }

.sante-timeline-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.sante-timeline-item__type {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.sante-timeline-item__head time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sante-timeline-item__body strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.sante-timeline-item__body p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

.sante-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.sante-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.sante-modal__panel {
  position: relative;
  width: min(100%, 420px);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem;
}

.sante-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.sante-modal__header h2 {
  font-size: 1.1rem;
}

.sante-modal__close {
  border: none;
  background: #f1f5f9;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}

.sante-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.sante-card--meals { grid-column: span 1; }

.sante-meals-total {
  font-size: 0.82rem;
  font-weight: 700;
  color: #059669;
}

.sante-meals {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.sante-meal {
  display: grid;
  grid-template-columns: auto 1fr 4.5rem;
  gap: 0.55rem;
  align-items: center;
}

.sante-meal__emoji { font-size: 1.2rem; line-height: 1; }

.sante-meal__fields { min-width: 0; }

.sante-meal__slot {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.sante-meal__food,
.sante-meal__kcal {
  width: 100%;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font-family: inherit;
  font-size: 0.85rem;
  background: #fafbfc;
}

.sante-meal__kcal { text-align: center; }

.sante-program-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sante-program-head__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.sante-program-head__hint {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.sante-program {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sante-program-row {
  display: grid;
  grid-template-columns: 7rem 1fr 4.5rem 6.5rem auto auto;
  gap: 0.5rem;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
}

.sante-program-row--today {
  outline: 2px solid #6ee7b7;
  background: #f0fdf4;
}

.sante-program-row--done {
  opacity: 0.75;
}

.sante-program-row__day {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sante-program-row__weekday {
  font-size: 0.88rem;
  font-weight: 700;
}

.sante-program-row__badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #059669;
}

.sante-program-row__activity,
.sante-program-row__duration {
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font-family: inherit;
  font-size: 0.85rem;
  background: #fafbfc;
}

.sante-program-row__duration { text-align: center; }

.sante-week-day__kcal {
  font-size: 0.62rem;
  font-weight: 600;
  color: #059669;
  min-height: 0.85rem;
}

.sante-timeline-item--meal .sante-timeline-item__dot { background: #f59e0b; }

@media (max-width: 768px) {
  .sante-program-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "day day"
      "activity activity"
      "duration intensity"
      "done delete";
  }
  .sante-program-row__day { grid-area: day; }
  .sante-program-row__activity { grid-area: activity; }
  .sante-program-row__duration { grid-area: duration; }
  .sante-program-row__intensity { grid-area: intensity; }
  .sante-program-row__done { grid-area: done; }
@media (max-width: 768px) {
  .sante-stats { grid-template-columns: repeat(2, 1fr); }
  .sante-grid { grid-template-columns: 1fr; }
  .sante-card--mood { grid-column: span 1; }
  .sante-hero { flex-direction: column; }
  .sante-week { grid-template-columns: repeat(4, 1fr); }
  .sante-mood-btn { min-width: calc(33% - 0.35rem); }
  .sante-meal { grid-template-columns: auto 1fr; }
  .sante-meal__kcal { grid-column: 2; }
}

/* ── V2 Mobile + Workspace ── */
.btn--accent {
  background: var(--ws-accent, #0369a1);
  color: #fff;
  border: 1px solid transparent;
  font-weight: 600;
}

.btn--accent:hover {
  filter: brightness(0.95);
}

.btn--danger {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  font-weight: 600;
}

.btn--danger:hover {
  background: #fee2e2;
}

@media (max-width: 900px) {
  .ws-mobile-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
  }

  .ws-mobile-bar__btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    padding: 0.55rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
  }

  .ws-mobile-bar__btn--active {
    background: var(--ws-accent-bg);
    color: var(--ws-accent);
    border-color: var(--ws-accent-border);
  }

  .ws-sidebar {
    display: none;
    max-height: 45vh;
    overflow: auto;
  }

  .ws-sidebar.ws-sidebar--mobile-open { display: block; }

  .ws-editor.ws-editor--mobile-hidden { display: none; }

  .ws-editor { padding: 1rem 0.75rem 2rem; }

  .ws-editor__head {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .ws-editor__actions {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }

  .ws-page-title { font-size: 1.35rem; }

  .ws-block-row__add { opacity: 1; }
}

.ws-mobile-bar[hidden] {
  display: none !important;
}

.ws-subpage-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
}

.ws-subpage-card__link {
  font-size: 0.72rem;
  color: var(--ws-accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.calories-widget__head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.calories-widget__row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.calories-widget__badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #059669;
  background: #ecfdf5;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}

.calories-widget__input--auto {
  background: #f8fafc;
  color: #0f172a;
}

.calories-widget__manual,
.calories-widget__auto {
  margin-left: auto;
  font-size: 0.72rem !important;
  padding: 0.15rem 0.45rem !important;
}

.ws-block__remove {
  color: #b91c1c !important;
}

.ws-block__remove:hover {
  background: #fef2f2 !important;
}

/* ── Go Cook It ── */
.dashboard--cookit {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

.page-title--cookit {
  color: #fff;
}

.cookit-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--grad-gocookit);
  color: #fff;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-lg);
}

.cookit-hero__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
  margin-bottom: 0.35rem;
}

.cookit-hero__lead {
  font-size: 0.92rem;
  opacity: 0.92;
  max-width: 36rem;
}

.cookit-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.cookit-stat {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.cookit-stat__val {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: #b91c1c;
}

.cookit-stat__lbl {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
}

.cookit-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.cookit-tab {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.cookit-tab--active {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}

.cookit-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.cookit-panel[hidden] {
  display: none !important;
}

.cookit-panel__head {
  margin-bottom: 0.85rem;
}

.cookit-panel__head--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cookit-panel__hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cookit-recipes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}

.cookit-recipe-card {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 0.85rem;
  background: #fafbfc;
}

.cookit-recipe-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.cookit-recipe-card__avail {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cookit-recipe-card__edit {
  border: none;
  background: transparent;
  color: #c2410c;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.cookit-recipe-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.cookit-recipe-card__desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.cookit-recipe-card__meta {
  font-size: 0.72rem;
  color: #94a3b8;
}

.cookit-week-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cookit-week-nav__btn {
  width: 28px;
  height: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font: inherit;
}

.cookit-week-nav__label {
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 10rem;
  text-align: center;
}

.cookit-week-table {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-x: auto;
}

.cookit-week-table__row {
  display: grid;
  grid-template-columns: 6.5rem 1fr 1fr;
  gap: 0.65rem;
  align-items: start;
  min-width: 520px;
}

.cookit-week-table__row--head {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #e2e8f0;
}

.cookit-week-table__day-col {
  font-weight: 600;
  font-size: 0.85rem;
  padding-top: 0.45rem;
}

.cookit-week-select {
  width: 100%;
  font-size: 0.82rem;
}

.cookit-week-select__hint {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

.cookit-shopping {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cookit-shopping__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fafbfc;
}

.cookit-shopping__item--done {
  opacity: 0.55;
}

.cookit-shopping__item--done .cookit-shopping__name {
  text-decoration: line-through;
}

.cookit-shopping__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
}

.cookit-shopping__qty {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.cookit-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 1.5rem 1rem;
}

.cookit-input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-size: 0.88rem;
  background: #fff;
}

.cookit-input--area {
  resize: vertical;
  min-height: 4.5rem;
}

.cookit-input--qty {
  max-width: 5rem;
}

.cookit-input--unit {
  max-width: 5.5rem;
}

.cookit-ingredients {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.cookit-ingredients__row {
  display: grid;
  grid-template-columns: 1fr 5rem 5.5rem 28px;
  gap: 0.35rem;
  align-items: center;
}

.cookit-ingredients__remove {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.cookit-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  align-items: end;
}

.cookit-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.cookit-field--check {
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  padding-bottom: 0.45rem;
}

.cookit-form-error {
  color: #dc2626;
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
}

.cookit-modal[hidden] {
  display: none !important;
}

.cookit-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cookit-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.cookit-modal__card {
  position: relative;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem;
}

.cookit-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cookit-modal__title {
  font-size: 1.05rem;
  font-weight: 700;
}

.cookit-modal__close {
  border: none;
  background: #f1f5f9;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.cookit-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.cookit-modal__foot-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

@media (max-width: 768px) {
  .cookit-stats { grid-template-columns: repeat(2, 1fr); }
  .cookit-form__row { grid-template-columns: 1fr; }
  .cookit-ingredients__row { grid-template-columns: 1fr 1fr 28px; }
  .cookit-ingredients__row .cookit-input--unit { display: none; }
}
