:root {
  --wine-950: #2b101a;
  --wine-900: #3d1726;
  --wine-800: #542136;
  --wine-700: #6c2b45;
  --wine-600: #87405a;
  --rose-500: #c98994;
  --rose-200: #edd0d3;
  --rose-100: #f8e8e7;
  --rose-50: #fcf4f2;
  --champagne: #c6a46d;
  --champagne-soft: #efe2c9;
  --ivory: #fffdf9;
  --sand: #f5f0eb;
  --ink: #282024;
  --muted: #766a6f;
  --line: #e8dfdc;
  --white: #ffffff;
  --green: #176d56;
  --green-soft: #e5f3ed;
  --red: #a43f4d;
  --red-soft: #fbeaec;
  --shadow-sm: 0 8px 24px rgba(55, 27, 37, .06);
  --shadow-md: 0 18px 48px rgba(55, 27, 37, .10);
  --shadow-lg: 0 30px 80px rgba(41, 18, 27, .18);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color: var(--ink);
  background: var(--sand);
  font-family: var(--sans);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 100% 0, rgba(233, 203, 204, .42), transparent 30rem),
    linear-gradient(180deg, #fbf8f4 0, var(--sand) 100%);
}

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

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

button,
summary,
select {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -.035em;
}

h1 {
  margin-bottom: .45rem;
  color: var(--wine-900);
  font-size: clamp(2.15rem, 8vw, 3.75rem);
  line-height: .98;
}

h2 {
  margin-bottom: .3rem;
  color: var(--wine-900);
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  line-height: 1.1;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.icon {
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .65rem;
  color: var(--wine-600);
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow.light {
  color: rgba(255, 255, 255, .82);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  color: var(--wine-900);
  background: linear-gradient(145deg, #fff, #f3dfdc);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(24, 8, 14, .14);
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: .75rem 1rem;
  font-size: .84rem;
  font-weight: 800;
  line-height: 1;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(201, 137, 148, .34);
  outline-offset: 2px;
}

.button.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--wine-900), var(--wine-600));
  box-shadow: 0 12px 28px rgba(84, 33, 54, .22);
}

.button.secondary {
  color: var(--wine-800);
  border-color: var(--line);
  background: var(--white);
}

.button.light {
  color: var(--wine-900);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 30px rgba(28, 8, 15, .15);
}

.button.wide {
  width: 100%;
}

.alert {
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: .9rem 1rem;
  font-size: .84rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.alert.success {
  color: var(--green);
  border-color: #c7e7da;
  background: var(--green-soft);
}

.alert.error {
  color: var(--red);
  border-color: #f3cdd2;
  background: var(--red-soft);
}

.alert.warning {
  color: #805313;
  border-color: #ead6a8;
  background: #fff8e5;
}

/* Connexion */
.login-body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--wine-950);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-rows: minmax(250px, 42vh) auto;
  background: var(--ivory);
}

.login-brand {
  position: relative;
  display: flex;
  min-height: 250px;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(40, 13, 24, .18), rgba(40, 13, 24, .86)),
    url("assets/salon-hero.webp") center 46% / cover no-repeat,
    var(--wine-900);
}

.login-brand::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(90deg, rgba(43, 16, 26, .55), transparent 68%);
}

.login-brand > * {
  position: relative;
  z-index: 1;
}

.brand-signature {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--serif);
  font-size: 1.05rem;
}

.login-brand-copy {
  max-width: 36rem;
}

.login-brand-copy h1 {
  margin-bottom: .6rem;
  color: var(--white);
  font-size: clamp(2.5rem, 11vw, 5.4rem);
}

.login-brand-copy p {
  display: none;
  max-width: 28rem;
  margin-bottom: 0;
  color: rgba(255, 255, 255, .78);
}

.login-trust {
  display: none;
  width: fit-content;
  align-items: center;
  gap: .5rem;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  padding: .6rem .85rem;
  color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .09);
  font-size: .74rem;
  font-weight: 750;
  backdrop-filter: blur(12px);
}

.login-card {
  position: relative;
  z-index: 2;
  margin-top: -1.2rem;
  border-radius: 24px 24px 0 0;
  padding: 1.55rem 1.25rem max(2rem, env(safe-area-inset-bottom));
  background: var(--ivory);
}

.mobile-login-brand {
  display: none;
  align-items: center;
  gap: .7rem;
  margin-bottom: 2rem;
  color: var(--wine-900);
  font-family: var(--serif);
}

.login-card h2 {
  margin-bottom: .4rem;
  font-size: 2rem;
}

.login-card > p {
  margin-bottom: 1.35rem;
  font-size: .9rem;
}

.stack-form,
.entry-form {
  display: grid;
  gap: 1rem;
}

.stack-form label,
.field-group,
.form-grid label,
.optional-fields label {
  display: grid;
  gap: .45rem;
}

.stack-form label > span:first-child,
.field-group > label,
.form-grid label > span:first-child,
.optional-fields label > span:first-child {
  color: #55494e;
  font-size: .76rem;
  font-weight: 800;
}

.password-field,
.money-input {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 4.6rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: .45rem;
  min-height: 36px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  padding: 0 .65rem;
  color: var(--wine-700);
  background: var(--rose-100);
  font-size: .68rem;
  font-weight: 800;
}

/* Structure de l’application — mobile d’abord */
.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  border-top: 1px solid rgba(93, 53, 67, .12);
  padding: .45rem .55rem max(.45rem, env(safe-area-inset-bottom));
  background: rgba(255, 253, 249, .96);
  box-shadow: 0 -10px 35px rgba(48, 21, 31, .12);
  backdrop-filter: blur(18px);
}

.sidebar-brand,
.sidebar-footer {
  display: none;
}

.main-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .25rem;
}

.main-nav a {
  display: flex;
  min-width: 0;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .25rem;
  border-radius: 14px;
  color: #8a7b80;
  font-size: .63rem;
  font-weight: 750;
  line-height: 1.1;
  white-space: nowrap;
}

.main-nav a .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.main-nav a.active {
  color: var(--wine-800);
  background: var(--rose-100);
}

.team-app .sidebar {
  display: none;
}

.main-content {
  min-width: 0;
  padding: .8rem .85rem 6.25rem;
}

.team-app .main-content {
  padding-bottom: 1.5rem;
}

.mobile-topbar {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .8rem;
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--wine-900);
  font-family: var(--serif);
  font-size: .98rem;
}

.mobile-brand .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 1.05rem;
}

.avatar-button,
.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--wine-800);
  background: var(--rose-100);
  font-weight: 850;
}

.avatar-button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(108, 43, 69, .1);
}

.avatar {
  width: 38px;
  height: 38px;
  font-size: .8rem;
}

/* Périodes */
.period-toolbar {
  display: grid;
  gap: .7rem;
  margin: 1rem 0;
  border: 1px solid rgba(103, 63, 76, .11);
  border-radius: 20px;
  padding: .75rem;
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow-sm);
}

.period-main {
  display: grid;
  gap: .65rem;
}

.period-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 13px;
  padding: .22rem;
  background: #f0e8e5;
}

.period-switch a,
.period-switch button {
  display: grid;
  min-height: 40px;
  place-items: center;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  font-size: .76rem;
  font-weight: 850;
}

.period-switch a.active,
.period-switch button.active {
  color: var(--wine-900);
  background: var(--white);
  box-shadow: 0 5px 16px rgba(54, 25, 35, .09);
}

.calendar-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .45rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding-left: .75rem;
  background: var(--white);
}

.calendar-control > .icon {
  color: var(--wine-600);
}

.calendar-control input {
  min-width: 0;
  border: 0;
  padding-inline: .2rem;
  background: transparent;
}

.calendar-control button {
  min-height: 40px;
  border: 0;
  border-left: 1px solid var(--line);
  padding: 0 .75rem;
  color: var(--wine-700);
  background: transparent;
  font-size: .7rem;
  font-weight: 800;
}

.period-navigation {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: .45rem;
}

.period-navigation a,
.period-navigation button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--wine-700);
  background: var(--white);
}

.preview-icon {
  display: inline-grid;
  min-width: 1.2rem;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
}

.period-navigation strong {
  overflow: hidden;
  color: var(--wine-900);
  font-family: var(--serif);
  font-size: .98rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Héros et titres */
.dashboard-hero,
.today-hero,
.page-photo-heading {
  position: relative;
  display: flex;
  min-height: 205px;
  overflow: hidden;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 24px;
  padding: 1.25rem;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(43, 16, 26, .92) 0%, rgba(61, 23, 38, .72) 45%, rgba(61, 23, 38, .12) 100%),
    url("assets/beauty-detail.webp") center / cover no-repeat,
    var(--wine-900);
  box-shadow: var(--shadow-md);
}

.dashboard-hero::after,
.today-hero::after,
.page-photo-heading::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, transparent 35%, rgba(34, 10, 19, .35));
}

.dashboard-hero > *,
.today-hero > *,
.page-photo-heading > * {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 31rem;
}

.hero-copy h1,
.today-hero h1,
.page-photo-heading h1 {
  color: var(--white);
}

.hero-copy p,
.today-hero p,
.page-photo-heading p {
  max-width: 32rem;
  margin-bottom: 0;
  color: rgba(255, 255, 255, .76);
  font-size: .84rem;
}

.hero-result {
  display: none;
  min-width: 205px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(16px);
}

.hero-result span,
.hero-result strong,
.hero-result small {
  display: block;
}

.hero-result span {
  margin-bottom: .4rem;
  color: rgba(255, 255, 255, .72);
  font-size: .7rem;
  font-weight: 750;
}

.hero-result strong {
  margin-bottom: .3rem;
  font-family: var(--serif);
  font-size: 1.7rem;
}

.hero-result small {
  color: rgba(255, 255, 255, .65);
  font-size: .67rem;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: .3rem 0 1rem;
}

.section-heading > div {
  min-width: 0;
}

.section-heading h1 {
  margin-bottom: .35rem;
}

.section-heading p {
  margin-bottom: 0;
  font-size: .84rem;
}

.section-heading.page-photo-heading {
  min-height: 170px;
  align-items: flex-end;
  margin-top: 0;
  background:
    linear-gradient(90deg, rgba(43, 16, 26, .93), rgba(61, 23, 38, .48)),
    url("assets/beauty-detail.webp") center 56% / cover no-repeat,
    var(--wine-900);
}

.today-hero {
  min-height: 225px;
  align-items: flex-end;
  background:
    linear-gradient(90deg, rgba(43, 16, 26, .92), rgba(61, 23, 38, .34)),
    url("assets/salon-hero.webp") center / cover no-repeat,
    var(--wine-900);
}

.today-total {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 17px;
  padding: .85rem;
  background: rgba(255, 255, 255, .11);
  backdrop-filter: blur(15px);
}

.today-total span,
.today-total strong,
.today-total small {
  display: block;
}

.today-total span,
.today-total small {
  color: rgba(255, 255, 255, .7);
  font-size: .67rem;
}

.today-total strong {
  margin: .25rem 0;
  color: var(--white);
  font-family: var(--serif);
  font-size: 1.5rem;
}

/* Indicateurs */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin-bottom: .75rem;
}

.kpi-card {
  display: flex;
  min-width: 0;
  min-height: 148px;
  flex-direction: column;
  border: 1px solid rgba(101, 61, 74, .11);
  border-radius: 20px;
  padding: .9rem;
  background: rgba(255, 255, 255, .91);
  box-shadow: var(--shadow-sm);
}

.kpi-card.featured {
  color: var(--white);
  border-color: transparent;
  background: linear-gradient(145deg, var(--wine-900), var(--wine-600));
  box-shadow: 0 18px 38px rgba(78, 28, 48, .22);
}

.kpi-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  align-self: flex-end;
  margin-bottom: .25rem;
  border-radius: 10px;
  color: var(--white);
  background: rgba(255, 255, 255, .15);
}

.kpi-icon.soft {
  color: var(--wine-700);
  background: var(--rose-100);
}

.kpi-card > span {
  overflow: hidden;
  margin-bottom: .35rem;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-card > strong {
  overflow: hidden;
  color: var(--wine-900);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 5vw, 1.85rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-card footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .3rem;
  margin-top: auto;
}

.kpi-card footer small {
  color: var(--muted);
  font-size: .6rem;
}

.kpi-card footer b {
  border-radius: 999px;
  padding: .22rem .38rem;
  font-size: .58rem;
}

.kpi-card footer b.up {
  color: var(--green);
  background: var(--green-soft);
}

.kpi-card footer b.down {
  color: var(--red);
  background: var(--red-soft);
}

.kpi-card footer b.neutral {
  color: var(--wine-700);
  background: var(--rose-100);
}

.kpi-card.featured > span,
.kpi-card.featured > strong,
.kpi-card.featured footer small {
  color: var(--white);
}

/* Panneaux et grilles */
.dashboard-grid,
.content-split,
.summary-grid,
.employee-grid,
.settings-grid {
  display: grid;
  gap: .75rem;
}

.dashboard-grid,
.summary-grid,
.employee-grid {
  margin-bottom: .75rem;
}

.panel {
  min-width: 0;
  border: 1px solid rgba(101, 61, 74, .11);
  border-radius: 21px;
  padding: 1rem;
  background: rgba(255, 255, 255, .93);
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .9rem;
}

.panel-head > div {
  min-width: 0;
}

.panel-head h2,
.panel-head p {
  margin-bottom: 0;
}

.panel-head p {
  margin-top: .2rem;
  font-size: .72rem;
}

.panel-total {
  flex: 0 0 auto;
  color: var(--green);
  font-family: var(--serif);
  font-size: 1.25rem;
  white-space: nowrap;
}

.panel-total.expense {
  color: var(--red);
}

.panel-head-actions {
  display: grid;
  justify-items: end;
  gap: .3rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  color: var(--wine-700);
  font-size: .68rem;
  font-weight: 800;
}

.text-link .icon {
  width: .9rem;
  height: .9rem;
}

.period-chip,
.cash-note {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  border-radius: 999px;
  padding: .4rem .6rem;
  color: var(--wine-700);
  background: var(--rose-100);
  font-size: .64rem;
  font-weight: 800;
  white-space: nowrap;
}

/* Graphique */
.bar-chart {
  display: grid;
  height: 225px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: .45rem;
  padding-top: 1.5rem;
}

.bar-item {
  display: grid;
  min-width: 0;
  height: 100%;
  grid-template-rows: 18px 1fr auto auto;
  gap: .2rem;
  text-align: center;
}

.bar-value {
  overflow: hidden;
  color: var(--muted);
  font-size: .57rem;
  text-overflow: ellipsis;
}

.bar-track {
  position: relative;
  width: min(32px, 70%);
  height: 100%;
  overflow: hidden;
  justify-self: center;
  border-radius: 999px;
  background: #f2e9e6;
}

.bar-track i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--rose-500), var(--wine-800));
}

.bar-item > strong {
  color: var(--wine-800);
  font-size: .68rem;
}

.bar-item > small {
  color: var(--muted);
  font-size: .55rem;
}

.admin-app .bar-chart:has(.bar-item:nth-child(6)) {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

/* Répartition propriétaires */
.owner-list {
  display: grid;
  gap: .9rem;
}

.owner-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .35rem .8rem;
}

.owner-row span b,
.owner-row span small {
  display: block;
}

.owner-row span b {
  color: var(--wine-900);
  font-size: .79rem;
}

.owner-row span small {
  margin-top: .15rem;
  color: var(--muted);
  font-size: .62rem;
}

.owner-row > strong {
  color: var(--wine-800);
  font-size: .82rem;
}

.owner-row > i {
  height: 5px;
  overflow: hidden;
  grid-column: 1 / -1;
  border-radius: 999px;
  background: #f0e7e4;
}

.owner-row > i em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--champagne), var(--wine-600));
}

.owner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .6rem;
}

.owner-grid article {
  min-width: 0;
  border-radius: 15px;
  padding: .8rem;
  background: var(--rose-50);
}

.owner-grid span,
.owner-grid strong,
.owner-grid small {
  display: block;
}

.owner-grid span {
  color: var(--muted);
  font-size: .62rem;
}

.owner-grid strong {
  overflow: hidden;
  margin: .25rem 0;
  color: var(--wine-900);
  font-size: .82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-grid small {
  color: var(--wine-600);
  font-size: .58rem;
}

/* Listes d’activité */
.activity-list {
  display: grid;
  gap: .55rem;
}

.activity-row {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 43px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: .15rem .7rem;
  border: 1px solid #eee6e2;
  border-radius: 16px;
  padding: .65rem;
  background: var(--ivory);
}

.date-tile {
  display: grid;
  width: 43px;
  height: 48px;
  place-content: center;
  grid-row: 1 / 3;
  border-radius: 12px;
  color: var(--wine-800);
  background: var(--rose-100);
  text-align: center;
}

.date-tile strong {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1;
}

.date-tile span {
  margin-top: .15rem;
  color: var(--wine-600);
  font-size: .55rem;
}

.date-tile.expense-tile {
  color: var(--red);
  background: var(--red-soft);
}

.activity-copy {
  min-width: 0;
  grid-row: 1 / 3;
}

.activity-copy > strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: .76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-meta {
  display: flex;
  overflow: hidden;
  flex-wrap: wrap;
  gap: .2rem .4rem;
  margin-top: .28rem;
}

.activity-meta span {
  position: relative;
  color: var(--muted);
  font-size: .6rem;
  white-space: nowrap;
}

.activity-meta span + span::before {
  margin-right: .35rem;
  content: "·";
}

.activity-amount {
  align-self: end;
  font-size: .73rem;
  text-align: right;
  white-space: nowrap;
}

.activity-amount.income {
  color: var(--green);
}

.activity-amount.expense {
  color: var(--red);
}

.row-action {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.icon-button {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--red);
  background: var(--white);
  font-size: 1rem;
}

.activity-row:has(.row-action) .activity-amount {
  grid-row: 2;
}

.empty-state {
  display: grid;
  min-height: 160px;
  place-items: center;
  align-content: center;
  border: 1px dashed #dfd0cc;
  border-radius: 17px;
  padding: 1.2rem;
  color: var(--muted);
  background: var(--rose-50);
  text-align: center;
}

.empty-state > span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  margin-bottom: .5rem;
  border-radius: 13px;
  color: var(--wine-700);
  background: var(--rose-100);
}

.empty-state strong {
  color: var(--wine-900);
  font-family: var(--serif);
}

.empty-state p {
  margin: .25rem 0 0;
  font-size: .7rem;
}

.empty-state.compact {
  min-height: 110px;
}

/* Statistiques compactes */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
  margin-bottom: .75rem;
}

.stat-strip article {
  min-width: 0;
  border: 1px solid rgba(101, 61, 74, .11);
  border-radius: 17px;
  padding: .75rem;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-sm);
}

.stat-strip span,
.stat-strip strong,
.stat-strip small {
  display: block;
}

.stat-strip span {
  overflow: hidden;
  color: var(--muted);
  font-size: .58rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-strip strong {
  overflow: hidden;
  margin: .3rem 0;
  color: var(--wine-900);
  font-family: var(--serif);
  font-size: clamp(.95rem, 4vw, 1.35rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-strip small {
  overflow: hidden;
  color: var(--muted);
  font-size: .53rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-strip article:first-child strong {
  color: var(--red);
}

/* Formulaires */
input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: .75rem .85rem;
  outline: none;
  color: var(--ink);
  background: var(--white);
  font-size: .84rem;
  transition: border .15s ease, box-shadow .15s ease;
}

select {
  padding-right: 2.2rem;
}

textarea {
  min-height: 76px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--rose-500);
  box-shadow: 0 0 0 4px rgba(201, 137, 148, .16);
}

input:disabled {
  color: var(--muted);
  background: #f3efec;
}

.form-grid {
  display: grid;
  gap: .8rem;
}

.form-grid label small {
  color: var(--muted);
  font-size: .6rem;
  font-weight: 500;
}

.money-input input {
  padding-right: 2.8rem;
}

.money-input > b {
  position: absolute;
  top: 50%;
  right: .8rem;
  transform: translateY(-50%);
  color: var(--wine-600);
  font-size: .68rem;
}

.optional-fields {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: .7rem;
  background: #fbf8f6;
}

.optional-fields summary {
  color: var(--wine-700);
  font-size: .72rem;
  font-weight: 800;
}

.optional-fields[open] summary {
  margin-bottom: .75rem;
}

.optional-fields label + label {
  margin-top: .7rem;
}

.form-footer {
  display: grid;
  gap: .65rem;
  align-items: center;
}

.cash-note {
  justify-self: start;
}

.composer-panel {
  scroll-margin-top: 1rem;
}

.info-note {
  margin-top: .8rem;
  border-left: 3px solid var(--champagne);
  border-radius: 0 12px 12px 0;
  padding: .8rem;
  background: #fbf6ec;
}

.info-note strong {
  color: var(--wine-900);
  font-size: .76rem;
}

.info-note p {
  margin: .25rem 0 0;
  font-size: .68rem;
}

/* Analyses */
.summary-list {
  display: grid;
}

.summary-list > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
  border-bottom: 1px solid #eee6e2;
  padding: .7rem 0;
}

.summary-list > div:last-child {
  border-bottom: 0;
}

.summary-list .rank {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 9px;
  color: var(--wine-700);
  background: var(--rose-100);
  font-size: .65rem;
  font-weight: 850;
}

.summary-list span strong,
.summary-list span small {
  display: block;
}

.summary-list span strong {
  overflow: hidden;
  font-size: .74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-list span small {
  margin-top: .15rem;
  color: var(--muted);
  font-size: .59rem;
}

.summary-list b,
.team-card b {
  color: var(--green);
  font-size: .72rem;
  white-space: nowrap;
}

.team-summary {
  display: grid;
  gap: .55rem;
}

.team-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  border: 1px solid #eee6e2;
  border-radius: 15px;
  padding: .65rem;
  background: var(--ivory);
}

.team-card span strong,
.team-card span small {
  display: block;
}

.team-card span strong {
  font-size: .76rem;
}

.team-card span small {
  margin-top: .1rem;
  color: var(--muted);
  font-size: .6rem;
}

.archive-panel {
  margin-top: .75rem;
}

.archive-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  list-style: none;
}

.archive-panel > summary::-webkit-details-marker {
  display: none;
}

.archive-panel > summary span strong {
  color: var(--wine-900);
  font-family: var(--serif);
}

.archive-panel > summary > b {
  display: flex;
  align-items: center;
  gap: .25rem;
  color: var(--wine-700);
  font-size: .72rem;
  white-space: nowrap;
}

.archive-panel[open] > summary > b .icon {
  transform: rotate(90deg);
}

.archive-panel > p {
  margin: .8rem 0;
  font-size: .7rem;
}

.imported-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
}

.imported-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  border-radius: 11px;
  padding: .6rem;
  background: var(--rose-50);
}

.imported-grid span {
  color: var(--muted);
  font-size: .62rem;
}

.imported-grid strong {
  color: var(--wine-800);
  font-size: .68rem;
  white-space: nowrap;
}

.full-width-panel {
  margin-top: .75rem;
}

/* Paramètres */
.user-settings,
.charge-list {
  display: grid;
  gap: .65rem;
}

.user-setting,
.charge-row {
  display: grid;
  gap: .65rem;
  border: 1px solid #eee6e2;
  border-radius: 16px;
  padding: .75rem;
  background: var(--ivory);
}

.setting-person {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .65rem;
}

.setting-person > span:last-child {
  min-width: 0;
}

.setting-person strong,
.setting-person small,
.setting-person em,
.charge-row > div strong,
.charge-row > div small {
  display: block;
}

.setting-person strong,
.charge-row > div strong {
  color: var(--wine-900);
  font-size: .78rem;
}

.setting-person small,
.charge-row > div small {
  overflow: hidden;
  margin-top: .12rem;
  color: var(--muted);
  font-size: .6rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setting-person em {
  width: fit-content;
  margin-top: .25rem;
  border-radius: 999px;
  padding: .2rem .4rem;
  color: var(--wine-700);
  background: var(--rose-100);
  font-size: .56rem;
  font-style: normal;
  font-weight: 750;
}

.toggle {
  display: flex;
  align-items: center;
  gap: .45rem;
  color: var(--muted);
  font-size: .7rem;
}

.toggle input {
  width: 20px;
  min-height: 20px;
}

/* Notifications e-mail */
.email-settings-panel {
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(216, 169, 147, .16), transparent 18rem),
    rgba(255, 255, 255, .96);
}

.email-panel-head {
  align-items: center;
}

.email-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .38rem;
  border-radius: 999px;
  padding: .42rem .62rem;
  color: var(--green);
  background: var(--green-soft);
  font-size: .62rem;
  font-weight: 800;
}

.email-status.error {
  color: var(--red);
  background: var(--red-soft);
}

.email-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(41, 128, 99, .1);
}

.email-settings-layout {
  display: grid;
  gap: .9rem;
}

.recipient-list,
.email-history {
  min-width: 0;
}

.recipient-list {
  display: grid;
  align-content: start;
  gap: .55rem;
}

.recipient-label,
.email-history-head > span {
  color: var(--wine-800);
  font-size: .68rem;
  font-weight: 800;
}

.recipient-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .6rem;
  border: 1px solid #eee4df;
  border-radius: 14px;
  padding: .68rem;
  background: var(--ivory);
}

.recipient-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 11px;
  color: var(--wine-700);
  background: var(--rose-100);
  font-family: var(--serif);
  font-size: .95rem;
  font-weight: 800;
}

.recipient-card > span:last-child {
  min-width: 0;
}

.recipient-card strong,
.recipient-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipient-card strong {
  color: var(--wine-900);
  font-size: .69rem;
}

.recipient-card small {
  margin-top: .12rem;
  color: var(--muted);
  font-size: .58rem;
}

.email-test-form {
  display: grid;
  gap: .35rem;
  margin-top: .25rem;
}

.email-test-form .button {
  width: 100%;
}

.email-test-form > small {
  color: var(--muted);
  font-size: .58rem;
  text-align: center;
}

.email-history {
  border: 1px solid #eee4df;
  border-radius: 16px;
  padding: .7rem;
  background: #fffaf8;
}

.email-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .1rem .2rem .55rem;
}

.email-history-head small {
  color: var(--muted);
  font-size: .58rem;
}

.email-log-list {
  display: grid;
  gap: .35rem;
}

.email-log-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: .5rem;
  border-radius: 11px;
  padding: .55rem;
  background: var(--white);
}

.email-log-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.email-log-dot.sent {
  background: var(--green);
}

.email-log-dot.failed {
  background: var(--red);
}

.email-log-copy {
  min-width: 0;
}

.email-log-copy strong,
.email-log-copy small,
.email-log-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-log-copy strong {
  color: var(--wine-900);
  font-size: .63rem;
}

.email-log-copy small {
  margin-top: .12rem;
  color: var(--muted);
  font-size: .55rem;
}

.email-log-copy em {
  margin-top: .16rem;
  color: var(--red);
  font-size: .54rem;
  font-style: normal;
}

.email-log-row > b {
  border-radius: 999px;
  padding: .22rem .4rem;
  font-size: .52rem;
}

.email-log-row > b.sent {
  color: var(--green);
  background: var(--green-soft);
}

.email-log-row > b.failed {
  color: var(--red);
  background: var(--red-soft);
}

.email-error-note {
  margin-bottom: .8rem;
}

.smtp-setup-card {
  display: grid;
  gap: .8rem;
  margin-bottom: .9rem;
  border: 1px solid rgba(111, 41, 66, .14);
  border-radius: 17px;
  padding: .8rem;
  background:
    linear-gradient(135deg, rgba(255, 250, 248, .98), rgba(249, 239, 235, .72));
}

.smtp-setup-head {
  display: grid;
  min-width: 0;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
}

.smtp-gmail-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #eaded9;
  border-radius: 12px;
  color: #b0392e;
  background: var(--white);
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.smtp-setup-head strong,
.smtp-setup-head small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smtp-setup-head strong {
  color: var(--wine-900);
  font-size: .72rem;
}

.smtp-setup-head small {
  margin-top: .14rem;
  color: var(--muted);
  font-size: .59rem;
}

.smtp-setup-head em {
  border-radius: 999px;
  padding: .3rem .48rem;
  color: var(--green);
  background: var(--green-soft);
  font-size: .54rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.smtp-config-form {
  display: grid;
  gap: .6rem;
}

.smtp-config-form label {
  display: grid;
  gap: .34rem;
}

.smtp-config-form label > span {
  color: var(--wine-800);
  font-size: .64rem;
  font-weight: 750;
}

.smtp-config-form input {
  width: 100%;
  letter-spacing: .1em;
}

.smtp-config-form .button {
  width: 100%;
}

.smtp-security-note {
  margin: 0;
  color: var(--muted);
  font-size: .58rem;
  line-height: 1.5;
}

.button:disabled {
  cursor: not-allowed;
  opacity: .48;
  transform: none;
}

@media (max-width: 420px) {
  .main-content {
    padding-inline: .65rem;
  }

  .dashboard-hero,
  .today-hero,
  .page-photo-heading {
    border-radius: 20px;
    padding: 1rem;
  }

  .today-hero {
    display: grid;
  }

  .today-total {
    width: fit-content;
  }

  .kpi-card {
    min-height: 140px;
    padding: .75rem;
  }

  .kpi-card > strong {
    font-size: 1.12rem;
  }

  .stat-strip article {
    padding: .62rem;
  }

  .activity-row {
    grid-template-columns: 41px minmax(0, 1fr) auto;
    gap-x: .55rem;
    padding: .55rem;
  }

  .activity-copy > strong {
    font-size: .72rem;
  }

  .activity-amount {
    font-size: .68rem;
  }

  .owner-grid {
    grid-template-columns: 1fr;
  }

  .section-heading .button {
    min-width: 48px;
    padding-inline: .75rem;
  }
}

@media (min-width: 560px) {
  .main-content {
    padding-inline: 1.25rem;
  }

  .period-main {
    grid-template-columns: minmax(220px, .75fr) minmax(220px, 1fr);
  }

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

  .form-grid .full {
    grid-column: 1 / -1;
  }

  .form-footer {
    grid-template-columns: auto minmax(200px, 1fr);
  }

  .form-footer .button {
    justify-self: end;
  }

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

@media (min-width: 720px) {
  .login-shell {
    grid-template-columns: minmax(0, 1.08fr) minmax(350px, .92fr);
    grid-template-rows: 1fr;
  }

  .login-brand {
    min-height: 100vh;
    min-height: 100dvh;
    justify-content: space-between;
    padding: clamp(2rem, 6vw, 5rem);
    background:
      linear-gradient(90deg, rgba(43, 16, 26, .78), rgba(43, 16, 26, .16)),
      url("assets/salon-hero.webp") center / cover no-repeat,
      var(--wine-900);
  }

  .login-brand-copy p,
  .login-trust {
    display: flex;
  }

  .login-card {
    display: flex;
    max-width: 540px;
    min-height: 100vh;
    min-height: 100dvh;
    justify-content: center;
    flex-direction: column;
    margin-top: 0;
    border-radius: 0;
    padding: clamp(2.4rem, 6vw, 5rem);
  }

  .mobile-login-brand {
    display: flex;
  }

  .hero-result {
    display: block;
  }

  .period-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(250px, .42fr);
    align-items: center;
  }

  .kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stat-strip article {
    padding: 1rem;
  }

  .activity-row {
    grid-template-columns: 48px minmax(0, 1fr) auto 30px;
    grid-template-rows: 1fr;
    padding: .75rem;
  }

  .date-tile,
  .activity-copy,
  .activity-amount,
  .row-action {
    grid-row: 1;
  }

  .activity-amount {
    grid-column: 3;
    align-self: center;
  }

  .row-action {
    grid-column: 4;
  }

  .activity-row:has(.row-action) .activity-amount {
    grid-row: 1;
  }

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

  .user-setting {
    grid-template-columns: minmax(240px, 1fr) minmax(190px, .72fr) auto;
    align-items: center;
  }

  .charge-row {
    grid-template-columns: minmax(240px, 1fr) 145px 72px auto;
    align-items: center;
  }

  .email-settings-layout {
    grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
    align-items: start;
  }

  .smtp-config-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .smtp-config-form .button {
    width: auto;
    white-space: nowrap;
  }
}

@media (min-width: 900px) {
  .sidebar {
    top: 0;
    right: auto;
    bottom: auto;
    left: 0;
    display: flex;
    width: 258px;
    height: 100vh;
    flex-direction: column;
    border: 0;
    padding: 1.6rem 1.15rem;
    color: rgba(255, 255, 255, .82);
    background:
      radial-gradient(circle at 10% 10%, rgba(201, 137, 148, .24), transparent 14rem),
      linear-gradient(180deg, var(--wine-900), var(--wine-950));
    box-shadow: 18px 0 50px rgba(35, 12, 21, .12);
    backdrop-filter: none;
  }

  .team-app .sidebar {
    display: flex;
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: .25rem .35rem 2.4rem;
  }

  .sidebar-brand strong,
  .sidebar-brand small {
    display: block;
  }

  .sidebar-brand strong {
    color: var(--white);
    font-family: var(--serif);
    font-size: 1.03rem;
  }

  .sidebar-brand small {
    margin-top: .18rem;
    color: rgba(255, 255, 255, .54);
    font-size: .57rem;
    letter-spacing: .13em;
    text-transform: uppercase;
  }

  .main-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: .35rem;
  }

  .main-nav a {
    min-height: 48px;
    justify-content: flex-start;
    flex-direction: row;
    gap: .75rem;
    padding: 0 .85rem;
    color: rgba(255, 255, 255, .62);
    font-size: .78rem;
  }

  .main-nav a.active,
  .main-nav a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, .11);
  }

  .main-nav a.active {
    box-shadow: inset 3px 0 var(--champagne);
  }

  .sidebar-footer {
    display: grid;
    gap: .85rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 1rem .35rem 0;
  }

  .account-card {
    display: flex;
    align-items: center;
    gap: .65rem;
  }

  .account-card strong,
  .account-card small {
    display: block;
  }

  .account-card strong {
    color: var(--white);
    font-size: .77rem;
  }

  .account-card small {
    margin-top: .15rem;
    color: rgba(255, 255, 255, .5);
    font-size: .6rem;
  }

  .logout-button {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border: 0;
    padding: 0;
    color: rgba(255, 255, 255, .56);
    background: none;
    font-size: .68rem;
  }

  .logout-button:hover {
    color: var(--white);
  }

  .main-content,
  .team-app .main-content {
    margin-left: 258px;
    padding: 1.5rem clamp(1.5rem, 3vw, 3.5rem) 3rem;
  }

  .mobile-topbar {
    display: none;
  }

  .dashboard-hero,
  .today-hero {
    min-height: 250px;
    padding: 2rem;
  }

  .section-heading.page-photo-heading {
    min-height: 210px;
    padding: 2rem;
  }

  .period-toolbar {
    margin: 1.1rem 0;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.65fr) minmax(290px, .72fr);
  }

  .content-split {
    grid-template-columns: minmax(0, 1.5fr) minmax(330px, .72fr);
    align-items: start;
  }

  .composer-panel {
    position: sticky;
    top: 1.2rem;
  }

  .employee-grid {
    grid-template-columns: minmax(330px, .72fr) minmax(0, 1.28fr);
    align-items: start;
  }

  .employee-composer {
    position: sticky;
    top: 1.2rem;
  }

  .panel {
    padding: 1.25rem;
  }

  .bar-chart {
    height: 255px;
  }

  .stat-strip {
    gap: .75rem;
  }
}

@media (min-width: 1280px) {
  .main-content,
  .team-app .main-content {
    padding-inline: clamp(2.5rem, 4vw, 5rem);
  }

  .dashboard-hero {
    min-height: 280px;
  }

  .kpi-card {
    min-height: 165px;
    padding: 1.15rem;
  }

  .kpi-card > span {
    font-size: .75rem;
  }

  .content-split {
    grid-template-columns: minmax(0, 1.75fr) minmax(350px, .66fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
