html.hu-frame-blocked { display: none !important; }

[data-l] { left: calc(attr(data-l type(<number>)) * 1%); }
[data-w] { width: calc(attr(data-w type(<number>)) * 1%); }

.work-status-dot--production { background: #1e3a8a; }
.work-status-dot--reunion { background: #7c3aed; }
.work-status-dot--formation { background: #0891b2; }
.work-status-dot--coaching { background: #059669; }

.global-legend-dot--onsite { background: var(--forest-mid); }
.global-legend-dot--remote { background: #f59e0b; }
.global-legend-dot--unknown { background: #94a3b8; }

.event-hero__poster img,
.home-event-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hu-ripple-ink {
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  transform-origin: center;
}
[data-theme="dark"] .hu-ripple-ink {
  background: rgba(159, 190, 255, 0.35);
}

:root,
[data-theme="light"] {
  color-scheme: light;

  /* Palette */
  --forest: #022341;
  --forest-mid: #0046fe;
  --forest-deep: #011a33;
  --lime: #cfe0ff;
  --lime-hover: #bed4ff;
  --lime-muted: #edf3ff;

  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f7f7f7;
  --surface-hover: #f0f0f0;
  --border: #e0e0e0;
  --border-strong: #cccccc;

  --text: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;

  --success-bg: #e8f7ef;
  --success-text: #1f7a46;
  --warning-bg: #fff7e8;
  --warning-text: #8a5b12;
  --error-text: #b42318;
  --error-bg: #fef3f2;

  --sidebar-width: 240px;
  --header-height: 48px;
  --sidebar-bg: var(--forest);
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-text: rgba(255, 255, 255, 0.72);
  --sidebar-text-active: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: var(--forest-mid);
  --sidebar-indicator: var(--lime);

  --topbar-bg: #ffffff;
  --login-bg: var(--bg);
  --login-brand-bg: var(--forest);
  --login-panel-bg: #ffffff;
  --table-head: #f7f7f7;
  --backdrop: rgba(2, 35, 65, 0.55);
  --input-bg: #ffffff;

  --radius: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --s1: 3px;
  --s2: 5px;
  --s3: 8px;
  --s4: 10px;
  --s5: 14px;
  --s6: 18px;
  --s7: 24px;
  --transition: 150ms ease;
  --font: "Segoe UI", system-ui, sans-serif;
  --bg-image-login: url("/assets/bg-login.webp");
  --bg-image-main: url("/assets/bg-main.webp");
  --bg-image-card: url("/assets/bg-card.webp");
  --bg-image-alt-1: url("/assets/bg-alt-1.webp");
  --bg-image-alt-2: url("/assets/bg-alt-2.webp");
  --bg-image-alt-3: url("/assets/bg-login.webp");

  --accent: var(--forest-mid);
  --accent-hover: var(--forest-deep);
  --accent-muted: var(--lime-muted);
  --accent-subtle: var(--lime-muted);
  --brand: var(--forest-mid);
  --brand-dark: var(--forest-deep);
  --brand-soft: var(--lime-muted);
  --brand-glow: rgba(0, 70, 254, 0.18);
  --ink: var(--text);
  --ink-secondary: var(--text-secondary);
  --muted: var(--text-tertiary);
  --line: var(--border);
  --line-strong: var(--border-strong);
  --canvas: var(--bg);
  --heading: var(--text);
  --radius-sm: var(--radius);

  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

[data-theme="dark"] {
  color-scheme: dark;

  --forest: #01162c;
  --forest-mid: #3b7bff;
  --forest-deep: #001021;
  --lime: #9ebeff;
  --lime-hover: #8cb0ff;
  --lime-muted: #152948;

  --bg: #0b1220;
  --surface: #121c2f;
  --surface-2: #1a2740;
  --surface-hover: #22324f;
  --border: #2a3c5e;
  --border-strong: #36507c;

  --text: #e6eefc;
  --text-secondary: #b8c8e4;
  --text-tertiary: #8ea2c6;

  --success-bg: #123326;
  --success-text: #78d9a2;
  --warning-bg: #332612;
  --warning-text: #f0c060;
  --error-text: #f87171;
  --error-bg: #331818;

  --sidebar-bg: #07172c;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-text: rgba(255, 255, 255, 0.65);
  --sidebar-active: var(--forest-mid);
  --topbar-bg: var(--surface);
  --login-brand-bg: var(--forest);
  --login-panel-bg: var(--surface);
  --table-head: var(--surface-2);
  --backdrop: rgba(0, 0, 0, 0.65);
  --input-bg: var(--surface-2);
  --brand-glow: rgba(59, 123, 255, 0.2);
}

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

html, body { min-width: 320px; min-height: 100%; margin: 0; font-size: 13px; }

:root {
  --logo-image: url("/assets/logo.webp");
  --menu-texture-image: none;
}

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

button {
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

button:active { transform: scale(0.98); }

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--forest-mid);
  outline-offset: 2px;
}

a { color: var(--forest-mid); }
small { font-size: 12px; color: var(--text-tertiary); }

/* Loading / empty */

.auth-boot-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

html.auth-booting .auth-boot-screen {
  display: flex !important;
}

html.auth-booting #app {
  visibility: hidden;
  pointer-events: none;
}

.auth-boot-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s4);
  padding: var(--s6);
  text-align: center;
}

.auth-boot-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-tertiary);
}

.boot-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  min-height: 220px;
  color: var(--text-tertiary);
  font-size: 14px;
}

.loader {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--forest-mid);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.empty-state,
.empty-cell {
  color: var(--text-tertiary);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

.empty-state {
  padding: var(--s6) var(--s5);
  background: var(--surface-2);
  border-radius: var(--radius-lg);
}

.empty-cell { padding: var(--s5) !important; }

.empty-inline {
  margin: 0;
  padding: var(--s4) 0;
  color: var(--text-tertiary);
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
}

/* Brand */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background-color: transparent;
  background-image: var(--logo-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
  font-size: 0;
  font-weight: 800;
}

/* Login */

.login-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  background: var(--login-bg);
}

.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: var(--s6) clamp(var(--s5), 5vw, 72px);
  background: var(--login-brand-bg);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.login-bg,
.main-bg {
  display: none !important;
}

.login-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-bg::before {
  content: "";
  position: absolute;
  inset: -5%;
  background-image:
    linear-gradient(135deg, rgba(2, 35, 65, 0.82), rgba(2, 35, 65, 0.62)),
    var(--bg-image-login);
  background-size: cover;
  background-position: center;
  animation: slowPan 26s ease-in-out infinite alternate;
}

.login-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  will-change: transform;
}

.login-blob-1 {
  width: 320px;
  height: 320px;
  top: -80px;
  right: -60px;
  background: var(--lime);
  animation: blobFloat1 14s ease-in-out infinite;
}

.login-blob-2 {
  width: 240px;
  height: 240px;
  bottom: 10%;
  left: -40px;
  background: var(--forest-mid);
  animation: blobFloat2 18s ease-in-out infinite;
}

.login-blob-3 {
  width: 180px;
  height: 180px;
  bottom: -40px;
  right: 20%;
  background: rgba(59, 123, 255, 0.35);
  animation: blobFloat3 12s ease-in-out infinite;
}

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

.login-message h1 em {
  display: inline-block;
  font-style: normal;
  color: var(--lime);
  font-weight: 700;
  animation: textGlow 4s ease-in-out infinite;
}

.brand-large { color: #fff; }
.brand-large > span {
  background-color: transparent;
  background-image: var(--logo-image);
  background-size: cover;
  background-position: center;
  color: transparent;
}

.login-message { max-width: 420px; }

.eyebrow {
  display: block;
  margin-bottom: var(--s5);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
}

.login-message h1 {
  margin: 0;
  font-size: clamp(30px, 3.8vw, 44px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.login-message > p {
  margin: var(--s4) 0 0;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}

.trust-row {
  display: flex;
  gap: var(--s5);
  margin-top: var(--s6);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.trust-row span + span::before {
  content: "·";
  margin-right: var(--s5);
}

.login-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: var(--s6) var(--s5);
  background: var(--login-panel-bg);
}

.login-card { width: min(100%, 380px); animation: fadeSlideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both; }
.login-theme-wrap { position: absolute; top: var(--s4); right: var(--s4); }
.mobile-brand { display: none; }

.login-card h2 {
  margin: 0 0 var(--s2);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.login-card > p {
  margin: 0 0 var(--s6);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.microsoft-button,
.demo-button {
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
}

.microsoft-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.microsoft-button:hover:not(:disabled) { background: var(--surface-hover); }
.microsoft-button:disabled { opacity: 0.45; cursor: not-allowed; }

.microsoft-logo { display: grid; grid-template-columns: repeat(2, 6px); gap: 2px; }
.microsoft-logo i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 1px;
}
.microsoft-logo i:nth-child(1) { background: #f35325; }
.microsoft-logo i:nth-child(2) { background: #81bc06; }
.microsoft-logo i:nth-child(3) { background: #05a6f0; }
.microsoft-logo i:nth-child(4) { background: #ffba08; }

.config-note {
  margin-top: var(--s3);
  padding: var(--s3);
  border-radius: var(--radius);
  background: var(--warning-bg);
  color: var(--warning-text);
  font-size: 13px;
  line-height: 1.5;
}

.error-message {
  margin-top: var(--s3) !important;
  color: var(--error-text) !important;
  font-size: 13px;
}

.separator {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: var(--s5) 0;
  color: var(--text-tertiary);
  font-size: 12px;
}

.separator::before,
.separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.demo-button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
}

.demo-button:hover {
  border-color: var(--forest-mid);
  color: var(--forest);
  background: var(--lime-muted);
}

.login-card small {
  display: block;
  margin-top: var(--s5);
  font-size: 11px;
  line-height: 1.55;
  color: var(--text-tertiary);
  text-align: center;
}

/* App shell */

.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.main-content {
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  height: 100vh;
  height: 100dvh;
  margin-left: var(--sidebar-width);
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

.main-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.main-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bg-image-main);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1;
  animation: softDrift 34s ease-in-out infinite alternate;
}

[data-theme="dark"] .main-bg::before {
  opacity: 0.85;
}

.main-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.52), rgba(245, 247, 251, 0.58));
}

[data-theme="dark"] .main-bg::after {
  background: linear-gradient(160deg, rgba(11, 18, 32, 0.56), rgba(11, 18, 32, 0.64));
}

.app-shell[data-current-page="home"] .main-bg::before { background-image: var(--bg-image-main); }
.app-shell[data-current-page="pointeuse"] .main-bg::before { background-image: var(--bg-image-alt-1); }
.app-shell[data-current-page="leave"] .main-bg::before { background-image: var(--bg-image-alt-2); }
.app-shell[data-current-page="attestations"] .main-bg::before { background-image: var(--bg-image-alt-3); }
.app-shell[data-current-page="hierarchy"] .main-bg::before { background-image: var(--bg-image-card); }
.app-shell[data-current-page="admin"] .main-bg::before { background-image: var(--bg-image-main); }

[data-theme="dark"] .app-shell[data-current-page="home"] .main-bg::before { background-image: var(--bg-image-main); }
[data-theme="dark"] .app-shell[data-current-page="pointeuse"] .main-bg::before { background-image: var(--bg-image-alt-1); }
[data-theme="dark"] .app-shell[data-current-page="leave"] .main-bg::before { background-image: var(--bg-image-alt-2); }
[data-theme="dark"] .app-shell[data-current-page="attestations"] .main-bg::before { background-image: var(--bg-image-alt-3); }
[data-theme="dark"] .app-shell[data-current-page="hierarchy"] .main-bg::before { background-image: var(--bg-image-card); }
[data-theme="dark"] .app-shell[data-current-page="admin"] .main-bg::before { background-image: var(--bg-image-main); }
}

.main-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  will-change: transform;
}

.main-blob-1 {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -80px;
  background: var(--lime);
  animation: blobFloat2 20s ease-in-out infinite;
}

.main-blob-2 {
  width: 300px;
  height: 300px;
  bottom: -60px;
  left: 10%;
  background: rgba(59, 123, 255, 0.22);
  animation: blobFloat1 16s ease-in-out infinite reverse;
}

.main-content .topbar {
  position: sticky;
  top: 0;
  z-index: 40;
}

.main-content .page {
  position: relative;
  z-index: 1;
}

/* Sidebar */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: linear-gradient(180deg, rgba(2, 35, 65, 0.86), rgba(2, 35, 65, 0.95));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.48;
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: -10%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(38% 26% at 22% 18%, rgba(59, 123, 255, 0.42), transparent 62%),
    radial-gradient(34% 30% at 82% 42%, rgba(0, 70, 254, 0.38), transparent 62%),
    radial-gradient(40% 28% at 40% 82%, rgba(130, 175, 255, 0.34), transparent 62%),
    radial-gradient(30% 24% at 68% 100%, rgba(59, 123, 255, 0.3), transparent 60%);
  background-size: 220% 220%;
  background-repeat: no-repeat;
  mix-blend-mode: screen;
  opacity: 0.8;
  filter: blur(6px);
  animation: menuAurora 20s ease-in-out infinite;
}

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

.sidebar > .brand {
  padding: 12px var(--s3) 10px;
  color: #fff;
  font-size: 15px;
  letter-spacing: -0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

button.brand {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: background var(--transition);
}

button.brand:hover {
  background: rgba(255, 255, 255, 0.06);
}

button.brand:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: -2px;
}

.sidebar > .brand > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background-color: transparent;
  background-image: var(--logo-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
  font-size: 0;
  box-shadow: 0 4px 14px rgba(0, 70, 254, 0.22);
}

.close-menu { display: none; }

.sidebar nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--s2) var(--s2) var(--s3);
  overflow-y: auto;
  overflow-x: hidden;
  perspective: 900px;
  perspective-origin: left center;
}

.sidebar nav button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 1px 2px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.3s ease;
  will-change: transform;
}

.sidebar nav button > * {
  position: relative;
  z-index: 1;
}

.sidebar nav button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -125%;
  width: 78%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 0;
}

.sidebar nav button:hover {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.03));
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--sidebar-text-active);
  transform: translateX(4px) translateZ(16px) rotateY(-4deg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    -7px 9px 20px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(59, 123, 255, 0.18);
}

.sidebar nav button:hover::before {
  left: 135%;
}

.sidebar nav button.active {
  background: linear-gradient(150deg, rgba(59, 123, 255, 0.3), rgba(0, 70, 254, 0.14));
  border-color: rgba(59, 123, 255, 0.42);
  color: #fff;
  transform: translateX(2px) translateZ(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -2px 6px rgba(0, 0, 0, 0.28),
    -4px 7px 16px rgba(0, 0, 0, 0.32),
    0 0 22px rgba(59, 123, 255, 0.3);
}

.sidebar nav button.active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 60%;
  transform: translateY(-50%);
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--lime), var(--forest-mid));
  box-shadow: 0 0 12px rgba(59, 123, 255, 0.8);
  animation: menuActivePulse 1.9s ease-in-out infinite;
  z-index: 2;
}

.sidebar .nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: rgba(59, 123, 255, 0.22);
  border: 1px solid rgba(59, 123, 255, 0.35);
  color: #cfe0ff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.sidebar-bottom {
  padding: var(--s2) var(--s2) var(--s3);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar .user-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-areas:
    "avatar text"
    "action action";
  gap: 6px 10px;
  padding: 7px 8px 6px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 8px 20px rgba(0, 0, 0, 0.08);
}

.sidebar .avatar-sidebar-user {
  grid-area: avatar;
  align-self: start;
}

.sidebar .user-card-text {
  grid-area: text;
  min-width: 0;
  overflow: hidden;
}

.sidebar .user-card strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .user-card-email {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .logout-btn {
  grid-area: action;
  width: 100%;
  margin-top: 1px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.74);
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sidebar .logout-btn:hover {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.12);
}

.app-shell.is-animating .sidebar {
  perspective: 1200px;
}

.app-shell.is-animating .sidebar > .brand {
  animation: welcomeCardIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: left center;
}

.app-shell.is-animating .sidebar > .brand > span {
  animation: welcomeLogoPop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 0.12s both;
}

.app-shell.is-animating .sidebar nav button {
  animation: humanaPanel3DIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: left center;
}

.app-shell.is-animating .sidebar nav button:nth-child(1) { animation-delay: 0.08s; }
.app-shell.is-animating .sidebar nav button:nth-child(2) { animation-delay: 0.12s; }
.app-shell.is-animating .sidebar nav button:nth-child(3) { animation-delay: 0.16s; }
.app-shell.is-animating .sidebar nav button:nth-child(4) { animation-delay: 0.2s; }
.app-shell.is-animating .sidebar nav button:nth-child(5) { animation-delay: 0.24s; }
.app-shell.is-animating .sidebar nav button:nth-child(6) { animation-delay: 0.28s; }
.app-shell.is-animating .sidebar nav button:nth-child(7) { animation-delay: 0.32s; }

.app-shell.is-animating .sidebar-bottom {
  animation: humanaPanel3DIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.34s both;
  transform-origin: left bottom;
}

/* Avatar */

.avatar {
  display: inline-grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
  color: var(--forest);
  background: var(--lime);
}

.avatar.violet { color: var(--forest); background: var(--lime); }
.avatar.blue { color: #1e3a5f; background: #bfdbfe; }
.avatar.orange { color: #7c2d12; background: #fed7aa; }
.avatar.green { color: var(--forest); background: #bbf7d0; }
.avatar.pink { color: #831843; background: #fbcfe8; }

.avatar-user-photo {
  color: transparent;
  font-size: 0;
  background-color: transparent;
  background-image: var(--logo-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: none;
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 10px;
}

.sidebar .avatar.avatar-sidebar-user {
  display: inline-grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--forest-mid), #3b7bff);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  box-shadow: 0 0 0 2px rgba(159, 190, 255, 0.28);
}

.sidebar .admin-pill {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(59, 123, 255, 0.2);
  border: 1px solid rgba(59, 123, 255, 0.3);
  color: #cfe0ff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar .creator-pill {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(217, 119, 6, 0.22);
  border: 1px solid rgba(217, 119, 6, 0.35);
  color: #fde68a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.creator-intro {
  margin: 0 var(--s4) var(--s3);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.creator-nav-form {
  padding: 0 var(--s4) var(--s4);
}

.creator-nav-table th,
.creator-nav-table td {
  text-align: center;
  vertical-align: middle;
}

.creator-nav-table th:first-child,
.creator-nav-table td:first-child {
  text-align: left;
}

.creator-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: 13px;
  cursor: pointer;
}

.creator-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--forest-mid);
}

/* Topbar */

.topbar {
  display: flex;
  align-items: center;
  gap: var(--s3);
  height: var(--header-height);
  padding: 0 var(--s4);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.topbar-page {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.topbar-page.is-animating {
  animation: humanaPanel3DIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: left center;
}

.page-heading.is-animating {
  animation: humanaPanel3DIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
  transform-origin: left center;
}

.app-shell[data-current-page="home"] .topbar-page { visibility: hidden; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-left: auto;
}

.dtl-elapsed {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text);
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  min-width: 4.8em;
}

.dtl-elapsed-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.dtl-elapsed--lg {
  font-size: 22px;
  min-width: auto;
}

/* Sélecteur statut de travail (topbar) */
.work-status-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
}

.work-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.work-status-picker select {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
}

.menu-button { display: none; }

.demo-pill {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--lime-muted);
  color: var(--forest);
  font-size: 11px;
  font-weight: 700;
}

/* Page */

.page {
  max-width: 1480px;
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: var(--s3) var(--s4) var(--s5);
}

.page-content {
  position: relative;
}

.page-heading { margin-bottom: var(--s3); }

.page-heading p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.app-shell[data-current-page="home"] .page-heading { display: none; }
.page-spacer { margin-top: var(--s3); }

/* Buttons */

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 var(--s5);
  border: none;
  border-radius: var(--radius);
  background: var(--lime);
  color: var(--forest);
  font-size: 14px;
  font-weight: 800;
  position: relative;
  overflow: hidden;
}

.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.primary:hover::after { transform: translateX(120%); }
.primary:hover { background: var(--lime-hover); }

.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 var(--s4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.outline-button:hover {
  border-color: var(--forest-mid);
  background: var(--lime-muted);
  color: var(--forest);
}

.admin-form-actions,
.admin-row-actions {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
}

.admin-row-actions .outline-button { width: auto; }
.error-card .primary { margin-top: var(--s4); }

/* Cards */

.card,
.stat-card,
.document-card,
.hours-card,
.balance-card {
  border: none;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover,
.stat-card:hover,
.hours-card:hover,
.balance-card:hover,
.home-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(2, 35, 65, 0.12);
}

.card { padding: var(--s3) var(--s4); }

.card-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s2);
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--border);
}

.card-heading h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.card-heading button,
.home-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--forest-mid);
  font-size: 13px;
  font-weight: 700;
}

.home-link:hover,
.card-heading button:hover { text-decoration: underline; }

/* Section cards */

.hierarchy-grid .card,
.page-spacer.card,
.home-widget {
  padding: 0;
  overflow: hidden;
}

.page-spacer.card.punch-history-card,
.card:has(.day-timeline) {
  overflow: visible;
  position: relative;
  z-index: 4;
}

.page-spacer.card.punch-history-card:hover,
.card:has(.day-timeline):hover {
  transform: none;
}

.home-widget:nth-child(3),
.home-widget:nth-child(4) {
  background-image: linear-gradient(rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.94)), var(--bg-image-card);
  background-size: cover;
  background-position: center;
}

[data-theme="dark"] .home-widget:nth-child(3),
[data-theme="dark"] .home-widget:nth-child(4) {
  background-image: linear-gradient(rgba(18, 28, 47, 0.92), rgba(18, 28, 47, 0.92)), var(--bg-image-card);
}

.hierarchy-grid .card > :not(.card-heading),
.page-spacer.card > :not(.card-heading),
.home-widget > :not(.card-heading) {
  padding-left: var(--s4);
  padding-right: var(--s4);
}

.hierarchy-grid .card > :last-child:not(.card-heading),
.page-spacer.card > :last-child:not(.card-heading),
.home-widget > :last-child:not(.card-heading) {
  padding-bottom: var(--s4);
}

.hierarchy-grid .card > .card-heading,
.page-spacer.card > .card-heading,
.home-widget > .card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.hierarchy-grid .card > .card-heading h3,
.page-spacer.card > .card-heading h3,
.home-widget > .card-heading h3 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.hierarchy-grid .card > .card-heading + *,
.page-spacer.card > .card-heading + *,
.home-widget > .card-heading + * {
  padding-top: var(--s3);
}

/* Stats */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s3);
}

.stat-card {
  display: grid;
  padding: var(--s3);
  grid-template-columns: 40px 1fr;
  column-gap: var(--s3);
}

.stat-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--radius);
  font-size: 16px;
  grid-row: span 2;
  background: var(--lime-muted);
  color: var(--forest);
}

.stat-icon.purple, .job-icon.purple { color: var(--forest); background: var(--lime-muted); }
.stat-icon.orange, .job-icon.orange { color: #7c2d12; background: #ffedd5; }
.stat-icon.blue, .job-icon.blue { color: #1e3a5f; background: #dbeafe; }
.stat-icon.green, .job-icon.green { color: var(--forest); background: #dcfce7; }

.stat-card > span {
  align-self: end;
  font-size: 12px;
  color: var(--text-tertiary);
}

.stat-card > strong {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}

.stat-card small {
  grid-column: 1 / -1;
  margin-top: var(--s2);
  font-size: 11px;
  color: var(--success-text);
}

/* Tables */

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

.eds-table-wrap {
  overflow-x: auto;
}

.eds-table {
  min-width: 2400px;
  font-size: 11px;
}

.eds-table th,
.eds-table td {
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eds-table td.empty-cell {
  max-width: none;
  white-space: normal;
}

.eds-table th.eds-payroll,
.eds-table td.eds-payroll {
  background: #ffe566;
  color: #3a3208;
}

[data-theme="dark"] .eds-table th.eds-payroll,
[data-theme="dark"] .eds-table td.eds-payroll {
  background: #8a7410;
  color: #fff6c2;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-width: 100%;
  padding-bottom: 4px;
  cursor: grab;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: color-mix(in srgb, var(--forest) 70%, #8eb0e0) var(--surface-2);
}

.table-wrap.is-panning {
  cursor: grabbing;
  user-select: none;
}

.table-wrap::-webkit-scrollbar {
  width: 12px;
  height: 14px;
}

.table-wrap::-webkit-scrollbar-track {
  background: var(--surface-2);
  border-radius: 999px;
  margin: 0 12px 4px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--forest) 62%, #93b4e4);
  border-radius: 999px;
  border: 3px solid var(--surface-2);
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background: var(--forest-mid);
}

.table-wrap table {
  width: max-content;
  min-width: 100%;
}

.table-wrap th,
.table-wrap td {
  white-space: nowrap;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.toolbar h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

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

.punch-log {
  display: grid;
  gap: 2px;
  min-width: 148px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-muted);
}

.punch-log b {
  color: var(--text);
  font-weight: 600;
}

table { width: 100%; border-collapse: collapse; }

th {
  padding: 6px 10px;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  background: var(--table-head);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 7px 10px;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }

.person strong { color: var(--text); font-weight: 700; }
.person span { font-size: 12px; color: var(--text-tertiary); }

/* Badges */

.badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.badge.success { background: var(--lime-muted); color: var(--forest); }
.badge.warning { background: var(--warning-bg); color: var(--warning-text); }
.badge.neutral { background: var(--surface-2); color: var(--text-tertiary); }

/* Tabs */

.tabs {
  display: flex;
  gap: var(--s2);
  margin-bottom: var(--s4);
}

.tabs button {
  padding: var(--s2) var(--s4);
  border: none;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 600;
}

.tabs button.active {
  background: var(--forest-mid);
  color: #fff;
  font-weight: 700;
}

/* Pointeuse */

.clock-grid,
.feature-grid,
.hierarchy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
}

.hours-grid,
.balance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s2);
  position: relative;
  z-index: 0;
}

/* ── Timeline journée (pointeuse) ──────────────────────── */
.day-timeline {
  padding: var(--s2) 0 var(--s3);
  overflow: visible;
}

.dtl-bar-wrap {
  position: relative;
  margin: 0 0 var(--s3);
  padding-top: 48px;
  overflow: visible;
}

.dtl-bar {
  display: flex;
  height: 28px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-2);
  position: relative;
}

.dtl-hit-row {
  position: absolute;
  left: 0;
  right: 0;
  top: 48px;
  height: 28px;
  z-index: 6;
  overflow: visible;
}

.dtl-hit-row .dtl-seg {
  background: transparent;
  cursor: help;
}

.dtl-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 7px 10px;
  border-radius: 8px;
  background: #0f2744;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
  text-align: left;
  min-width: 188px;
  box-shadow: 0 8px 20px rgba(15, 39, 68, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 80;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

.dtl-tip b {
  display: block;
  font-weight: 700;
}

.dtl-hit-row .dtl-seg:first-child .dtl-tip {
  left: 0;
  transform: none;
}

.dtl-hit-row .dtl-seg:last-child .dtl-tip {
  left: auto;
  right: 0;
  transform: none;
}

.dtl-hit-row .dtl-seg:hover .dtl-tip,
.dtl-hit-row .dtl-seg:focus-visible .dtl-tip {
  opacity: 1;
  visibility: visible;
}

.dtl-hit-row .dtl-seg:hover,
.dtl-hit-row .dtl-seg:focus-visible {
  z-index: 50;
}

.dtl-seg {
  position: absolute;
  top: 0;
  height: 100%;
  min-width: 2px;
}

.dtl-seg--work   { background: #1e3a8a; }   /* En poste     – bleu foncé  */
.dtl-seg--lunch  { background: #bae6fd; }   /* Pause dej    – bleu clair  */
.dtl-seg--off    { background: #e0f2fe; }   /* Hors poste   – bleu pâle   */
.dtl-seg--future { background: #f1f5f9; }   /* Non écoulé   – gris pâle   */
.dtl-seg--late   { background: #ef4444; }   /* Retard       – rouge       */

.dtl-limit {
  position: absolute;
  top: 48px;
  width: 2px;
  height: 28px;
  background: #c2410c;
  z-index: 4;
  transform: translateX(-50%);
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.dtl-limit::after {
  display: none;
}

.dtl-bar-wrap--history .dtl-limit {
  top: 0;
  height: 14px;
}

[data-theme="dark"] .dtl-limit {
  background: #fb923c;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.6);
}

.gta-shift-table input[type="time"] {
  width: 100%;
  max-width: 160px;
}

.dtl-marker {
  position: absolute;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  top: 0;
}

.dtl-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  margin-bottom: var(--s3);
}

.dtl-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.dtl-legend-item::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.dtl-legend--work::before   { background: #1e3a8a; }
.dtl-legend--lunch::before  { background: #bae6fd; border: 1px solid #7dd3fc; }
.dtl-legend--off::before    { background: #e0f2fe; border: 1px solid #bae6fd; }
.dtl-legend--late::before   { background: #ef4444; }

.dtl-stats {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

.dtl-stat {
  font-size: 13px;
  color: var(--text-secondary);
}

.dtl-stat strong { font-weight: 700; color: var(--text); }
.dtl-stat--late strong  { color: #ef4444; }
.dtl-stat--lunch strong { color: #0284c7; }

[data-theme="dark"] .dtl-seg--work   { background: #3b82f6; }
[data-theme="dark"] .dtl-seg--lunch  { background: #1e40af; }
[data-theme="dark"] .dtl-seg--off    { background: #1e293b; }
[data-theme="dark"] .dtl-seg--future { background: #0f172a; }

.page-spacer.card.punch-history-card {
  overflow: visible;
  position: relative;
  z-index: 3;
  margin-bottom: 8px;
}

.gta-hours-grid {
  margin-top: 20px;
  position: relative;
  z-index: 1;
}

.punch-history-card > .card-heading .export-excel-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--forest);
  padding: 4px 10px;
  min-height: 26px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.punch-history-card > .card-heading .export-excel-btn:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.page-spacer.card.punch-history-card > .card-heading {
  padding: 8px 10px;
}

.page-spacer.card.punch-history-card > .punch-history-body {
  padding: 8px 10px 16px;
  overflow: visible;
}

.dtl-history-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 6px;
}

.dtl-history-legend .dtl-legend-item {
  font-size: 11px;
}

.dtl-history-legend .dtl-legend-item::before {
  width: 8px;
  height: 8px;
}

.dtl-history-scale {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px;
  align-items: end;
  margin-bottom: 2px;
}

.dtl-history-scale .dtl-markers-row {
  height: 14px;
  margin-top: 0;
}

.dtl-history-scale .dtl-marker {
  font-size: 10px;
  line-height: 1;
}

.punch-history-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: visible;
}

.dtl-history-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 16px;
  position: relative;
  overflow: visible;
}

.dtl-history-row:hover,
.dtl-history-row:focus-within {
  z-index: 40;
}

.dtl-history-date {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 0;
  font-size: 11px;
  line-height: 1;
  color: var(--text-tertiary);
}

.dtl-history-date strong {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.day-timeline--history {
  padding: 0;
  min-width: 0;
}

.dtl-bar-wrap--history {
  padding-top: 0;
  margin: 0;
  overflow: visible;
}

.day-timeline--history .dtl-bar,
.day-timeline--history .dtl-hit-row {
  height: 14px;
}

.day-timeline--history .dtl-hit-row {
  top: 0;
  overflow: visible;
  z-index: 5;
}

.day-timeline--history .dtl-hit-row .dtl-seg:hover,
.day-timeline--history .dtl-hit-row .dtl-seg:focus-visible {
  z-index: 50;
}

.day-timeline--history .dtl-bar {
  border-radius: 4px;
}

.day-timeline--history .dtl-tip {
  bottom: calc(100% + 6px);
  top: auto;
  z-index: 60;
}

@media (max-width: 780px) {
  .dtl-history-scale,
  .dtl-history-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .dtl-history-scale {
    display: none;
  }
}

/* ── Fin Timeline journée ───────────────────────────────── */

.leave-calendar-card {
  padding: 0;
  overflow: hidden;
}

.leave-cal-heading {
  flex-wrap: wrap;
  gap: var(--s3);
}

.leave-cal-nav {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.leave-cal-month {
  min-width: 9rem;
  text-align: center;
  text-transform: capitalize;
  font-size: 14px;
}

.leave-cal-note {
  margin: 0;
  padding: var(--s3) var(--s5) 0;
  font-size: 13px;
  color: var(--text-muted);
}

.leave-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  margin: var(--s4) var(--s5) var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--border);
}

.leave-cal-weekday,
.leave-cal-cell {
  min-height: 88px;
  background: var(--surface);
}

.leave-cal-weekday {
  min-height: auto;
  padding: var(--s2);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--surface-2);
}

.leave-cal-cell {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  padding: var(--s2);
}

.leave-cal-cell--empty {
  background: color-mix(in srgb, var(--surface-2) 70%, var(--surface));
}

.leave-cal-cell.is-weekend {
  background: color-mix(in srgb, var(--surface-2) 55%, var(--surface));
}

.leave-cal-cell.is-today .leave-cal-day {
  background: var(--forest-mid);
  color: #fff;
}

.leave-cal-cell.has-conflict {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, #d97706 70%, transparent);
  background: color-mix(in srgb, #d97706 10%, var(--surface));
}

.leave-cal-day {
  align-self: flex-end;
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.leave-cal-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
}

.leave-cal-event {
  display: block;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.leave-cal-event.leave-type-cp { background: #2f6f4f; }
.leave-cal-event.leave-type-rtt { background: #2563eb; }
.leave-cal-event.leave-type-sick { background: #b45309; }
.leave-cal-event.leave-type-unpaid { background: #6b7280; }
.leave-cal-event.leave-type-unjustified { background: #b91c1c; }
.leave-cal-event.leave-type-travel { background: #0f766e; }
.leave-cal-event.leave-type-hours { background: #c2410c; }

.leave-cal-event.is-pending {
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 4px,
    rgba(255, 255, 255, 0.22) 4px,
    rgba(255, 255, 255, 0.22) 8px
  );
}

.leave-cal-more {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.leave-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  padding: 0 var(--s5) var(--s5);
}

.leave-cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: 12px;
  color: var(--text-muted);
}

.leave-cal-legend-item i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.leave-cal-legend-item .leave-type-cp { background: #2f6f4f; }
.leave-cal-legend-item .leave-type-rtt { background: #2563eb; }
.leave-cal-legend-item .leave-type-sick { background: #b45309; }
.leave-cal-legend-item .leave-type-special { background: #7c3aed; }
.leave-cal-legend-item .leave-type-unjustified { background: #b91c1c; }
.leave-cal-legend-item .leave-type-travel { background: #0f766e; }
.leave-cal-legend-item .leave-type-hours { background: #c2410c; }

.leave-cal-legend-pending i {
  background: #2f6f4f;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.35) 2px,
    rgba(255, 255, 255, 0.35) 4px
  );
}

.leave-cal-legend-conflict i {
  background: color-mix(in srgb, #d97706 35%, var(--surface));
  box-shadow: inset 0 0 0 2px #d97706;
}

.hours-card,
.balance-card { padding: var(--s3) var(--s4); }

.hours-label {
  display: block;
  margin-bottom: var(--s2);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.hours-card strong {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
}

.clock-status {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  margin-bottom: var(--s4);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.clock-status-dot {
  width: 11px;
  height: 11px;
  margin-top: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-tertiary);
}

.clock-status-body {
  min-width: 0;
  flex: 1;
}

.clock-status.in {
  background: linear-gradient(135deg, rgba(0, 70, 254, 0.1), rgba(207, 224, 255, 0.42));
  border-color: rgba(0, 70, 254, 0.28);
  animation: statusPulse 2.5s ease-in-out infinite;
}

.clock-status.in .clock-status-dot {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.22);
  animation: statusDotPulse 2s ease-in-out infinite;
}

.clock-status.in strong {
  color: #022341;
}

.clock-status.in span {
  color: #1e3a5f;
}

.clock-status.done {
  background: linear-gradient(135deg, rgba(0, 70, 254, 0.08), rgba(207, 224, 255, 0.16));
  border: 1px solid rgba(0, 70, 254, 0.14);
}

.clock-status.done .clock-status-dot {
  background: var(--forest-mid);
  box-shadow: 0 0 0 4px rgba(0, 70, 254, 0.14);
}

.clock-status.out {
  background: var(--surface-2);
}

.clock-status.out .clock-status-dot {
  background: var(--text-tertiary);
}

.clock-status.break {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(254, 243, 199, 0.42));
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.clock-status.break .clock-status-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.22);
  animation: statusDotPulse 2s ease-in-out infinite;
}

.clock-status.break strong {
  color: #92400e;
}

.clock-status.break span {
  color: #b45309;
}

.clock-actions {
  display: grid;
  gap: var(--s3);
}

.clock-button.break-start {
  border: none;
  background: linear-gradient(145deg, #fbbf24, #f59e0b);
  color: #78350f;
}

.clock-button.break-start:hover {
  background: linear-gradient(145deg, #f59e0b, #d97706);
}

.clock-button.break-end {
  border: none;
  background: linear-gradient(145deg, #34d399, #10b981);
  color: #064e3b;
}

.clock-button.break-end:hover {
  background: linear-gradient(145deg, #10b981, #059669);
}

.clock-button-secondary {
  background: var(--surface-2);
  color: var(--forest-mid);
  border: 1px solid rgba(0, 70, 254, 0.2);
}

.clock-button-secondary:hover {
  background: var(--lime-muted);
}

.clock-status strong {
  display: block;
  margin-bottom: var(--s1);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.clock-status span {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.clock-button {
  width: 100%;
  min-height: 46px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 800;
}

.clock-button.in {
  border: none;
  background: var(--lime);
  color: var(--forest);
}

.clock-button.in:hover { background: var(--lime-hover); }

.clock-button.out {
  border: none;
  background: var(--forest-mid);
  color: #fff;
}

.clock-button.out:hover { background: var(--forest); }

.clock-button:disabled,
.clock-button:disabled:hover,
.clock-button.break-start:disabled,
.clock-button.break-start:disabled:hover,
.clock-button.out:disabled,
.clock-button.out:disabled:hover,
.clock-button.clock-button-secondary:disabled,
.clock-button.clock-button-secondary:disabled:hover {
  opacity: 1;
  filter: none;
  cursor: not-allowed;
  background: #d4dbe3 !important;
  color: #6b7280 !important;
  border: none;
  box-shadow: none;
  transform: none;
}

.clock-hint {
  margin-top: var(--s3);
  font-size: 12px;
  color: var(--text-tertiary);
}

.punch-list { display: grid; gap: var(--s2); }

.punch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s3);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.punch-type {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
}

.punch-type.in { background: var(--lime-muted); color: var(--forest); }
.punch-type.out { background: var(--surface); color: var(--text-secondary); }
.punch-type.break_start { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.punch-type.break_end { background: rgba(16, 185, 129, 0.16); color: #047857; }

/* Badges statut dans le tableau Historique récent */
.punch-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.punch-status--in     { background: rgba(30,58,138,.12); color: #1e3a8a; }
.punch-status--out    { background: var(--surface-2);    color: var(--text-secondary); }
.punch-status--break  { background: rgba(245,158,11,.14); color: #b45309; }
.punch-status--resume { background: rgba(16,185,129,.14); color: #047857; }

.punch-item-main {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
}

.work-location-panel {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-bottom: var(--s4);
}

.work-location-panel--readonly {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.work-location-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.work-location-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2);
}

.work-location-option {
  padding: var(--s3) var(--s4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.work-location-option.is-active {
  border-color: var(--forest-mid);
  background: var(--forest-mid);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(0, 70, 254, 0.18);
}

.work-location-option:hover:not(.is-active) {
  background: var(--surface-hover);
  border-color: var(--forest-mid);
  color: var(--text);
}

.work-location-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
}

.work-location-badge--onsite {
  background: rgba(0, 70, 254, 0.12);
  color: #0046fe;
}

.work-location-badge--remote {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

[data-theme="dark"] .work-location-option {
  background: #1e2f4d;
  border-color: #4a6a9a;
  color: #e6eefc;
}

[data-theme="dark"] .work-location-option.is-active {
  background: var(--forest-mid);
  border-color: #7aa2ff;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(122, 162, 255, 0.35);
}

[data-theme="dark"] .work-location-option:hover:not(.is-active) {
  background: #273a5c;
  border-color: #7aa2ff;
  color: #fff;
}

[data-theme="dark"] .work-location-badge--onsite {
  background: rgba(59, 123, 255, 0.22);
  color: #cfe0ff;
}

[data-theme="dark"] .work-location-badge--remote {
  background: rgba(16, 185, 129, 0.2);
  color: #86efac;
}

/* Balances */

.balance-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--s2);
}

.balance-head strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.balance-head span {
  font-size: 12px;
  color: var(--text-tertiary);
}

.balance-track {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--border);
  overflow: hidden;
}

.balance-track i {
  display: block;
  height: 100%;
  background: var(--forest-mid);
  border-radius: inherit;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.balance-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s2);
  font-size: 12px;
  color: var(--text-tertiary);
}

.balance-meta b { color: var(--text); font-weight: 700; }

/* Forms */

.feature-form { display: grid; gap: var(--s3); }

.feature-form label {
  display: grid;
  gap: var(--s2);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.feature-form input,
.feature-form select,
.feature-form textarea {
  padding: 8px var(--s3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--input-bg);
  font-size: 14px;
  font-weight: 400;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.feature-form input:focus,
.feature-form select:focus,
.feature-form textarea:focus {
  border-color: var(--forest-mid);
  box-shadow: 0 0 0 3px var(--brand-glow);
  outline: none;
}

.feature-form textarea {
  min-height: 88px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
}

.form-card { padding: var(--s4); }

.file-upload input[type="file"] {
  width: 100%;
  padding: var(--s3);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  font-size: 13px;
}

.file-upload input[type="file"]::file-selector-button {
  margin-right: var(--s3);
  padding: 7px var(--s3);
  border: none;
  border-radius: var(--radius);
  background: var(--lime);
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.file-upload-hint {
  margin-top: var(--s1);
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Notes */

.data-note {
  margin-bottom: var(--s4);
  padding: var(--s3) var(--s4);
  border-radius: var(--radius-lg);
  background: var(--lime-muted);
  color: var(--forest);
  font-size: 13px;
  font-weight: 600;
}

.data-note.demo {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.hierarchy-meta {
  margin-top: var(--s3);
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.55;
}

.hierarchy-grid .card > .hierarchy-meta,
.page-spacer.card > .hierarchy-meta {
  padding-bottom: var(--s4);
}

/* Hierarchy */

.chain-list,
.team-list {
  display: grid;
  gap: var(--s2);
  padding-bottom: var(--s4);
}

.org-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 0 var(--s5) var(--s5);
  padding: var(--s6) var(--s4) var(--s7);
  border-radius: 20px;
  background-color: var(--surface-2);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(0, 70, 254, 0.14), transparent 68%),
    radial-gradient(circle, rgba(0, 70, 254, 0.07) 1px, transparent 1px),
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  background-size: auto, 22px 22px, auto;
  border: 1px solid rgba(0, 70, 254, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 14px 40px rgba(0, 70, 254, 0.08);
  perspective: 1400px;
  transform-style: preserve-3d;
  overflow-x: auto;
}

[data-theme="dark"] .org-tree {
  background-color: rgba(18, 28, 47, 0.95);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(59, 123, 255, 0.18), transparent 68%),
    radial-gradient(circle, rgba(59, 123, 255, 0.1) 1px, transparent 1px),
    linear-gradient(180deg, rgba(18, 28, 47, 0.98) 0%, var(--surface) 100%);
  border-color: rgba(59, 123, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 48px rgba(0, 0, 0, 0.35);
}

.org-tree > .org-branch {
  align-items: center;
}

.org-branch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-style: preserve-3d;
}

.org-node {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hierarchy-org-card .org-pyramid-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 172px);
  padding: var(--s4) var(--s3) var(--s3);
  border-radius: 18px;
  border: 1px solid rgba(0, 70, 254, 0.14);
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.92) 0%, var(--surface-2) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 6px 14px rgba(0, 22, 44, 0.07),
    0 18px 36px rgba(0, 70, 254, 0.11);
  text-align: center;
  transform: translateZ(0);
  transform-style: preserve-3d;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.25s ease;
}

.org-pyramid-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 168px);
  padding: var(--s4) var(--s3) var(--s3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, var(--surface) 0%, var(--surface-2) 100%);
  box-shadow:
    0 4px 8px rgba(0, 22, 44, 0.06),
    0 12px 28px rgba(0, 70, 254, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  text-align: center;
  transform: translateZ(0);
  transform-style: preserve-3d;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.25s ease;
}

.hierarchy-org-card .org-pyramid-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.42) 0%, transparent 58%);
  pointer-events: none;
}

.hierarchy-org-card .org-pyramid-card::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: -10px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 70, 254, 0.22), transparent 72%);
  pointer-events: none;
  filter: blur(2px);
}

.hierarchy-org-card .org-pyramid-card:hover {
  transform: translateY(-8px) rotateX(4deg) translateZ(16px);
  border-color: rgba(0, 70, 254, 0.34);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 12px 22px rgba(0, 22, 44, 0.1),
    0 28px 52px rgba(0, 70, 254, 0.18);
}

.hierarchy-org-card .org-pyramid-card.has-team {
  border-color: rgba(0, 70, 254, 0.28);
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.95) 0%, var(--lime-muted) 145%);
  box-shadow:
    inset 0 3px 0 var(--forest-mid),
    0 6px 14px rgba(0, 22, 44, 0.07),
    0 18px 36px rgba(0, 70, 254, 0.14);
}

.hierarchy-org-card .org-pyramid-card.is-me {
  border-color: rgba(0, 70, 254, 0.42);
  background: linear-gradient(168deg, var(--lime-muted) 0%, var(--surface) 100%);
  box-shadow:
    0 0 0 2px rgba(0, 70, 254, 0.16),
    0 0 24px rgba(0, 70, 254, 0.14),
    0 10px 28px rgba(0, 70, 254, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.org-pyramid-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 55%);
  pointer-events: none;
}

.org-pyramid-card:hover {
  transform: translateY(-6px) rotateX(3deg) translateZ(14px);
  border-color: rgba(0, 70, 254, 0.3);
  box-shadow:
    0 8px 16px rgba(0, 22, 44, 0.1),
    0 22px 44px rgba(0, 70, 254, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.org-branch[data-depth="0"] .org-pyramid-card:hover {
  transform: translateY(-8px) rotateX(3deg) translateZ(24px);
}

.org-pyramid-card.has-team {
  border-color: rgba(0, 70, 254, 0.24);
  background: linear-gradient(165deg, var(--surface) 0%, var(--lime-muted) 140%);
}

.org-pyramid-card.is-me {
  border-color: rgba(0, 70, 254, 0.38);
  background: linear-gradient(165deg, var(--lime-muted) 0%, var(--surface) 100%);
  box-shadow:
    0 0 0 2px rgba(0, 70, 254, 0.14),
    0 8px 24px rgba(0, 70, 254, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.hierarchy-org-card .org-card-avatar {
  display: grid;
  place-items: center;
  margin-bottom: var(--s3);
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--forest-mid), #6b9fff);
  box-shadow: 0 8px 18px rgba(0, 70, 254, 0.22);
}

.org-card-avatar {
  display: grid;
  place-items: center;
  margin-bottom: var(--s3);
}

.hierarchy-org-card .avatar.org-avatar {
  width: 54px;
  min-width: 54px;
  height: 54px;
  border: 2px solid var(--surface);
  font-size: 15px;
  box-shadow:
    0 2px 8px rgba(0, 22, 44, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.avatar.org-avatar {
  display: inline-grid;
  place-items: center;
  width: 52px;
  min-width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.03em;
  text-align: center;
  box-shadow:
    0 4px 12px rgba(0, 22, 44, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateZ(10px);
}

.hierarchy-org-card .org-branch[data-depth="0"] .avatar.org-avatar {
  width: 68px;
  min-width: 68px;
  height: 68px;
  font-size: 19px;
}

.org-branch[data-depth="0"] .avatar.org-avatar {
  width: 64px;
  min-width: 64px;
  height: 64px;
  font-size: 18px;
}

.org-card-info {
  width: 100%;
  min-width: 0;
}

.org-card-info strong,
.org-card-info span,
.org-card-info small {
  display: block;
  text-align: center;
}

.org-card-info strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.org-card-info span {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.hierarchy-org-card .org-card-info small {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(0, 70, 254, 0.08);
  border: 1px solid rgba(0, 70, 254, 0.12);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.org-card-info small {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.org-expand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--s3);
  padding: 4px 10px 4px 6px;
  border: 1px solid rgba(0, 70, 254, 0.2);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--forest-mid);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.org-expand:hover {
  background: var(--lime-muted);
  border-color: rgba(0, 70, 254, 0.3);
  transform: translateY(-1px);
}

.org-team-count-static {
  margin-top: var(--s3);
}

.hierarchy-org-card .org-branch[data-depth="0"] .org-pyramid-card {
  width: min(100%, 196px);
  transform: translateZ(22px) scale(1.04);
}

.hierarchy-org-card .org-branch[data-depth="1"] .org-pyramid-card {
  transform: translateZ(14px) scale(1);
}

.hierarchy-org-card .org-branch[data-depth="2"] .org-pyramid-card {
  transform: translateZ(8px) scale(0.97);
}

.hierarchy-org-card .org-branch[data-depth="3"] .org-pyramid-card,
.hierarchy-org-card .org-branch[data-depth="4"] .org-pyramid-card {
  transform: translateZ(4px) scale(0.94);
}

.hierarchy-org-card .org-branch[data-depth="0"] .org-pyramid-card:hover {
  transform: translateY(-10px) rotateX(4deg) translateZ(28px) scale(1.04);
}

.org-branch[data-depth="0"] .org-pyramid-card {
  width: min(100%, 188px);
  transform: translateZ(20px);
}

.org-branch[data-depth="1"] .org-pyramid-card {
  transform: translateZ(12px);
}

.org-branch[data-depth="2"] .org-pyramid-card {
  transform: translateZ(6px);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: var(--s4);
  padding: 0 var(--s5) var(--s5);
}

.team-card-wrap {
  display: flex;
  justify-content: center;
}

.team-card-wrap .org-pyramid-card {
  width: 100%;
  max-width: 180px;
}

.chain-item .avatar.org-avatar,
.team-item .avatar.org-avatar {
  flex-shrink: 0;
}

.hierarchy-org-card {
  overflow: visible;
  perspective: 1200px;
  border: 1px solid rgba(0, 70, 254, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 120px),
    var(--surface);
  box-shadow:
    0 10px 30px rgba(0, 22, 44, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

[data-theme="dark"] .hierarchy-org-card {
  border-color: rgba(59, 123, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(59, 123, 255, 0.08), transparent 140px),
    var(--surface);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hierarchy-org-heading {
  align-items: center;
}

.hierarchy-result-count {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--lime-muted);
  color: var(--forest);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.hierarchy-search {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: 0 var(--s5) var(--s4);
  padding: 0 var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hierarchy-search:focus-within {
  border-color: var(--forest-mid);
  box-shadow: 0 0 0 3px rgba(0, 70, 254, 0.12);
}

.hierarchy-search-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 2px solid var(--text-tertiary);
  border-radius: 50%;
  position: relative;
}

.hierarchy-search-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  background: var(--text-tertiary);
  border-radius: 1px;
  right: -5px;
  bottom: -2px;
  transform: rotate(45deg);
}

.hierarchy-search input {
  width: 100%;
  padding: 12px 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.hierarchy-search input:focus {
  outline: none;
}

.hierarchy-search input::placeholder {
  color: var(--text-tertiary);
}

.org-node-row {
  display: flex;
  align-items: stretch;
  gap: var(--s2);
}

.hierarchy-org-card .org-children {
  padding: 32px 0 0;
}

.hierarchy-org-card .org-branch:not(.is-collapsed) > .org-children::before {
  width: 3px;
  height: 32px;
  background: linear-gradient(180deg, var(--forest-mid), rgba(0, 70, 254, 0.35));
  box-shadow: 0 0 14px rgba(59, 123, 255, 0.35);
}

.hierarchy-org-card .org-children > .org-branch {
  padding: 32px 16px 0;
}

.hierarchy-org-card .org-children > .org-branch::before {
  width: 3px;
  height: 32px;
  box-shadow:
    0 0 0 3px var(--surface-2),
    0 0 10px rgba(59, 123, 255, 0.35);
}

.hierarchy-org-card .org-children > .org-branch::after {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--forest-mid) 15%, var(--forest-mid) 85%, transparent);
  box-shadow: 0 0 10px rgba(59, 123, 255, 0.2);
}

.org-children {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  margin: 0;
  padding: 28px 0 0;
  border: none;
  background: none;
  box-shadow: none;
  transform: none;
}

.org-branch:not(.is-collapsed) > .org-children::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 28px;
  background: linear-gradient(180deg, var(--forest-mid), rgba(0, 70, 254, 0.45));
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(59, 123, 255, 0.25);
}

.org-children > .org-branch {
  padding: 28px 14px 0;
  position: relative;
}

.org-children > .org-branch::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 28px;
  background: linear-gradient(180deg, rgba(0, 70, 254, 0.45), var(--forest-mid));
  border-radius: 2px;
}

.org-children > .org-branch::after {
  content: "";
  position: absolute;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--forest-mid) 20%, var(--forest-mid) 80%, transparent);
}

.org-children > .org-branch:only-child::after {
  display: none;
}

.org-children > .org-branch:first-child:not(:only-child)::after {
  left: 50%;
  right: 0;
}

.org-children > .org-branch:last-child:not(:only-child)::after {
  left: 0;
  right: 50%;
}

.org-children > .org-branch:not(:first-child):not(:last-child)::after {
  left: 0;
  right: 0;
}

.org-toggle,
.org-toggle-spacer {
  flex-shrink: 0;
  width: 34px;
  margin-top: 6px;
}

.org-toggle {
  display: grid;
  place-items: center;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--forest-mid);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.org-toggle:hover {
  background: var(--lime-muted);
  border-color: rgba(0, 70, 254, 0.25);
}

.org-toggle-icon {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 0.2s ease;
}

.org-expand .org-toggle-icon {
  transform: rotate(45deg) translate(-1px, -2px);
}

.org-branch.is-collapsed .org-toggle-icon {
  transform: rotate(-45deg) translate(1px, 1px);
}

.org-branch.is-collapsed .org-children {
  display: none;
}

.org-branch.is-collapsed .org-expand .org-toggle-icon {
  transform: rotate(-90deg);
}

.org-team-count {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--forest-mid);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.chain-item,
.team-item,
.org-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  box-shadow:
    0 2px 4px rgba(0, 22, 44, 0.05),
    0 8px 20px rgba(0, 22, 44, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transform: translateZ(0);
  transform-style: preserve-3d;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.chain-item::before,
.team-item::before,
.org-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0%, transparent 52%);
  pointer-events: none;
}

.chain-item:hover,
.team-item:hover,
.org-card:hover {
  transform: translateY(-4px) rotateX(2deg) translateZ(10px);
  border-color: rgba(0, 70, 254, 0.28);
  box-shadow:
    0 6px 12px rgba(0, 22, 44, 0.08),
    0 18px 36px rgba(0, 70, 254, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.chain-item.is-me,
.org-card.is-me {
  background: linear-gradient(145deg, var(--lime-muted) 0%, var(--surface) 100%);
  border-color: rgba(0, 70, 254, 0.3);
  box-shadow:
    inset 4px 0 0 var(--forest-mid),
    0 4px 14px rgba(0, 70, 254, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.chain-item > div,
.team-item > div,
.org-card > div {
  min-width: 0;
  flex: 1;
}

.chain-item strong,
.team-item strong,
.org-card strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.chain-item span,
.team-item span,
.org-card span {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
}

.org-card small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-tertiary);
}

.hierarchy-org-card .org-expand {
  margin-top: var(--s3);
  padding: 5px 12px 5px 7px;
  border-color: rgba(0, 70, 254, 0.24);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: 0 2px 8px rgba(0, 70, 254, 0.1);
}

.hierarchy-org-card .org-team-count {
  min-width: 22px;
  height: 22px;
  background: linear-gradient(145deg, var(--forest-mid), #3b7bff);
}

.hierarchy-org-card .hierarchy-result-count {
  background: linear-gradient(135deg, rgba(0, 70, 254, 0.12), rgba(207, 224, 255, 0.45));
  border: 1px solid rgba(0, 70, 254, 0.16);
  box-shadow: 0 2px 8px rgba(0, 70, 254, 0.1);
}

.hierarchy-org-card .hierarchy-search {
  border-color: rgba(0, 70, 254, 0.14);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

[data-theme="dark"] .hierarchy-org-card .org-pyramid-card {
  background: linear-gradient(168deg, rgba(32, 48, 78, 0.98) 0%, rgba(18, 28, 47, 0.98) 100%);
  border-color: rgba(59, 123, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 8px 18px rgba(0, 0, 0, 0.28),
    0 20px 40px rgba(0, 0, 0, 0.32);
}

[data-theme="dark"] .hierarchy-org-card .org-pyramid-card::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, transparent 58%);
}

[data-theme="dark"] .hierarchy-org-card .org-pyramid-card::after {
  background: radial-gradient(ellipse, rgba(59, 123, 255, 0.28), transparent 72%);
}

[data-theme="dark"] .hierarchy-org-card .org-pyramid-card.has-team {
  background: linear-gradient(168deg, rgba(32, 48, 78, 0.98) 0%, rgba(21, 41, 72, 0.96) 145%);
  box-shadow:
    inset 0 3px 0 var(--forest-mid),
    0 8px 18px rgba(0, 0, 0, 0.28),
    0 20px 40px rgba(59, 123, 255, 0.12);
}

[data-theme="dark"] .hierarchy-org-card .org-pyramid-card.is-me {
  box-shadow:
    0 0 0 2px rgba(59, 123, 255, 0.24),
    0 0 28px rgba(59, 123, 255, 0.18),
    0 12px 32px rgba(59, 123, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .hierarchy-org-card .org-card-avatar {
  background: linear-gradient(145deg, #3b7bff, #7ba7ff);
  box-shadow: 0 8px 20px rgba(59, 123, 255, 0.28);
}

[data-theme="dark"] .hierarchy-org-card .avatar.org-avatar {
  border-color: rgba(18, 28, 47, 0.95);
}

[data-theme="dark"] .hierarchy-org-card .org-card-info small {
  background: rgba(59, 123, 255, 0.14);
  border-color: rgba(59, 123, 255, 0.22);
  color: #cfe0ff;
}

[data-theme="dark"] .hierarchy-org-card .org-children > .org-branch::before {
  box-shadow:
    0 0 0 3px rgba(18, 28, 47, 0.95),
    0 0 12px rgba(59, 123, 255, 0.4);
}

[data-theme="dark"] .org-pyramid-card {
  background: linear-gradient(165deg, rgba(26, 39, 64, 0.98) 0%, var(--surface-2) 100%);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.25),
    0 14px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .org-pyramid-card::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 55%);
}

[data-theme="dark"] .org-pyramid-card.has-team {
  background: linear-gradient(165deg, rgba(26, 39, 64, 0.98) 0%, rgba(21, 41, 72, 0.95) 140%);
  border-color: rgba(59, 123, 255, 0.28);
}

[data-theme="dark"] .org-pyramid-card.is-me {
  background: linear-gradient(165deg, rgba(21, 41, 72, 0.95) 0%, rgba(26, 39, 64, 0.98) 100%);
  box-shadow:
    0 0 0 2px rgba(59, 123, 255, 0.2),
    0 10px 28px rgba(59, 123, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .org-pyramid-card:hover {
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.35),
    0 24px 48px rgba(59, 123, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .avatar.org-avatar {
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .org-expand {
  background: var(--surface-2);
  border-color: rgba(59, 123, 255, 0.28);
}

[data-theme="dark"] .org-card.has-team {
  background: linear-gradient(145deg, var(--surface) 0%, rgba(26, 39, 64, 0.95) 130%);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.2),
    0 12px 28px rgba(0, 70, 254, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .chain-item,
[data-theme="dark"] .team-item,
[data-theme="dark"] .org-card {
  background: linear-gradient(160deg, rgba(26, 39, 64, 0.95) 0%, var(--surface-2) 100%);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.22),
    0 10px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .chain-item::before,
[data-theme="dark"] .team-item::before,
[data-theme="dark"] .org-card::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 52%);
}

[data-theme="dark"] .chain-item:hover,
[data-theme="dark"] .team-item:hover,
[data-theme="dark"] .org-card:hover {
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.3),
    0 20px 40px rgba(59, 123, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .hierarchy-search {
  background: var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .clock-status.in {
  background: linear-gradient(135deg, rgba(59, 123, 255, 0.28), rgba(18, 28, 47, 0.98));
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow:
    0 4px 18px rgba(59, 123, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .clock-status.in strong {
  color: #ffffff;
}

[data-theme="dark"] .clock-status.in span {
  color: #cfe0ff;
}

[data-theme="dark"] .clock-status.in .clock-status-dot {
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.28);
}

[data-theme="dark"] .clock-status.done {
  background: linear-gradient(135deg, rgba(59, 123, 255, 0.14), rgba(26, 39, 64, 0.9));
  border-color: rgba(59, 123, 255, 0.22);
}

[data-theme="dark"] .clock-status.done strong {
  color: #ffffff;
}

[data-theme="dark"] .clock-status.out {
  background: var(--surface-2);
  border-color: var(--border);
}

[data-theme="dark"] .clock-status.out strong {
  color: var(--text);
}

[data-theme="dark"] .clock-status.break {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(26, 39, 64, 0.95));
  border-color: rgba(251, 191, 36, 0.35);
}

[data-theme="dark"] .clock-status.break strong {
  color: #fde68a;
}

[data-theme="dark"] .clock-status.break span {
  color: #fcd34d;
}

[data-theme="dark"] .clock-button-secondary {
  background: var(--surface-2);
  color: #cfe0ff;
  border-color: rgba(59, 123, 255, 0.28);
}

.org-toggle {
  box-shadow:
    0 2px 4px rgba(0, 22, 44, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.org-toggle:hover {
  transform: translateY(-1px);
  box-shadow:
    0 4px 10px rgba(0, 70, 254, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.org-team-count {
  box-shadow:
    0 2px 6px rgba(0, 70, 254, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.team-punches-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
}

.team-punches-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--s4);
}

.team-punch-summary-card {
  display: grid;
  gap: var(--s2);
  padding: var(--s4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, var(--surface) 0%, var(--surface-2) 100%);
  box-shadow: 0 4px 14px rgba(0, 22, 44, 0.06);
}

.team-punch-summary-card span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.team-punch-summary-card strong {
  font-size: 24px;
  font-weight: 800;
  color: var(--forest-mid);
  letter-spacing: -0.03em;
}

.team-punch-summary-card small {
  font-size: 12px;
  color: var(--text-tertiary);
}

.team-punches-filter .outline-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.punch-rectify-btn {
  white-space: nowrap;
  padding: 6px 10px;
  font-size: 0.85rem;
}

.punch-rectify-overlay {
  position: fixed;
  inset: 0;
  z-index: 850;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 35, 65, 0.48);
  backdrop-filter: blur(4px);
}

.punch-rectify-card {
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line, rgba(15, 23, 42, 0.08));
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
}

.punch-rectify-card h3 {
  margin: 0;
  color: var(--brand, #1b4f72);
}

.punch-rectify-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Theme toggle */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 600;
}

.theme-toggle-track {
  position: relative;
  width: 30px;
  height: 18px;
  border-radius: var(--radius-pill);
  background: var(--border);
  transition: background var(--transition);
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface);
  transition: transform 0.15s ease;
}

[data-theme="dark"] .theme-toggle-track { background: var(--forest-mid); }
[data-theme="dark"] .theme-toggle-thumb { transform: translateX(12px); }

.theme-toggle-label { min-width: 38px; }
[data-theme="light"] .theme-toggle-label::after { content: "Clair"; }
[data-theme="dark"] .theme-toggle-label::after { content: "Sombre"; }

/* Accueil */

.home-welcome {
  margin-bottom: var(--s3);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--border);
}

.home-title {
  margin: 0 0 var(--s2);
  font-size: 32px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.home-title b {
  font-weight: 800;
  color: var(--forest-mid);
}

.home-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s3);
}

.home-widget { min-height: 0; }

.home-day-wrap {
  display: flex;
  justify-content: center;
}

.home-day-widget {
  width: min(100%, 1320px);
  min-height: 0;
}

.home-day-widget .home-clock {
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: var(--s5);
}

.home-clock-status {
  margin-bottom: var(--s3);
}

.home-shift-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s2);
  margin-bottom: var(--s4);
}

.home-shift-item {
  padding: var(--s3);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  text-align: center;
}

.home-shift-item span {
  display: block;
  margin-bottom: var(--s1);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.home-shift-item strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.home-hours-today {
  margin: 0 0 var(--s4);
  font-size: 13px;
  color: var(--text-tertiary);
}

.home-hours-today b {
  color: var(--text);
  font-weight: 800;
}

.home-balance-list { display: grid; gap: var(--s2); }

.home-balance-item {
  padding: var(--s3);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.home-balance-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--s2);
  font-size: 12px;
  color: var(--text-tertiary);
}

.home-balance-head strong {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.home-balance-item small {
  display: block;
  margin-top: var(--s2);
  font-size: 11px;
}

.home-alerts-widget {
  grid-column: 1 / -1;
}

.hr-alert-list {
  display: grid;
  gap: var(--s2);
}

.hr-alert-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  border-left: 3px solid transparent;
}

.hr-alert-item.is-unread {
  border-left-color: var(--amber, #d97706);
  background: color-mix(in srgb, var(--amber, #d97706) 8%, var(--surface-2));
}

.hr-alert-item.is-read {
  opacity: 0.75;
}

.hr-alert-heading-actions {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.hr-alert-delete-all {
  color: var(--error-text, #b42318);
}

.hr-alert-actions {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  flex-shrink: 0;
}

.hr-alert-delete-btn {
  color: var(--error-text, #b42318);
  border-color: color-mix(in srgb, var(--error-text, #b42318) 35%, var(--border));
}

.hr-alert-item strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.hr-alert-item p {
  margin: var(--s1) 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.hr-alert-item small {
  display: block;
  margin-top: var(--s2);
  font-size: 11px;
  color: var(--text-muted);
}

.home-doc-list,
.home-payslip-list { display: grid; gap: var(--s2); }

.home-doc-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  color: inherit;
  text-decoration: none;
  transition: background var(--transition);
}

.home-doc-item:hover { background: var(--lime-muted); }

.file-mark {
  width: 4px;
  height: 24px;
  border-radius: 2px;
  background: var(--forest-mid);
  flex-shrink: 0;
}

.home-doc-item strong,
.home-payslip-item strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.home-doc-item span,
.home-payslip-item span {
  font-size: 12px;
  color: var(--text-tertiary);
}

.home-payslip-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.payslip-month {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--lime-muted);
  color: var(--forest);
  font-size: 10px;
  font-weight: 800;
  text-transform: capitalize;
}

.home-payslip-btn {
  padding: 6px 12px;
  border-radius: var(--radius);
  border: none;
  background: var(--lime);
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.home-payslip-btn:hover { background: var(--lime-hover); }

.backdrop { display: none; }

/* ── Animations dynamiques ── */

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes blobFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.08); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

@keyframes blobFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-25px, 25px) scale(1.1); }
}

@keyframes blobFloat3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(15px, -30px) rotate(8deg); }
}

@keyframes slowPan {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.08) translate(-2%, 1.5%); }
}

@keyframes softDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(1.5%, -1.5%, 0) scale(1.04); }
}

@keyframes textGlow {
  0%, 100% { color: var(--lime); text-shadow: 0 0 0 transparent; }
  50% { color: #cfe0ff; text-shadow: 0 0 20px rgba(59, 123, 255, 0.35); }
}

@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 123, 255, 0); }
  50% { box-shadow: 0 0 0 6px rgba(59, 123, 255, 0.22); }
}

@keyframes statusDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.85; }
}

@keyframes loaderPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.7; }
}

.page-content.is-animating {
  perspective: 1200px;
}

.page-content.is-animating > *,
.page-content.is-animating .home-grid > *,
.page-content.is-animating .hierarchy-grid > *,
.page-content.is-animating .hours-grid > *,
.page-content.is-animating .balance-grid > *,
.page-content.is-animating .clock-grid > *,
.page-content.is-animating .feature-grid > * {
  animation: welcomeCardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: center top;
}

.page-content.is-animating > *:nth-child(1),
.page-content.is-animating .home-grid > *:nth-child(1),
.page-content.is-animating .hierarchy-grid > *:nth-child(1) { animation-delay: 0.05s; }

.page-content.is-animating > *:nth-child(2),
.page-content.is-animating .home-grid > *:nth-child(2),
.page-content.is-animating .hierarchy-grid > *:nth-child(2) { animation-delay: 0.1s; }

.page-content.is-animating > *:nth-child(3),
.page-content.is-animating .home-grid > *:nth-child(3) { animation-delay: 0.15s; }

.page-content.is-animating > *:nth-child(4),
.page-content.is-animating .home-grid > *:nth-child(4) { animation-delay: 0.2s; }

.page-content.is-animating > *:nth-child(5) { animation-delay: 0.25s; }

.loader { animation: spin 0.7s linear infinite, loaderPulse 1.2s ease-in-out infinite; }

.nav-badge {
  animation: badgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes badgePop {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.chain-item,
.team-item,
.org-card,
.home-doc-item,
.punch-item {
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.25s ease,
    box-shadow 0.35s ease,
    border-color 0.25s ease;
}

.home-doc-item:hover,
.punch-item:hover {
  transform: translateX(4px);
}

/* Welcome popup (Microsoft login) */

.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--s5);
  background: var(--backdrop);
  opacity: 0;
  transition: opacity 0.45s ease;
  backdrop-filter: blur(6px);
}

.welcome-overlay.is-visible {
  opacity: 1;
}

.welcome-overlay.is-closing {
  opacity: 0;
  pointer-events: none;
}

.welcome-scene {
  position: relative;
  width: min(100%, 420px);
  perspective: 1200px;
  transform-style: preserve-3d;
}

.welcome-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.55;
  pointer-events: none;
}

.welcome-orb-1 {
  width: 180px;
  height: 180px;
  top: -40px;
  right: -20px;
  background: var(--forest-mid);
  animation: welcomeOrbFloat1 8s ease-in-out infinite;
}

.welcome-orb-2 {
  width: 140px;
  height: 140px;
  bottom: -30px;
  left: -10px;
  background: var(--lime);
  animation: welcomeOrbFloat2 10s ease-in-out infinite;
}

.welcome-card {
  position: relative;
  transform-style: preserve-3d;
  animation: welcomeCardIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.welcome-overlay.is-visible .welcome-card {
  animation: welcomeCardIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) both,
    welcomeCardFloat 5s ease-in-out 0.85s infinite;
}

.welcome-card-face {
  position: relative;
  padding: clamp(var(--s5), 4vw, 36px);
  border-radius: 20px;
  text-align: center;
  background: linear-gradient(155deg, var(--surface) 0%, var(--lime-muted) 100%);
  border: 1px solid var(--border);
  box-shadow:
    0 28px 60px rgba(2, 35, 65, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  overflow: hidden;
  transform: translateZ(0);
}

.welcome-card-face::before {
  content: "";
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(
    115deg,
    transparent 38%,
    rgba(255, 255, 255, 0.42) 50%,
    transparent 62%
  );
  transform: translateX(-120%) rotate(12deg);
  animation: welcomeShine 2.8s ease-in-out 0.4s 1;
  pointer-events: none;
}

.welcome-logo {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto var(--s4);
  place-items: center;
  border-radius: 16px;
  background-image: var(--logo-image);
  background-size: cover;
  background-position: center;
  box-shadow: 0 12px 28px rgba(0, 70, 254, 0.28);
  animation: welcomeLogoPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

.welcome-eyebrow {
  margin: 0 0 var(--s2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--forest-mid);
}

.welcome-card h2 {
  margin: 0;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
}

.welcome-card h2 b {
  font-weight: 800;
  color: var(--forest-mid);
}

.welcome-text {
  margin: var(--s3) 0 var(--s5);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.welcome-cta {
  min-width: 160px;
  animation: welcomeCtaIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both;
}

[data-theme="dark"] .welcome-card-face {
  background: linear-gradient(155deg, var(--surface) 0%, #1a2740 100%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

@keyframes welcomeCardIn {
  from {
    opacity: 0;
    transform: rotateX(28deg) rotateY(-12deg) translateY(40px) scale(0.88);
  }
  to {
    opacity: 1;
    transform: rotateX(0deg) rotateY(0deg) translateY(0) scale(1);
  }
}

@keyframes humanaPanel3DIn {
  from {
    opacity: 0;
    transform: rotateX(20deg) rotateY(-10deg) translateX(-16px) translateY(12px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: rotateX(0deg) rotateY(0deg) translateX(0) translateY(0) scale(1);
  }
}

@keyframes menuTextureDrift {
  0% { background-position: center, 0% 0%; }
  100% { background-position: center, 100% 100%; }
}

@keyframes menuAurora {
  0% { background-position: 0% 0%; }
  25% { background-position: 100% 25%; }
  50% { background-position: 55% 100%; }
  75% { background-position: 15% 70%; }
  100% { background-position: 0% 0%; }
}

@keyframes menuActivePulse {
  0%, 100% {
    opacity: 0.72;
    height: 52%;
    box-shadow: 0 0 8px rgba(59, 123, 255, 0.5);
  }
  50% {
    opacity: 1;
    height: 68%;
    box-shadow: 0 0 16px rgba(59, 123, 255, 0.9);
  }
}

@keyframes welcomeCardFloat {
  0%, 100% { transform: rotateX(0deg) rotateY(0deg) translateY(0); }
  50% { transform: rotateX(2deg) rotateY(-2deg) translateY(-6px); }
}

@keyframes welcomeLogoPop {
  from { opacity: 0; transform: scale(0.4) translateZ(-40px); }
  to { opacity: 1; transform: scale(1) translateZ(0); }
}

@keyframes welcomeCtaIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes welcomeShine {
  from { transform: translateX(-120%) rotate(12deg); }
  to { transform: translateX(120%) rotate(12deg); }
}

@keyframes welcomeOrbFloat1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-12px, 10px); }
}

@keyframes welcomeOrbFloat2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10px, -8px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .sidebar nav button:hover,
  .sidebar nav button.active { transform: none; }

  .card:hover,
  .home-widget:hover { transform: none; }
}

/* Responsive */

@media (max-width: 1050px) {
  .clock-grid, .feature-grid, .hierarchy-grid, .home-grid { grid-template-columns: 1fr; }
  .hours-grid, .balance-grid { grid-template-columns: 1fr; }
  .leave-cal-cell { min-height: 72px; }
  .leave-cal-heading { flex-direction: column; align-items: flex-start; }
  .leave-cal-nav { width: 100%; justify-content: space-between; }
  .home-shift-summary { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; }
  .mobile-brand { display: flex; justify-content: center; margin-bottom: var(--s6); }

  .sidebar {
    transform: translateX(-102%);
    transition: transform 0.22s ease;
  }

  .sidebar.open { transform: translateX(0); }

  .close-menu {
    position: absolute;
    top: var(--s4);
    right: var(--s4);
    display: block;
    width: 32px;
    height: 32px;
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius);
    background: transparent;
    color: transparent;
    font-size: 0;
  }

  .close-menu::before,
  .close-menu::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 1.5px;
    background: var(--sidebar-text);
  }

  .close-menu::before { transform: translate(-50%, -50%) rotate(45deg); }
  .close-menu::after { transform: translate(-50%, -50%) rotate(-45deg); }

  .sidebar.open + .backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: block;
    border: none;
    background: var(--backdrop);
  }

  .main-content { margin-left: 0; }
  .topbar { padding: 0 var(--s4); }

  .menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: var(--radius);
    background: var(--forest-mid);
    color: #ffffff;
    position: relative;
  }

  .menu-button::before {
    content: "";
    width: 14px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
  }
}

@media (max-width: 540px) {
  .page { padding: var(--s5) var(--s4) var(--s6); }
  .home-title { font-size: 26px; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* Tableau de bord Global */

.app-shell[data-current-page="global"] .page {
  max-width: 1640px;
  width: min(1640px, calc(100% - 32px));
}

.global-kpi-grid {
  display: grid;
  gap: var(--s3);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: var(--s5);
}

.global-kpi-card {
  position: relative;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(2, 35, 65, 0.05);
  overflow: hidden;
}

.global-kpi-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(0, 70, 254, 0.05), transparent 65%);
}

.global-kpi-card--primary {
  background: linear-gradient(135deg, rgba(0, 70, 254, 0.12), rgba(59, 123, 255, 0.05));
  border-color: rgba(0, 70, 254, 0.22);
}

.global-kpi-card--warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(254, 243, 199, 0.35));
  border-color: rgba(245, 158, 11, 0.3);
}

.global-kpi-card--accent {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(209, 250, 229, 0.35));
  border-color: rgba(16, 185, 129, 0.28);
}

.global-kpi-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.global-kpi-value {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.global-kpi-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.global-charts-grid {
  display: grid;
  gap: var(--s5);
  margin-top: var(--s5);
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  grid-auto-rows: auto;
}

.global-charts-grid > .global-chart-card {
  grid-column: 1;
}

.global-charts-grid > .global-donut-card {
  grid-column: 2;
}

.global-charts-grid > .global-top-card,
.global-charts-grid > .global-dept-card {
  grid-column: span 1;
}

.global-chart-card,
.global-donut-card,
.global-top-card,
.global-dept-card {
  padding: 20px;
}

.global-chart-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s3);
}

.global-chart-heading h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.global-chart-heading p {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.global-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-secondary);
}

.global-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.global-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

.global-swatch--planned { background: rgba(148, 163, 184, 0.55); }
.global-swatch--worked { background: var(--forest-mid); }

.global-chart-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;
}

.global-chart-svg {
  width: 100%;
  height: 100%;
}

.global-bar-planned { fill: rgba(148, 163, 184, 0.45); }
.global-bar-worked { fill: var(--forest-mid); }

.global-bar-group:hover .global-bar-worked { fill: var(--lime); }
.global-bar-group:hover .global-bar-planned { fill: rgba(148, 163, 184, 0.7); }

.global-bar-label {
  font-size: 3px;
  fill: var(--text-secondary);
  text-anchor: middle;
  font-family: inherit;
}

.global-donut-card h3,
.global-top-card h3,
.global-dept-card h3 {
  margin: 0 0 var(--s3);
  font-size: 15px;
}

.global-donut-body {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.global-donut-svg {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}

.global-donut-total {
  font-size: 20px;
  font-weight: 800;
  fill: var(--text);
}

.global-donut-caption {
  font-size: 8px;
  fill: var(--text-secondary);
}

.global-donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  min-width: 160px;
  flex: 1;
}

.global-legend-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
}

.global-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.global-legend-row small {
  color: var(--text-secondary);
  font-size: 12px;
}

.global-top-list,
.global-dept-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.global-top-row,
.global-dept-row {
  display: grid;
  gap: 4px;
}

.global-top-head,
.global-dept-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  color: var(--text);
}

.global-top-head strong,
.global-dept-head strong {
  font-size: 13px;
  color: var(--forest);
}

.global-top-track,
.global-dept-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.global-top-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f97316, #f59e0b);
}

.global-top-track-fill--ok { background: linear-gradient(90deg, #16a34a, #22c55e); }
.global-top-track-fill--info { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.global-top-track-fill--warn { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.global-top-track-fill--high { background: linear-gradient(90deg, #f97316, #fb923c); }
.global-top-track-fill--critical { background: linear-gradient(90deg, #b91c1c, #ef4444); }

.global-kpi-card--delay {
  border-width: 1px;
  border-style: solid;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.12), rgba(226, 232, 240, 0.35));
  border-color: rgba(148, 163, 184, 0.32);
}

.global-kpi-card--delay-ok {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.14), rgba(220, 252, 231, 0.38));
  border-color: rgba(22, 163, 74, 0.32);
}

.global-kpi-card--delay-info {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(224, 242, 254, 0.4));
  border-color: rgba(14, 165, 233, 0.34);
}

.global-kpi-card--delay-warn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(254, 243, 199, 0.4));
  border-color: rgba(245, 158, 11, 0.36);
}

.global-kpi-card--delay-high {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(255, 237, 213, 0.36));
  border-color: rgba(249, 115, 22, 0.38);
}

.global-kpi-card--delay-critical {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(254, 226, 226, 0.4));
  border-color: rgba(220, 38, 38, 0.42);
}

.global-kpi-corrections-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.global-kpi-card--corrections {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(224, 231, 255, 0.4));
  border-color: rgba(99, 102, 241, 0.3);
}

.global-kpi-delay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.delay-index {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.delay-index-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px currentColor;
  opacity: 0.9;
}

.delay-index--ok { background: rgba(22, 163, 74, 0.18); color: #15803d; }
.delay-index--info { background: rgba(14, 165, 233, 0.18); color: #0369a1; }
.delay-index--warn { background: rgba(245, 158, 11, 0.22); color: #b45309; }
.delay-index--high { background: rgba(249, 115, 22, 0.22); color: #c2410c; }
.delay-index--critical {
  background: rgba(220, 38, 38, 0.22);
  color: #b91c1c;
  animation: delayPulse 1.6s ease-in-out infinite;
}

@keyframes delayPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}

.delay-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
}

.delay-badge strong { font-size: 13px; font-weight: 800; letter-spacing: -0.01em; }
.delay-badge small { font-size: 11px; opacity: 0.85; font-weight: 600; }
.delay-badge em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.9;
}

.delay-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.delay-badge--ok { background: rgba(22, 163, 74, 0.14); color: #15803d; border-color: rgba(22, 163, 74, 0.32); }
.delay-badge--info { background: rgba(14, 165, 233, 0.14); color: #0369a1; border-color: rgba(14, 165, 233, 0.32); }
.delay-badge--warn { background: rgba(245, 158, 11, 0.18); color: #b45309; border-color: rgba(245, 158, 11, 0.38); }
.delay-badge--high { background: rgba(249, 115, 22, 0.18); color: #c2410c; border-color: rgba(249, 115, 22, 0.4); }
.delay-badge--critical {
  background: rgba(220, 38, 38, 0.18);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.44);
}

.global-top-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: var(--s3);
}

.global-top-heading h3 {
  margin: 0;
  font-size: 15px;
}

.delay-scale {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
}

.delay-scale-item {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
}

.delay-scale-item--ok { background: #16a34a; }
.delay-scale-item--info { background: #0ea5e9; }
.delay-scale-item--warn { background: #f59e0b; color: #78350f; }
.delay-scale-item--high { background: #f97316; }
.delay-scale-item--critical { background: #dc2626; }

.global-top-row.delay-row-critical {
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.05);
}

[data-theme="dark"] .delay-index--ok { background: rgba(22, 163, 74, 0.28); color: #86efac; }
[data-theme="dark"] .delay-index--info { background: rgba(14, 165, 233, 0.28); color: #7dd3fc; }
[data-theme="dark"] .delay-index--warn { background: rgba(245, 158, 11, 0.3); color: #fbbf24; }
[data-theme="dark"] .delay-index--high { background: rgba(249, 115, 22, 0.32); color: #fdba74; }
[data-theme="dark"] .delay-index--critical { background: rgba(220, 38, 38, 0.34); color: #fca5a5; }

[data-theme="dark"] .delay-badge--ok { background: rgba(22, 163, 74, 0.22); color: #86efac; border-color: rgba(22, 163, 74, 0.4); }
[data-theme="dark"] .delay-badge--info { background: rgba(14, 165, 233, 0.22); color: #7dd3fc; border-color: rgba(14, 165, 233, 0.42); }
[data-theme="dark"] .delay-badge--warn { background: rgba(245, 158, 11, 0.26); color: #fbbf24; border-color: rgba(245, 158, 11, 0.44); }
[data-theme="dark"] .delay-badge--high { background: rgba(249, 115, 22, 0.28); color: #fdba74; border-color: rgba(249, 115, 22, 0.46); }
[data-theme="dark"] .delay-badge--critical { background: rgba(220, 38, 38, 0.32); color: #fca5a5; border-color: rgba(220, 38, 38, 0.5); }

.global-dept-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--forest-mid), var(--lime));
}

.global-top-row small,
.global-dept-row small {
  color: var(--text-secondary);
  font-size: 11px;
}

@media (max-width: 960px) {
  .global-charts-grid {
    grid-template-columns: 1fr;
  }
  .global-charts-grid > .global-chart-card,
  .global-charts-grid > .global-donut-card,
  .global-charts-grid > .global-top-card,
  .global-charts-grid > .global-dept-card {
    grid-column: 1;
  }
}

/* Rappel de pointage — pop-up navigateur */

.late-reminder-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 35, 65, 0.48);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.18s ease-out both;
}

.late-reminder-card {
  position: relative;
  display: grid;
  gap: 18px;
  width: min(440px, 100%);
  padding: 28px 28px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #fff7d6, #ffedd5);
  border: 2px solid #f59e0b;
  box-shadow: 0 22px 60px rgba(217, 119, 6, 0.28);
  color: #7c2d12;
  animation: lateReminderPop 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes lateReminderPop {
  from { opacity: 0; transform: scale(0.9) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.late-reminder-card h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #9a3412;
}

.late-reminder-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #7c2d12;
}

.late-reminder-body strong { color: #b91c1c; }

.late-reminder-mascot {
  position: relative;
  align-self: center;
  justify-self: center;
  width: 90px;
  height: 82px;
  margin-bottom: 4px;
  border-radius: 48% 48% 44% 44%;
  background: linear-gradient(145deg, #38bdf8, #2563eb);
  box-shadow: inset 0 -7px 0 rgba(2, 35, 65, 0.14);
  animation: lateMascotBounce 1.4s ease-in-out infinite;
}

.late-reminder-mascot::before {
  content: "";
  position: absolute;
  inset: 11px 14px 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.late-reminder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.late-reminder-actions button {
  min-height: 40px;
}

.late-reminder-hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #9a3412;
}

[data-theme="dark"] .late-reminder-hint {
  color: #fdba74;
}

[data-theme="dark"] .late-reminder-card {
  background: linear-gradient(160deg, rgba(146, 64, 14, 0.55), rgba(124, 45, 18, 0.45));
  border-color: rgba(245, 158, 11, 0.7);
  color: #fed7aa;
}

[data-theme="dark"] .late-reminder-card h3 { color: #fbbf24; }
[data-theme="dark"] .late-reminder-body { color: #fde68a; }
[data-theme="dark"] .late-reminder-body strong { color: #fca5a5; }

@media (max-width: 480px) {
  .late-reminder-card { padding: 22px 20px 20px; }
  .late-reminder-actions { justify-content: stretch; }
  .late-reminder-actions button { flex: 1 1 45%; }
}

/* Journal de pointage */

.app-shell[data-current-page="journal"] .page {
  max-width: none;
}

.journal-card .table-wrap {
  max-height: min(70vh, 720px);
}

.journal-fs-root {
  display: none;
}

body.journal-expanded-open .journal-fs-root {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 400;
  padding: 18px;
  background: rgba(2, 35, 65, 0.42);
}

.journal-fs-root .journal-card.is-journal-expanded {
  position: relative !important;
  inset: auto !important;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 100vw - 36px) !important;
  height: min(100%, 100dvh - 36px) !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border-radius: 16px;
  background: var(--surface);
  transform: none !important;
  box-shadow: 0 24px 64px rgba(2, 35, 65, 0.28);
}

.journal-fs-root .journal-card.is-journal-expanded:hover {
  transform: none !important;
}

.journal-fs-root .journal-card.is-journal-expanded .table-wrap {
  max-height: none;
  flex: 1;
  min-height: 0;
}

body.journal-expanded-open {
  overflow: hidden;
}

.journal-table {
  min-width: 1680px;
  width: 100%;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
}

.journal-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0;
  background: var(--forest);
  color: #ffffff;
  border-bottom: none;
  white-space: nowrap;
}

.journal-th {
  position: relative;
}

.journal-th.is-filtered .journal-th-btn,
.journal-th.is-sorted .journal-th-btn {
  background: rgba(255, 255, 255, 0.12);
}

.journal-th-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: none;
  cursor: pointer;
}

.journal-th-arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.85;
  flex-shrink: 0;
}

.journal-col-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 8px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(2, 35, 65, 0.18);
}

.journal-col-sort,
.journal-col-option {
  display: block;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.journal-col-sort:hover,
.journal-col-option:hover,
.journal-col-option.is-active {
  background: var(--surface-2);
}

.journal-col-divider {
  height: 1px;
  margin: 4px 0;
  background: var(--border);
}

.journal-table td {
  white-space: nowrap;
  font-size: 13px;
  padding: 10px 12px;
}

.journal-id {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.journal-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.journal-status--on {
  background: #dcfce7;
  color: #166534;
}

.journal-status--off {
  background: var(--surface-2);
  color: var(--text-secondary);
}

[data-theme="dark"] .journal-status--on {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

/* =========================================================
   Onglet Événements — layout, hero, cartes, composer admin
   ========================================================= */

.events-page {
  display: grid;
  gap: var(--s5);
  grid-template-columns: minmax(0, 1fr);
}

.events-page:has(.events-composer) {
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
}

@media (max-width: 1100px) {
  .events-page:has(.events-composer) {
    grid-template-columns: minmax(0, 1fr);
  }
}

.events-main {
  display: grid;
  gap: var(--s5);
  min-width: 0;
}

/* --- Stats bandeau --- */
.events-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s3);
}

.events-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 4px 14px rgba(2, 35, 65, 0.04);
}

.events-stat strong {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.events-stat span {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* --- Hero du prochain événement --- */
.event-hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  color: #ffffff;
  min-height: 300px;
  isolation: isolate;
  background: linear-gradient(135deg, #4338ca 0%, #6366f1 40%, #8b5cf6 100%);
  box-shadow: 0 20px 45px rgba(30, 41, 82, 0.18);
}

.event-hero--meeting { background: linear-gradient(135deg, #0369a1, #0ea5e9 55%, #22d3ee); }
.event-hero--celebration { background: linear-gradient(135deg, #be185d, #ec4899 55%, #f472b6); }
.event-hero--training { background: linear-gradient(135deg, #047857, #10b981 55%, #34d399); }
.event-hero--reminder { background: linear-gradient(135deg, #b45309, #f59e0b 55%, #fbbf24); }
.event-hero--general { background: linear-gradient(135deg, #4338ca, #6366f1 55%, #8b5cf6); }

.event-hero__poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.55) saturate(1.1);
  z-index: 0;
  transition: transform 0.6s ease;
}

.event-hero.has-poster:hover .event-hero__poster {
  transform: scale(1.03);
}

.event-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 100%);
  z-index: 1;
  pointer-events: none;
}

.event-hero__overlay {
  position: relative;
  z-index: 2;
  padding: 30px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 300px;
  justify-content: flex-end;
}

.event-hero__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.event-hero__countdown {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.event-hero--empty .event-hero__countdown { display: none; }

.event-hero__title {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  margin: 0;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.event-hero__info {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
}

.event-hero__desc {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  max-width: 720px;
  white-space: pre-wrap;
  max-height: 4.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.event-hero__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.event-hero__author {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.78);
}

.event-hero .event-actions .outline-button {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
}

.event-hero .event-actions .outline-button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.event-hero--empty {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(139, 92, 246, 0.08));
  color: var(--text-primary);
  box-shadow: none;
  border: 1px dashed var(--border);
  min-height: 200px;
}

.event-hero--empty::after { display: none; }
.event-hero--empty .event-hero__title { color: var(--text-primary); text-shadow: none; }
.event-hero--empty .event-hero__desc { color: var(--text-secondary); }
.event-hero--empty .event-hero__overlay { min-height: 200px; }

/* --- Sections --- */
.events-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--s3);
}

.events-section__head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.events-section__count {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- Grille des cartes à venir --- */
.event-grid {
  display: grid;
  gap: var(--s3);
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.event-card {
  position: relative;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 4px 14px rgba(2, 35, 65, 0.04);
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(2, 35, 65, 0.1);
  border-color: rgba(99, 102, 241, 0.35);
}

.event-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
}

.event-card__poster-wrap {
  display: block;
  height: 100%;
  width: 100%;
}

.event-card__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.event-card__poster-wrap:hover .event-card__poster {
  transform: scale(1.05);
}

.event-card__poster-placeholder {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 62px;
  color: rgba(99, 102, 241, 0.35);
  background:
    radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.16), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(139, 92, 246, 0.16), transparent 55%),
    var(--surface-2);
}

.event-card--meeting .event-card__poster-placeholder { color: rgba(14, 165, 233, 0.45); }
.event-card--celebration .event-card__poster-placeholder { color: rgba(236, 72, 153, 0.45); }
.event-card--training .event-card__poster-placeholder { color: rgba(16, 185, 129, 0.45); }
.event-card--reminder .event-card__poster-placeholder { color: rgba(245, 158, 11, 0.55); }

.event-type-pill--floating {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(2, 35, 65, 0.12);
}

/* Badge date façon calendrier */
.event-date-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: #ffffff;
  border-radius: 12px;
  padding: 6px 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 54px;
  box-shadow: 0 8px 22px rgba(2, 35, 65, 0.18);
  line-height: 1;
  border: 1px solid rgba(2, 35, 65, 0.08);
}

.event-date-badge__weekday {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #dc2626;
  font-weight: 700;
  margin-bottom: 2px;
}

.event-date-badge__day {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.event-date-badge__month {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #475569;
  font-weight: 600;
  margin-top: 2px;
}

.event-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.event-card__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.event-card__meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.event-card__desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-card__footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.event-card__author {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.event-card--past {
  opacity: 0.72;
  filter: grayscale(0.2);
}

/* --- Liste compacte pour l'historique --- */
.event-row-list {
  display: grid;
  gap: 10px;
}

.event-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: background 0.15s ease;
}

.event-row:hover {
  background: var(--surface-2);
}

.event-row .event-date-badge {
  position: static;
  box-shadow: none;
  background: var(--surface-2);
  padding: 4px 8px 6px;
  min-width: 48px;
}

.event-row__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.event-row__head {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.event-row__time {
  font-size: 12px;
  color: var(--text-secondary);
}

.event-row__title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-row__location {
  font-size: 12px;
  color: var(--text-secondary);
}

.event-row__actions {
  display: flex;
  gap: 6px;
}

.event-row__actions .icon-button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.15s ease, color 0.15s ease;
}

.event-row__actions .icon-button:hover { color: var(--text-primary); background: var(--surface); }
.event-row__actions .icon-button.danger:hover { color: #b91c1c; }

.event-row--past { opacity: 0.7; }

/* --- Composer admin --- */
.events-composer {
  position: sticky;
  top: 24px;
  align-self: start;
}

.events-composer__card {
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: 0 10px 30px rgba(2, 35, 65, 0.06);
}

.events-composer__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.events-composer__head h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
}

.events-composer__head p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.events-composer__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
}

.events-composer__form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.events-composer__form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.02em;
  min-width: 0;
}

.events-composer__form .field span em {
  font-style: normal;
  color: var(--text-secondary);
  font-weight: 400;
  opacity: 0.75;
}

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

.events-composer__form input[type="text"],
.events-composer__form input[type="datetime-local"],
.events-composer__form select,
.events-composer__form textarea,
.events-composer__form input[type="file"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--surface);
  font: inherit;
  color: var(--text-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.events-composer__form input:focus,
.events-composer__form select:focus,
.events-composer__form textarea:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.events-composer__form textarea {
  resize: vertical;
  min-height: 90px;
}

.events-composer__form .event-checkbox {
  flex-direction: row;
  align-items: center;
  padding: 8px 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--surface);
  gap: 8px;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 13px;
}

.events-composer__form .event-checkbox input {
  width: auto;
}

.events-composer__form .event-poster-field input[type="file"] {
  padding: 8px 10px;
  cursor: pointer;
}

.events-composer__actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

/* --- Aperçu affiche existante --- */
.event-poster-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.event-poster-preview img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

/* --- Dark mode --- */
[data-theme="dark"] .event-date-badge {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .event-date-badge__day { color: #f8fafc; }
[data-theme="dark"] .event-date-badge__month { color: #94a3b8; }
[data-theme="dark"] .event-date-badge__weekday { color: #f87171; }

[data-theme="dark"] .event-type-pill--floating {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
}

[data-theme="dark"] .events-composer__card {
  background: linear-gradient(180deg, var(--surface), rgba(15, 23, 42, 0.6));
}

@media (max-width: 640px) {
  .events-stats { grid-template-columns: 1fr; }
  .event-hero__overlay { padding: 22px; }
  .events-composer__form { grid-template-columns: 1fr; }
}

/* --- Cartes cliquables + indicateur d'agrandissement --- */
.event-card,
.event-hero,
.event-row {
  cursor: pointer;
}

.event-card__expand {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.65);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}

.event-card:hover .event-card__expand {
  opacity: 1;
  transform: translateY(0);
}

.event-hero__expand {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.4);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.15s ease, transform 0.15s ease;
}

.event-hero__expand:hover {
  background: rgba(15, 23, 42, 0.62);
  transform: scale(1.05);
}

/* --- Modale de détail (lightbox) --- */
.event-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(2, 10, 25, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  overflow-y: auto;
  animation: eventOverlayFadeIn 0.18s ease;
}

@keyframes eventOverlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.event-detail-close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1002;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease, transform 0.15s ease;
}

.event-detail-close:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: scale(1.05);
}

.event-detail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 420px);
  gap: 0;
  width: min(1200px, 100%);
  max-height: calc(100vh - 56px);
  background: var(--surface);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5);
  animation: eventDetailPop 0.22s ease;
}

@keyframes eventDetailPop {
  from { transform: translateY(12px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1);       opacity: 1; }
}

.event-detail__poster-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0f1a;
  min-height: 320px;
  max-height: calc(100vh - 56px);
  overflow: hidden;
}

.event-detail__poster {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 56px);
  object-fit: contain;
  display: block;
}

.event-detail__poster-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  font-size: 130px;
  color: rgba(99, 102, 241, 0.35);
  background:
    radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.22), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(139, 92, 246, 0.2), transparent 55%),
    var(--surface-2);
}

.event-detail__panel {
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  background: var(--surface);
}

.event-detail__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.event-detail__countdown {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.14);
  color: #4338ca;
  font-weight: 600;
  font-size: 12px;
}

[data-theme="dark"] .event-detail__countdown {
  background: rgba(99, 102, 241, 0.26);
  color: #c7d2fe;
}

.event-detail__title {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--text-primary);
}

.event-detail__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  padding: 14px;
  background: var(--surface-2);
  border-radius: 14px;
  border: 1px solid var(--border);
  margin: 0;
}

.event-detail__facts div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.event-detail__facts dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  font-weight: 600;
}

.event-detail__facts dd {
  margin: 0;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.event-detail__desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-primary);
  white-space: pre-wrap;
  padding: 4px 2px;
}

.event-detail__actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

body.event-detail-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .event-detail {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 32px);
  }
  .event-detail-overlay { padding: 16px; }
  .event-detail__poster-wrap { max-height: 45vh; }
  .event-detail__poster { max-height: 45vh; }
  .event-detail__panel { padding: 20px; max-height: 55vh; }
}

.home-event-thumb {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(2, 35, 65, 0.08);
}

.event-card--past {
  opacity: 0.72;
}

.event-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
}

.event-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
}

.event-type--meeting { background: rgba(14, 165, 233, 0.14); color: #0369a1; }
.event-type--celebration { background: rgba(236, 72, 153, 0.14); color: #be185d; }
.event-type--training { background: rgba(16, 185, 129, 0.16); color: #047857; }
.event-type--reminder { background: rgba(245, 158, 11, 0.18); color: #b45309; }
.event-type--general { background: rgba(99, 102, 241, 0.14); color: #4338ca; }

[data-theme="dark"] .event-type-pill { background: rgba(99, 102, 241, 0.24); color: #c7d2fe; }
[data-theme="dark"] .event-type--meeting { background: rgba(14, 165, 233, 0.26); color: #7dd3fc; }
[data-theme="dark"] .event-type--celebration { background: rgba(236, 72, 153, 0.24); color: #f9a8d4; }
[data-theme="dark"] .event-type--training { background: rgba(16, 185, 129, 0.26); color: #6ee7b7; }
[data-theme="dark"] .event-type--reminder { background: rgba(245, 158, 11, 0.3); color: #fcd34d; }

.event-when {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.event-title {
  margin: 0;
  font-size: 17px;
  color: var(--text-primary);
}

.event-location {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.event-description-text {
  margin: 0;
  font-size: 14px;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.event-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.event-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.event-actions {
  display: flex;
  gap: 8px;
}

.outline-button.danger {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.32);
}

.outline-button.danger:hover {
  background: rgba(185, 28, 28, 0.08);
}

.event-checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.event-checkbox input {
  width: auto;
}

.event-description {
  grid-column: 1 / -1;
}

.home-events-widget .home-event-list {
  display: grid;
  gap: 10px;
}

.home-event-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.home-event-item:hover {
  background: var(--surface-2);
  transform: translateX(2px);
}

.home-event-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.home-event-item strong {
  display: block;
  font-size: 14px;
}

.home-event-item span {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Compact type — légère réduction globale */
.brand { font-size: 14px; }
.sidebar > .brand { font-size: 13px; }
.sidebar nav button { font-size: 12px; }
.topbar-page { font-size: 16px; }
.page-heading p { font-size: 13px; }
.card-heading h3,
.card-heading button,
.home-link { font-size: 12px; }
.toolbar h3 { font-size: 12px; }
.primary { font-size: 13px; min-height: 32px; }
.feature-form label { font-size: 12px; }
.feature-form input,
.feature-form select,
.feature-form textarea { font-size: 13px; }
td { font-size: 13px; }
small { font-size: 11px; }
.empty-state,
.empty-cell,
.empty-inline { font-size: 13px; }
.stat-card > strong { font-size: 20px; }
.hours-card strong { font-size: 22px; }
.login-message h1 { font-size: clamp(24px, 3.2vw, 34px); }
.login-message > p { font-size: 14px; }
.welcome-card h2 { font-size: clamp(18px, 3.2vw, 24px); }
.home-title { font-size: clamp(20px, 2.8vw, 26px); }
.event-hero__title { font-size: clamp(20px, 2.6vw, 28px); }

.planning-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.segmented {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.planning-tab {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}
.planning-tab.is-active {
  background: var(--forest-mid);
  color: #fff;
}
.planning-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}
.planning-filters label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
}
.planning-filters select {
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--input-bg);
}
.planning-month {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.planning-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.pl-legend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10px;
  color: var(--text-secondary);
}
.pl-legend b { font-size: 10px; color: var(--text); }
.planning-wrap { overflow: auto; max-height: 70vh; }
.planning-grid {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 10px;
  min-width: 100%;
}
.planning-grid th,
.planning-grid td {
  border: 1px solid var(--border);
  text-align: center;
  padding: 4px 3px;
  min-width: 34px;
  white-space: nowrap;
}
.planning-grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--table-head);
  font-size: 9px;
  text-transform: none;
  letter-spacing: 0;
}
.planning-grid thead th span { display: block; color: var(--text-tertiary); font-weight: 600; }
.planning-grid .planning-name {
  position: sticky;
  left: 0;
  z-index: 3;
  text-align: left;
  min-width: 140px;
  background: var(--surface);
  font-size: 11px;
}
.planning-grid thead .planning-name { z-index: 4; background: var(--table-head); }
.planning-grid .planning-name small { display: block; font-weight: 500; color: var(--text-tertiary); }
.planning-grid .is-off { background: var(--surface-2); color: var(--text-tertiary); }
.pl-cell--PR { background: #dbeafe; }
.pl-cell--TT { background: #fde68a; }
.pl-cell--RE { background: #fed7aa; }
.pl-cell--DP { background: #e9d5ff; }
.pl-cell--AJ { background: #bbf7d0; }
.pl-cell--AI { background: #fecaca; }
.pl-cell--CP { background: #c7d2fe; }
.pl-cell--MA, .pl-cell--PA { background: #fbcfe8; }
.pl-cell--SS { background: #e5e7eb; }
.pl-cell--RC { background: #a5f3fc; }
.pl-cell--DE { background: #fef3c7; }
.pl-cell--MP { background: #fca5a5; }
.pl-cell--SP { background: #ddd6fe; }
.pl-cell--EC { background: #fdba74; }
.pl-cell--AB { background: #fecaca; color: #7f1d1d; }
.pl-cell--FER { background: #e5e7eb; color: #374151; }
.planning-import {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
}
.planning-import input[type="file"] {
  max-width: 220px;
  font-size: 11px;
  font-weight: 500;
}
.planning-import-notice,
.planning-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-secondary);
}
.planning-assign {
  margin: 0 0 12px;
  padding: 8px 12px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.planning-assign > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 0;
}
.planning-assign-form {
  margin-top: 10px;
}
.planning-assign-form .primary {
  justify-self: start;
}
.admin-employee-import {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 6px;
}
.admin-employee-import strong { font-size: 13px; }
.admin-user-list .toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}
.admin-user-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.admin-user-search {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
}
.admin-user-search input {
  min-width: min(260px, 100%);
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--input-bg);
  font-weight: 500;
}
.admin-user-list .table-wrap {
  max-height: min(56vh, 620px);
  overflow: auto;
  cursor: default;
}
.admin-user-list thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--table-head, var(--surface));
}
.planning-gap-bars { display: grid; gap: 10px; padding: 8px 0 4px; }
.planning-gap-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) 1fr 40px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.planning-gap-track {
  height: 8px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}
.planning-gap-track span {
  display: block;
  height: 100%;
  background: var(--forest-mid);
  border-radius: 99px;
}

/* ==========================================================================
 * Fluid 3D animations layer (Humana animations.js companion).
 *
 * S'ajoute par-dessus les regles existantes. Ne redefinit rien : ne fait que
 * completer avec des transforms 3D activees par des classes ajoutees en JS.
 * Toutes ces regles se desactivent proprement en `prefers-reduced-motion`.
 * ========================================================================== */

/* ----- Cross-document View Transitions (Chromium >= 126) ------------------ */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 340ms;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
::view-transition-new(root) { animation-name: hu-view-in; }
::view-transition-old(root) { animation-name: hu-view-out; }
@keyframes hu-view-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0)     scale(1); }
}
@keyframes hu-view-out {
  from { opacity: 1; transform: translateY(0)     scale(1); }
  to   { opacity: 0; transform: translateY(-8px)  scale(0.995); }
}

/* ----- Fallback fondu de navigation (Safari/Firefox) ---------------------- */
html.hu-nav-leaving body {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
}
body {
  transition: opacity 220ms ease, transform 220ms ease;
}

/* ----- Reveal on scroll --------------------------------------------------- */
.hu-reveal {
  opacity: 0;
  transform: perspective(900px) translateY(22px) rotateX(4deg);
  transition:
    opacity 520ms cubic-bezier(0.2, 0.9, 0.2, 1),
    transform 560ms cubic-bezier(0.2, 0.9, 0.2, 1);
  will-change: opacity, transform;
}
.hu-reveal-d0 { transition-delay: 0ms; }
.hu-reveal-d1 { transition-delay: 45ms; }
.hu-reveal-d2 { transition-delay: 90ms; }
.hu-reveal-d3 { transition-delay: 135ms; }
.hu-reveal-d4 { transition-delay: 180ms; }
.hu-reveal-d5 { transition-delay: 225ms; }
.hu-reveal-d6 { transition-delay: 270ms; }
.hu-reveal-d7 { transition-delay: 315ms; }
.hu-reveal-d8 { transition-delay: 360ms; }
.hu-reveal-d9 { transition-delay: 405ms; }
.hu-reveal-d10 { transition-delay: 450ms; }
.hu-reveal-d11 { transition-delay: 495ms; }
.hu-reveal.hu-revealed {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* ----- Tilt 3D souris sur les cartes -------------------------------------- */
/* Preparent le contexte 3D ; le tilt reel est applique via .hu-tilt-active. */
.card,
.home-widget,
.stat-card,
.balance-card,
.hours-card,
.document-card {
  position: relative;
  transform-style: preserve-3d;
}
.card.hu-tilt-active,
.home-widget.hu-tilt-active,
.stat-card.hu-tilt-active,
.balance-card.hu-tilt-active,
.hours-card.hu-tilt-active,
.document-card.hu-tilt-active {
  box-shadow: 0 18px 42px rgba(2, 35, 65, 0.16);
}
[data-theme="dark"] .card.hu-tilt-active,
[data-theme="dark"] .home-widget.hu-tilt-active,
[data-theme="dark"] .stat-card.hu-tilt-active {
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
}

/* Spot lumineux qui suit la souris. On l'inhibe sur home-widget qui a deja
 * `overflow: hidden` : la lueur reste dans la carte. */
.card.hu-tilt-active::after,
.home-widget.hu-tilt-active::after,
.stat-card.hu-tilt-active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    circle 220px at var(--hu-spotX) var(--hu-spotY),
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0) 60%
  );
  mix-blend-mode: overlay;
  opacity: 1;
  transition: opacity 200ms ease;
}
[data-theme="dark"] .card.hu-tilt-active::after,
[data-theme="dark"] .home-widget.hu-tilt-active::after,
[data-theme="dark"] .stat-card.hu-tilt-active::after {
  background: radial-gradient(
    circle 220px at var(--hu-spotX) var(--hu-spotY),
    rgba(159, 190, 255, 0.22),
    rgba(159, 190, 255, 0) 60%
  );
}

/* Ne pas s'appliquer aux cartes qui contiennent un timeline visible ou un
 * contenu qui deborde volontairement. */
.card:has(.day-timeline),
.card.punch-history-card {
  transform-style: flat !important;
}
.card:has(.day-timeline).hu-tilt-active,
.card.punch-history-card.hu-tilt-active {
  transform: none !important;
  box-shadow: 0 8px 24px rgba(2, 35, 65, 0.12);
}

/* ----- Press effect + ripple sur boutons ---------------------------------- */
button,
.primary,
[role="button"],
a.primary,
a.button {
  position: relative;
  overflow: hidden;
  transition: transform 140ms cubic-bezier(0.2, 0.9, 0.2, 1), box-shadow 200ms ease;
}
button:not(:disabled):active,
.primary:not(:disabled):active,
[role="button"]:not([aria-disabled="true"]):active,
a.primary:active {
  transform: translateZ(-4px) scale(0.97);
}
.icon-button:not(:disabled):active,
.close-button:not(:disabled):active {
  transform: scale(0.9);
}

/* ----- Compteurs animes --------------------------------------------------- */
[data-animate-count] {
  font-variant-numeric: tabular-nums;
  transition: color 200ms ease;
}

/* ----- Reduced motion ----------------------------------------------------- */
@media (pointer: coarse), (max-width: 900px) {
  .card.hu-tilt-active,
  .home-widget.hu-tilt-active,
  .stat-card.hu-tilt-active,
  .balance-card.hu-tilt-active,
  .hours-card.hu-tilt-active,
  .document-card.hu-tilt-active {
    transform: none !important;
    box-shadow: none !important;
  }
  .card.hu-tilt-active::after,
  .home-widget.hu-tilt-active::after,
  .stat-card.hu-tilt-active::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hu-reveal,
  .hu-reveal.hu-revealed {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .card.hu-tilt-active,
  .home-widget.hu-tilt-active,
  .stat-card.hu-tilt-active {
    transform: none !important;
    box-shadow: none !important;
  }
  .card.hu-tilt-active::after,
  .home-widget.hu-tilt-active::after,
  .stat-card.hu-tilt-active::after { display: none; }
  html.hu-nav-leaving body { opacity: 1; transform: none; }
  button.hu-ripple-active::after,
  .primary.hu-ripple-active::after { display: none; }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none !important; }
}
