:root {
  --bg: #f3ecdd;
  --bg-dark: #241811;
  --bg-dark-2: #2e2016;
  --surface: #ffffff;
  --ink: #241811;
  --ink-soft: #4a4038;
  --muted: #93867a;
  --muted-on-dark: #c3b3a4;
  --line: #e9decb;
  --line-soft: #efe6d5;

  --brand: #d2601f;
  --brand-ink: #b34e14;
  --brand-soft: #fbe3cd;

  --peach: #d2601f;
  --peach-soft: #fbe3cd;
  --mint: #3f7d4c;
  --mint-soft: #dceedd;
  --sky: #3b6fc4;
  --sky-soft: #dce8fa;
  --lilac: #7b5fc4;
  --lilac-soft: #e7e1f7;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --nav-h: 70px;
  --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --shadow-card: 0 1px 2px rgba(36, 24, 17, 0.04), 0 8px 20px -12px rgba(36, 24, 17, 0.12);
}

* ,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body {
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

svg {
  display: block;
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.app-shell {
  min-height: 100dvh;
}

/* ---------- Topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 16px;
  padding-top: calc(20px + env(safe-area-inset-top));
  background: var(--bg);
}

.topbar.on-dark {
  background: var(--bg-dark);
  color: #fdf8ef;
}

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

.topbar-titles h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.topbar-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  flex-shrink: 0;
}

.on-dark .topbar-back {
  background: rgba(255, 255, 255, 0.1);
  color: #fdf8ef;
  box-shadow: none;
}

.topbar-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.on-dark .topbar-sub {
  color: var(--muted-on-dark);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  color: var(--ink);
}

.on-dark .icon-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fdf8ef;
  box-shadow: none;
}

.icon-btn-danger {
  width: 40px;
  height: 40px;
  background: #fbdcd6;
  color: #9a3a26;
  box-shadow: none;
}

.icon-btn-danger .icon {
  width: 18px;
  height: 18px;
}

.icon-btn:active {
  transform: translateY(1px);
}

.desktop-only {
  display: none !important;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
}

.btn-danger {
  background: #fbdcd6;
  border-color: #f0b6a9;
  color: #9a3a26;
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.85rem;
}

.fab {
  position: fixed;
  right: 20px;
  bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom));
  z-index: 25;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  background: var(--brand-ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 24px -10px rgba(179, 78, 20, 0.55);
  cursor: pointer;
}

.fab.hidden {
  display: none !important;
}

.fab:active {
  transform: translateY(1px);
}

.fab .icon {
  width: 26px;
  height: 26px;
}

/* ---------- Layout ---------- */

.wrap {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 4px 20px 96px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 14px;
}

.section-header h2 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

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

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

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

/* ---------- Pills / badges ---------- */

.pill {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.pill .icon {
  width: 13px;
  height: 13px;
}

.pill-peach { background: var(--peach-soft); color: var(--peach); }
.pill-mint { background: var(--mint-soft); color: var(--mint); }
.pill-sky { background: var(--sky-soft); color: var(--sky); }
.pill-lilac { background: var(--lilac-soft); color: var(--lilac); }
.pill-neutral { background: var(--line-soft); color: var(--ink-soft); }

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

/* ---------- Avatars / placeholders ---------- */

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  color: #fff;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.3rem;
  color: #fff;
}

.avatar-stack {
  display: flex;
  align-items: center;
  gap: 6px;
}

a.avatar-stack {
  text-decoration: none;
  color: inherit;
}

.avatar-stack .avatar-name {
  font-weight: 700;
  font-size: 0.88rem;
  margin-right: 6px;
}

.session-dog-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dog-owner-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.dog-owner-dogs {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.dog-owner-name {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.dog-owner-name .icon {
  width: 15px;
  height: 15px;
}

.photo-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--ph-a, #f0dcc2), var(--ph-b, #e3c79f));
}

.photo-placeholder .icon {
  width: 34%;
  height: 34%;
  color: rgba(36, 24, 17, 0.32);
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-card);
  display: block;
  color: inherit;
  text-decoration: none;
}

/* Session card */

.month-separator {
  margin: 22px 2px 10px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.session-feed > .month-separator:first-child {
  margin-top: 4px;
}

.session-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "date type"
    "loc  loc"
    "sep  sep"
    "dogs dogs";
  align-items: center;
  row-gap: 10px;
  column-gap: 10px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
}

.session-col-date {
  grid-area: date;
}

.session-col-type {
  grid-area: type;
  justify-self: end;
}

.type-tag-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.session-col-loc {
  grid-area: loc;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.session-col-loc .icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--muted);
}

.session-date {
  font-weight: 700;
  font-size: 0.92rem;
}

.session-time {
  margin-top: 2px;
  font-size: 0.82rem;
  color: var(--muted);
}

.session-sep {
  grid-area: sep;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 0;
}

.session-col-dogs {
  grid-area: dogs;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.session-col-dogs .avatar-stack {
  gap: 8px;
}

/* Client list card */

.client-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.client-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.client-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px -18px rgba(36, 24, 17, 0.28);
}

.client-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.client-card-name {
  flex: 1;
  min-width: 0;
  font-weight: 800;
  font-size: 1.02rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-card-meta-list {
  display: grid;
  gap: 7px;
}

.client-card-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.client-card-meta-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-card-meta-row .icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--muted);
}

.client-card-dogs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.list-load-more {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

/* ---------- Dog cards ---------- */

.dog-section {
  margin: 0 -20px;
  padding: 20px 20px 28px;
}

.dog-search {
  display: none;
}

.dog-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 12% 6px;
  margin: 0 -20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.dog-carousel::-webkit-scrollbar {
  display: none;
}

.dog-card {
  position: relative;
  flex: 0 0 78%;
  scroll-snap-align: center;
  text-decoration: none;
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 5px;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
  box-shadow: 0 10px 22px -14px rgba(36, 24, 17, 0.35);
}

.dog-card::after {
  content: "";
  position: absolute;
  inset: -60% -20%;
  width: 45%;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.75) 48%, rgba(255, 255, 255, 0.15) 58%, transparent 80%);
  transform: translateX(-260%) rotate(8deg);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 5;
  mix-blend-mode: overlay;
}

.dog-card:hover,
.dog-card:focus-visible {
  transform: scale(1.035);
  box-shadow: 0 20px 34px -16px rgba(36, 24, 17, 0.4);
}

.dog-card:hover::after,
.dog-card:focus-visible::after {
  transform: translateX(430%) rotate(8deg);
}

.dog-card-inner {
  position: relative;
  background: var(--surface);
  border-radius: calc(var(--radius-lg) - 5px);
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dog-card-info-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.dog-card-info-head strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
}

.dog-card-info-head span {
  color: var(--muted);
  font-size: 0.85rem;
}

.dog-breed-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sex-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sex-icon .icon {
  width: 15px;
  height: 15px;
}

.sex-male {
  color: #3b6fc4;
}

.sex-female {
  color: #c45a7a;
}

.dog-card-info-head .sex-male,
.dog-profile-breed .sex-male {
  color: #3b6fc4;
}

.dog-card-info-head .sex-female,
.dog-profile-breed .sex-female {
  color: #c45a7a;
}

.sex-options label {
  font-weight: 700;
}

.sex-options .icon {
  width: 16px;
  height: 16px;
}

.sex-options input[value="1"] + .icon,
.sex-options label:has(input[value="1"]) {
  color: #3b6fc4;
}

.sex-options input[value="0"] + .icon,
.sex-options label:has(input[value="0"]) {
  color: #c45a7a;
}

.dog-card-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 2px 6px rgba(36, 24, 17, 0.2);
}

.dog-card-badge img {
  width: 100%;
  height: 100%;
  display: block;
}

.dog-stats {
  display: grid;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.dog-stats-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.86rem;
}

.dog-stats-row span:first-child {
  color: var(--muted);
}

.dog-stats-row span:last-child {
  font-weight: 800;
}

.dog-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 4px;
}

.dog-carousel-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
  display: block;
}

.dog-carousel-dots i.active {
  background: var(--brand);
  width: 16px;
}

.dog-grid {
  display: none;
}

.dog-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

/* Dog detail (light page) */

.dog-profile-card {
  border-radius: var(--radius-lg);
  padding: 5px;
}

.dog-profile-inner {
  background: var(--surface);
  border-radius: calc(var(--radius-lg) - 5px);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.dog-profile-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.dog-profile-section h3 {
  margin: 0 0 14px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.dog-profile-section .dog-stats {
  padding-top: 0;
  border-top: 0;
}

.dog-detail-hero {
  display: flex;
  gap: 16px;
  align-items: center;
}

.dog-detail-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.dog-detail-photo {
  width: 92px;
  height: 92px;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.dog-detail-photo .icon {
  width: 40%;
  height: 40%;
}

.dog-detail-hero h2 {
  margin: 0 0 2px;
  font-size: 1.3rem;
  font-weight: 800;
}

.profile-owner-link {
  color: var(--ink-soft);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}

.profile-owner-link:hover {
  color: var(--brand-ink);
  border-color: var(--brand-ink);
}

/* ---------- Info card (fiche client) ---------- */

.info-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.info-card + .info-card {
  margin-top: 14px;
}

.info-card h3 {
  margin: 0 0 14px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.info-row + .info-row {
  margin-top: 14px;
}

.info-row-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--line-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ink-soft);
}

.info-row-icon .icon {
  width: 18px;
  height: 18px;
}

.info-row-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.info-row-value {
  font-weight: 700;
  margin-top: 2px;
}

.maps-link {
  font-weight: 700;
  font-size: 0.82em;
  color: var(--sky);
  text-decoration: none;
  white-space: nowrap;
}

.maps-link:hover {
  color: var(--brand-ink);
  text-decoration: underline;
}

.info-line-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.9rem;
}

.info-line-row + .info-line-row {
  margin-top: 12px;
}

.info-line-row span:first-child {
  color: var(--muted);
}

.info-line-row span:last-child {
  font-weight: 700;
}

.notes-box {
  background: var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

.session-detail-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.session-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.session-pager-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--ink-soft);
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.session-pager-btn:active {
  transform: translateY(1px);
}

.session-pager-btn .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--muted);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.profile-card-body {
  flex: 1;
  min-width: 0;
}

.profile-card-body h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.profile-card-body p {
  margin: 3px 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.profile-card-actions {
  flex-shrink: 0;
}

/* ---------- Forms ---------- */

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2393867a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 40px;
}

.field textarea {
  min-height: 100px;
  resize: vertical;
}

.field-row {
  display: flex;
  gap: 14px;
}

.field-row .field {
  flex: 1;
  min-width: 0;
}

.check-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.check-row label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.tag-picker {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--surface);
}

.tag-picker-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 20px;
}

.tag-pill {
  border: 1px solid var(--line);
  background: var(--line-soft);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tag-pill:active {
  transform: translateY(1px);
}

.tag-pill.selected {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-ink);
}

.tag-picker-input {
  width: 100%;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 0.9rem;
}

.form-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* ---------- Pagination (placeholder) ---------- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 24px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.5;
}

.pagination-btn.active {
  background: var(--line-soft);
  color: var(--ink-soft);
  border-color: var(--line-soft);
}

.pagination-btn .icon {
  width: 16px;
  height: 16px;
}

.pagination-ellipsis {
  padding: 0 2px;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.5;
}

/* ---------- Tabs ---------- */

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 0 20px 14px;
}

.tabs button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  color: var(--muted);
}

.tabs button.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.month-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2393867a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  border-radius: 999px;
  padding: 9px 38px 9px 16px;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--ink-soft);
  cursor: pointer;
  min-height: 40px;
}

/* ---------- Search bar (mobile) ---------- */

.search-bar {
  padding: 0 20px 14px;
}

.search-bar input {
  width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

/* ---------- Dashboard ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 148px;
}

.stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stat-card-icon .icon {
  width: 20px;
  height: 20px;
}

.stat-card-icon.peach { background: var(--peach-soft); color: var(--peach); }
.stat-card-icon.mint { background: var(--mint-soft); color: var(--mint); }
.stat-card-icon.sky { background: var(--sky-soft); color: var(--sky); }
.stat-card-icon.lilac { background: var(--lilac-soft); color: var(--lilac); }

.stat-card-value {
  margin: auto 0 0;
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-card-label {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.86rem;
}

.dash-panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.dash-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 12px 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.dash-tabs button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  border-radius: 10px 10px 0 0;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.dash-tabs button.active {
  color: var(--brand-ink);
  border-bottom-color: var(--brand);
}

.dash-panel-body {
  padding: 20px;
}

.dash-tag-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.dash-tag-row:last-child {
  border-bottom: 0;
}

.dash-add-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.dash-add-row input {
  flex: 1;
  min-width: 160px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.dash-own-list {
  display: grid;
  gap: 10px;
  margin: 8px 0 16px;
}

.dash-own-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--line-soft);
  border-radius: 12px;
}

.dash-own-row strong {
  flex: 1;
  min-width: 0;
}

/* ---------- Nav ---------- */

.side-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.side-brand,
.side-user {
  display: none;
}

.side-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.side-nav a .icon {
  width: 22px;
  height: 22px;
}

.side-nav a.active {
  color: var(--brand);
}

.hidden {
  display: none !important;
}

/* ---------- Modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(36, 24, 17, 0.45);
  display: grid;
  place-items: end center;
  z-index: 50;
  padding: 16px;
}

.modal-card {
  width: min(480px, 100%);
  background: var(--surface);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: env(safe-area-inset-bottom);
}

.modal-card h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

/* ==========================================================
   Desktop layout (>= 960px)
   ========================================================== */

@media (min-width: 960px) {
  body {
    padding-bottom: 0;
    padding-left: 260px;
  }

  .side-nav {
    left: 0;
    right: auto;
    top: 0;
    bottom: 0;
    width: 260px;
    height: 100dvh;
    grid-template-columns: 1fr;
    grid-auto-rows: min-content;
    align-content: start;
    padding: 22px 16px;
    gap: 4px;
    border-top: 0;
    border-right: 1px solid var(--line);
  }

  .side-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 22px;
  }

  .side-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
  }

  .side-brand strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
  }

  .side-brand small {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
  }

  .side-nav a {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
  }

  .side-nav a.active {
    background: var(--brand-soft);
    color: var(--brand-ink);
  }

  .side-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 12px 10px 4px;
    border-top: 1px solid var(--line);
  }

  .side-user strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 800;
  }

  .side-user small {
    display: block;
    color: var(--muted);
    font-size: 0.74rem;
  }

  .side-user-phone {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
  }

  .fab {
    right: 32px;
    bottom: 32px;
  }

  .search-bar,
  .dog-mobile-search {
    display: none;
  }

  .wrap {
    width: 100%;
    max-width: 1160px;
    padding: 0 32px 96px;
  }

  .topbar {
    padding: 32px 32px 20px;
    align-items: flex-start;
  }

  .topbar-titles h1 {
    font-size: 1.9rem;
  }

  .dog-search {
    display: block;
    margin: 4px 0 22px;
  }

  .dog-search input {
    width: 100%;
    max-width: 360px;
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
  }

  .topbar-actions .btn-primary {
    order: 2;
  }

  .desktop-only {
    display: inline-flex !important;
  }

  .mobile-only {
    display: none !important;
  }

  .tabs {
    padding: 0 32px 22px;
  }

  .session-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .session-card {
    grid-template-columns: 190px 190px 1fr auto;
    grid-template-areas: "date type loc dogs";
    row-gap: 0;
    column-gap: 24px;
    padding: 18px 22px;
  }

  .session-col-type {
    justify-self: start;
  }

  .type-tag-stack {
    align-items: flex-start;
  }

  .session-sep {
    display: none;
  }

  .dog-section {
    margin: 0;
    padding: 0 32px 40px;
  }

  .dog-carousel,
  .dog-carousel-dots {
    display: none;
  }

  .dog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
  }

  .dog-actions {
    justify-content: center;
    margin-top: 20px;
  }

  .fiche-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 18px;
    align-items: start;
  }

  .fiche-grid .info-card + .info-card {
    margin-top: 18px;
  }

  .profile-card {
    grid-column: 1 / -1;
  }

  .client-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .wrap-full {
    max-width: none;
  }

  .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }

  .stat-card {
    min-height: 168px;
    padding: 24px 22px 20px;
  }

  .stat-card-value {
    font-size: 2.7rem;
  }

  .dash-panel-body {
    padding: 24px;
  }
}

@media (min-width: 1280px) {
  .client-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
