@charset "UTF-8";
/* Primary */
/* Surfaces */
/* Borders */
/* Text */
/* Sidebar */
/* Topbar */
/* Status badges */
/* Metric accents */
/* Table action buttons */
/* Avatars / roles */
/* Toggle */
/* Form */
/* Alerts */
/* Exports */
/* Organization */
/* Layout */
/* Useful scale */
/* Breakpoints */
/* Compatibility aliases */
/* Reset & base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  color: #111827;
  background: #F9FAFB;
  -webkit-font-smoothing: antialiased;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  background: #FFFFFF;
  border-right: 1px solid #E5E7EB;
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 200ms ease, transform 200ms ease;
}
.sidebar .sidebar__logo,
.sidebar .sidebar-brand,
.sidebar .sidebar-header {
  min-height: 80px;
  padding: 20px 16px;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar .sidebar__logo .sidebar__logo-circle,
.sidebar .sidebar__logo .brand-mark,
.sidebar .sidebar__logo .logo,
.sidebar .sidebar-brand .sidebar__logo-circle,
.sidebar .sidebar-brand .brand-mark,
.sidebar .sidebar-brand .logo,
.sidebar .sidebar-header .sidebar__logo-circle,
.sidebar .sidebar-header .brand-mark,
.sidebar .sidebar-header .logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: #C0392B;
  color: white;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar .sidebar__logo .sidebar__logo-circle img,
.sidebar .sidebar__logo .brand-mark img,
.sidebar .sidebar__logo .logo img,
.sidebar .sidebar-brand .sidebar__logo-circle img,
.sidebar .sidebar-brand .brand-mark img,
.sidebar .sidebar-brand .logo img,
.sidebar .sidebar-header .sidebar__logo-circle img,
.sidebar .sidebar-header .brand-mark img,
.sidebar .sidebar-header .logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  display: block;
  transform: scale(1.02);
}
.sidebar .sidebar__logo .sidebar__logo-text .sidebar__logo-title,
.sidebar .sidebar__logo .sidebar__logo-text .brand-title,
.sidebar .sidebar__logo .sidebar__logo-text .brand-name,
.sidebar .sidebar__logo .brand .sidebar__logo-title,
.sidebar .sidebar__logo .brand .brand-title,
.sidebar .sidebar__logo .brand .brand-name,
.sidebar .sidebar__logo div .sidebar__logo-title,
.sidebar .sidebar__logo div .brand-title,
.sidebar .sidebar__logo div .brand-name,
.sidebar .sidebar-brand .sidebar__logo-text .sidebar__logo-title,
.sidebar .sidebar-brand .sidebar__logo-text .brand-title,
.sidebar .sidebar-brand .sidebar__logo-text .brand-name,
.sidebar .sidebar-brand .brand .sidebar__logo-title,
.sidebar .sidebar-brand .brand .brand-title,
.sidebar .sidebar-brand .brand .brand-name,
.sidebar .sidebar-brand div .sidebar__logo-title,
.sidebar .sidebar-brand div .brand-title,
.sidebar .sidebar-brand div .brand-name,
.sidebar .sidebar-header .sidebar__logo-text .sidebar__logo-title,
.sidebar .sidebar-header .sidebar__logo-text .brand-title,
.sidebar .sidebar-header .sidebar__logo-text .brand-name,
.sidebar .sidebar-header .brand .sidebar__logo-title,
.sidebar .sidebar-header .brand .brand-title,
.sidebar .sidebar-header .brand .brand-name,
.sidebar .sidebar-header div .sidebar__logo-title,
.sidebar .sidebar-header div .brand-title,
.sidebar .sidebar-header div .brand-name {
  font-weight: 700;
  font-size: 14px;
  color: #111827;
  margin: 0;
}
.sidebar .sidebar__logo .sidebar__logo-text .sidebar__logo-sub,
.sidebar .sidebar__logo .sidebar__logo-text .brand-subtitle,
.sidebar .sidebar__logo .brand .sidebar__logo-sub,
.sidebar .sidebar__logo .brand .brand-subtitle,
.sidebar .sidebar__logo div .sidebar__logo-sub,
.sidebar .sidebar__logo div .brand-subtitle,
.sidebar .sidebar-brand .sidebar__logo-text .sidebar__logo-sub,
.sidebar .sidebar-brand .sidebar__logo-text .brand-subtitle,
.sidebar .sidebar-brand .brand .sidebar__logo-sub,
.sidebar .sidebar-brand .brand .brand-subtitle,
.sidebar .sidebar-brand div .sidebar__logo-sub,
.sidebar .sidebar-brand div .brand-subtitle,
.sidebar .sidebar-header .sidebar__logo-text .sidebar__logo-sub,
.sidebar .sidebar-header .sidebar__logo-text .brand-subtitle,
.sidebar .sidebar-header .brand .sidebar__logo-sub,
.sidebar .sidebar-header .brand .brand-subtitle,
.sidebar .sidebar-header div .sidebar__logo-sub,
.sidebar .sidebar-header div .brand-subtitle {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6B7280;
  font-weight: 500;
  margin: 0;
}
.sidebar .sidebar__nav,
.sidebar .sidebar-nav {
  flex: 1;
  padding: 12px 8px;
}
.sidebar .sidebar__nav .sidebar__nav-item,
.sidebar .sidebar__nav .sidebar-item,
.sidebar .sidebar-nav .sidebar__nav-item,
.sidebar .sidebar-nav .sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: background 200ms ease, color 200ms ease;
  border-left: 3px solid transparent;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar .sidebar__nav .sidebar__nav-item svg,
.sidebar .sidebar__nav .sidebar-item svg,
.sidebar .sidebar-nav .sidebar__nav-item svg,
.sidebar .sidebar-nav .sidebar-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.sidebar .sidebar__nav .sidebar__nav-item:hover,
.sidebar .sidebar__nav .sidebar-item:hover,
.sidebar .sidebar-nav .sidebar__nav-item:hover,
.sidebar .sidebar-nav .sidebar-item:hover {
  background: #F9FAFB;
  color: #111827;
}
.sidebar .sidebar__nav .sidebar__nav-item.active, .sidebar .sidebar__nav .sidebar__nav-item.sidebar-item--active,
.sidebar .sidebar__nav .sidebar-item.active,
.sidebar .sidebar__nav .sidebar-item.sidebar-item--active,
.sidebar .sidebar-nav .sidebar__nav-item.active,
.sidebar .sidebar-nav .sidebar__nav-item.sidebar-item--active,
.sidebar .sidebar-nav .sidebar-item.active,
.sidebar .sidebar-nav .sidebar-item.sidebar-item--active {
  background: #FEF2F2;
  color: #C0392B;
  border-left-color: #C0392B;
  font-weight: 600;
}
.sidebar .sidebar__nav .sidebar__nav-item--logout,
.sidebar .sidebar__nav .sidebar-item--logout,
.sidebar .sidebar-nav .sidebar__nav-item--logout,
.sidebar .sidebar-nav .sidebar-item--logout {
  color: #6B7280;
}
.sidebar .sidebar__nav .sidebar__nav-item--logout:hover,
.sidebar .sidebar__nav .sidebar-item--logout:hover,
.sidebar .sidebar-nav .sidebar__nav-item--logout:hover,
.sidebar .sidebar-nav .sidebar-item--logout:hover {
  color: #C0392B;
  background: #FEF2F2;
}
.sidebar .sidebar__user,
.sidebar .sidebar-footer {
  padding: 16px;
  border-top: 1px solid #E5E7EB;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.sidebar .sidebar__user .sidebar__avatar,
.sidebar .sidebar__user .avatar,
.sidebar .sidebar__user .avatar-circle,
.sidebar .sidebar-footer .sidebar__avatar,
.sidebar .sidebar-footer .avatar,
.sidebar .sidebar-footer .avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #C0392B;
  color: white;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar .sidebar__user .sidebar__user-info,
.sidebar .sidebar__user .user-info,
.sidebar .sidebar__user .user-details,
.sidebar .sidebar__user > div,
.sidebar .sidebar-footer .sidebar__user-info,
.sidebar .sidebar-footer .user-info,
.sidebar .sidebar-footer .user-details,
.sidebar .sidebar-footer > div {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}
.sidebar .sidebar__user .sidebar__user-info .sidebar__user-name,
.sidebar .sidebar__user .sidebar__user-info .user-name,
.sidebar .sidebar__user .sidebar__user-info p,
.sidebar .sidebar__user .user-info .sidebar__user-name,
.sidebar .sidebar__user .user-info .user-name,
.sidebar .sidebar__user .user-info p,
.sidebar .sidebar__user .user-details .sidebar__user-name,
.sidebar .sidebar__user .user-details .user-name,
.sidebar .sidebar__user .user-details p,
.sidebar .sidebar__user > div .sidebar__user-name,
.sidebar .sidebar__user > div .user-name,
.sidebar .sidebar__user > div p,
.sidebar .sidebar-footer .sidebar__user-info .sidebar__user-name,
.sidebar .sidebar-footer .sidebar__user-info .user-name,
.sidebar .sidebar-footer .sidebar__user-info p,
.sidebar .sidebar-footer .user-info .sidebar__user-name,
.sidebar .sidebar-footer .user-info .user-name,
.sidebar .sidebar-footer .user-info p,
.sidebar .sidebar-footer .user-details .sidebar__user-name,
.sidebar .sidebar-footer .user-details .user-name,
.sidebar .sidebar-footer .user-details p,
.sidebar .sidebar-footer > div .sidebar__user-name,
.sidebar .sidebar-footer > div .user-name,
.sidebar .sidebar-footer > div p {
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.sidebar .sidebar__user .sidebar__user-info .sidebar__user-role,
.sidebar .sidebar__user .sidebar__user-info .user-role,
.sidebar .sidebar__user .sidebar__user-info span,
.sidebar .sidebar__user .user-info .sidebar__user-role,
.sidebar .sidebar__user .user-info .user-role,
.sidebar .sidebar__user .user-info span,
.sidebar .sidebar__user .user-details .sidebar__user-role,
.sidebar .sidebar__user .user-details .user-role,
.sidebar .sidebar__user .user-details span,
.sidebar .sidebar__user > div .sidebar__user-role,
.sidebar .sidebar__user > div .user-role,
.sidebar .sidebar__user > div span,
.sidebar .sidebar-footer .sidebar__user-info .sidebar__user-role,
.sidebar .sidebar-footer .sidebar__user-info .user-role,
.sidebar .sidebar-footer .sidebar__user-info span,
.sidebar .sidebar-footer .user-info .sidebar__user-role,
.sidebar .sidebar-footer .user-info .user-role,
.sidebar .sidebar-footer .user-info span,
.sidebar .sidebar-footer .user-details .sidebar__user-role,
.sidebar .sidebar-footer .user-details .user-role,
.sidebar .sidebar-footer .user-details span,
.sidebar .sidebar-footer > div .sidebar__user-role,
.sidebar .sidebar-footer > div .user-role,
.sidebar .sidebar-footer > div span {
  font-size: 11px;
  color: #6B7280;
  background: #F9FAFB;
  padding: 1px 8px;
  border-radius: 100px;
  display: inline-block;
  margin-top: 2px;
}
.sidebar .sidebar__user .sidebar-logout,
.sidebar .sidebar__user .logout-btn,
.sidebar .sidebar-footer .sidebar-logout,
.sidebar .sidebar-footer .logout-btn {
  width: 100%;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #6B7280;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sidebar .sidebar__user .sidebar-logout:hover,
.sidebar .sidebar__user .logout-btn:hover,
.sidebar .sidebar-footer .sidebar-logout:hover,
.sidebar .sidebar-footer .logout-btn:hover {
  color: #C0392B;
  border-color: #C0392B;
  background: #FEF2F2;
}
@media (max-width: 1023px) {
  .sidebar {
    padding: 10px 12px 0 !important;
  }

  .sidebar .sidebar__user-info,
  .sidebar .brand,
  .sidebar .user-details {
    width: 100% !important;
    display: none;
  }
  .sidebar .sidebar__logo,
  .sidebar .sidebar-brand,
  .sidebar .sidebar-header {
    justify-content: center;
    padding: 16px 8px;
    min-height: 64px;
  }
  .sidebar .sidebar__nav-item,
  .sidebar .sidebar-item {
    justify-content: center;
    padding: 10px;
  }
  .sidebar .sidebar__user,
  .sidebar .sidebar-footer {
    justify-content: center;
  }
}
@media (max-width: 767px) {
  .sidebar {
    width: 240px;
    transform: translateX(-100%);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }
  .sidebar.sidebar--open, .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  }
  .sidebar .sidebar__logo-text,
  .sidebar .sidebar__nav-item span,
  .sidebar .sidebar__user-info,
  .sidebar .brand,
  .sidebar .user-details,
  .sidebar .sidebar-item span {
    display: block;
  }
  .sidebar .sidebar__nav-item,
  .sidebar .sidebar-item {
    justify-content: flex-start;
  }
}

.profile-doc-page {
  --doc-bg-top: #ffffff;
  --doc-bg-bottom: #ffffff;
  --doc-card: #ffffff;
  --doc-border: #e5e7eb;
  --doc-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --doc-text: #111827;
  --doc-muted: #5b6474;
  --doc-pill: #f3f4f6;
}

.profile-doc-page .profile-doc-page-header {
  display: block;
  max-width: 980px;
  margin-bottom: 10px;
}

.profile-doc-page .profile-doc-page-header__main {
  min-width: 0;
}

.profile-doc-page .profile-doc-page-header h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 650;
  color: #111827;
}

.profile-doc-page .profile-doc-page-header__intro {
  margin: 6px 0 0;
  color: #6b7280;
  max-width: 820px;
  line-height: 1.45;
  font-size: 14px;
}

.profile-doc-page .profile-doc-page-header__status {
  margin: 12px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #334155;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.25;
}

.profile-doc-page .profile-doc-page-header__status strong {
  color: #111827;
  font-size: 13px;
  font-weight: 600;
}

.profile-doc-page .profile-doc-page-header__status span {
  color: #475569;
}

.profile-doc-page .profile-doc-page-header__status--card {
  margin: 0;
  min-width: 270px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid #ebcfca;
  background: #fdf7f6;
  color: #1f2937;
  display: grid;
  gap: 8px;
}

.profile-doc-page .profile-doc-page-header__status--card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.profile-doc-page .profile-doc-page-header__status--card p span {
  color: #374151;
}

.profile-doc-page .profile-doc-page-header__status--card p strong {
  color: #111827;
  font-size: 15px;
}

.profile-doc-page .profile-doc-stack {
  gap: 14px;
  max-width: 980px;
  margin-top: 0;
}

.profile-doc-page .profile-doc-stack--carte-grise {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.profile-doc-page .profile-doc-stack--carte-grise .profile-doc-card {
  height: 100%;
}

.profile-doc-page .profile-doc-card {
  border: 1px solid var(--doc-border);
  border-radius: 12px;
  background: var(--doc-card);
  box-shadow: var(--doc-shadow);
  padding: 22px;
}

.profile-doc-page .profile-doc-card h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
}

.profile-doc-page .profile-doc-card .hint {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.profile-doc-page .profile-doc-grid label {
  color: #111827;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.25;
  gap: 6px;
}

.profile-doc-page .profile-doc-grid input {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  min-height: 46px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 450;
}

.profile-doc-page .profile-doc-grid input::placeholder {
  color: #9ca3af;
}

.profile-doc-page .profile-doc-grid input:focus {
  border-color: #c2410c;
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.12);
}

.profile-doc-page .profile-doc-field--wide {
  grid-column: 1 / -1;
}

.profile-doc-page .profile-doc-actions {
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.profile-doc-page .profile-doc-upload-field {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  background: #f9fafb;
}

.profile-doc-page .profile-doc-upload-field input[type=file] {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  min-height: 42px;
  padding: 8px 12px;
  font-size: 14px;
}

.profile-doc-page .profile-doc-upload-field input[type=file]::file-selector-button {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  border-radius: 8px;
  padding: 6px 10px;
  margin-right: 8px;
  font-weight: 500;
  cursor: pointer;
}

.profile-doc-page .profile-doc-upload-field small {
  color: var(--doc-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.profile-doc-page .profile-doc-actions .button,
.profile-doc-page .profile-doc-actions .button-primary,
.profile-doc-page .profile-doc-actions .button-secondary {
    min-height: 40px;
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: 600;
    border: 1px solid #C0392B;
    background: #C0392B;
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.profile-doc-page .profile-doc-actions .button-secondary:hover:not(:disabled) {
  background: #a93226;
  border-color: #a93226;
  color: #ffffff;
}

.profile-doc-page .profile-doc-summary {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.profile-doc-page .profile-doc-summary div {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
}

.profile-doc-page .profile-doc-summary dt {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.profile-doc-page .profile-doc-summary dd {
  margin: 0;
  font-weight: 700;
  color: #0f172a;
}

.profile-doc-page .profile-doc-preview-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  background: #f9fafb;
  margin-top: 2px;
}

.profile-doc-page .profile-doc-preview-image {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
  border-radius: 12px;
  background: #ffffff;
}

.profile-doc-page .profile-doc-meta {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-doc-page .profile-doc-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.profile-doc-page .profile-doc-preview-empty {
  border: 1px dashed #d1d5db;
  margin-top :15px;
  border-radius: 10px;
  padding: 18px;
  display: grid;
  gap: 8px;
  color: #374151;
  background: #f9fafb;
}

.profile-doc-page .profile-doc-card--preview h2 {
  margin-bottom: 10px;
  font-size: 26px;
}

.profile-doc-page .profile-doc-preview-empty strong {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
}

.profile-doc-page .profile-doc-preview-empty span {
  max-width: 900px;
  font-size: 14px;
  line-height: 1.45;
  color: #6b7280;
}

.note-page--redesign .note-assets-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.note-page--redesign .note-assets-link {
  text-decoration: none;
}

@media (max-width: 900px) {
  .profile-doc-page .profile-doc-page-header__intro {
    max-width: 100%;
  }

  .profile-doc-page .profile-doc-page-header__status {
    display: flex;
    width: fit-content;
    max-width: 100%;
    flex-wrap: wrap;
  }

  .profile-doc-page .profile-doc-page-header__status--card {
    min-width: 0;
    width: 100%;
  }

  .profile-doc-page .profile-doc-stack {
    gap: 12px;
  }

  .profile-doc-page .profile-doc-stack--carte-grise {
    gap: 12px;
  }

  .profile-doc-page .profile-doc-card {
    padding: 18px;
  }

  .profile-doc-page .profile-doc-actions .button,
  .profile-doc-page .profile-doc-actions .button-primary,
  .profile-doc-page .profile-doc-actions .button-secondary {
    font-size: 14px;
  }

  .profile-doc-page .profile-doc-card--preview h2 {
    font-size: 24px;
  }

  .profile-doc-page .profile-doc-preview-empty {
    padding: 16px 14px;
  }

  .profile-doc-page .profile-doc-preview-empty strong {
    font-size: 16px;
  }

  .profile-doc-page .profile-doc-preview-empty span {
    font-size: 14px;
  }

  .profile-doc-page .profile-doc-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .profile-doc-page .profile-doc-stack--carte-grise {
    grid-template-columns: 1fr;
  }
}

/* Overlay behind mobile sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 199;
}
@media (max-width: 767px) {
  .sidebar-overlay.sidebar-overlay--visible, .sidebar-overlay.open {
    display: block;
  }
}

/* Topbar */
.topbar {
  position: fixed;
  top: 0;
  left: 240px;
  right: 0;
  height: 64px;
  background: #FFFFFF;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  transition: left 200ms ease;
}
.topbar .topbar__title,
.topbar .topbar-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  line-height: 1;
}
.topbar .topbar__right,
.topbar .topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar .topbar__bell,
.topbar .notifications,
.topbar .icon-notification {
  position: relative;
  cursor: pointer;
  color: #6B7280;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #F9FAFB;
  flex-shrink: 0;
  border: 1px solid transparent;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.topbar .topbar__bell:hover,
.topbar .notifications:hover,
.topbar .icon-notification:hover {
  color: #111827;
}
.topbar .topbar__bell:hover,
.topbar .notifications:hover,
.topbar .icon-notification:hover {
  transform: translateY(-1px);
}
.topbar .topbar__bell:focus-visible,
.topbar .notifications:focus-visible,
.topbar .icon-notification:focus-visible {
  outline: 2px solid rgba(192, 57, 43, 0.35);
  outline-offset: 2px;
}
.topbar .topbar__bell .topbar__badge,
.topbar .topbar__bell .notification-badge,
.topbar .notifications .topbar__badge,
.topbar .notifications .notification-badge,
.topbar .icon-notification .topbar__badge,
.topbar .icon-notification .notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #F59E0B;
  color: white;
  font-size: 10px;
  font-weight: 600;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.topbar .topbar-notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 52px;
  width: 280px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.12);
  z-index: 120;
  overflow: hidden;
}
.topbar .topbar-notification-panel .notification-panel__header {
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6B7280;
  border-bottom: 1px solid #E5E7EB;
  background: #F9FAFB;
}
.topbar .topbar-notification-panel .notification-item {
  padding: 12px;
  font-size: 13px;
  color: #111827;
  line-height: 1.45;
}
.topbar .topbar__user,
.topbar .topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  position: relative;
  z-index: 2;
}
.topbar .topbar__user .topbar__avatar,
.topbar .topbar__user .avatar,
.topbar .topbar-user .topbar__avatar,
.topbar .topbar-user .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #C0392B;
  color: white;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.topbar .topbar__user .topbar__user-info,
.topbar .topbar__user .topbar-user-info,
.topbar .topbar__user .user-info,
.topbar .topbar-user .topbar__user-info,
.topbar .topbar-user .topbar-user-info,
.topbar .topbar-user .user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
  min-width: 0;
}
.topbar .topbar__user .topbar__user-info .topbar__user-name,
.topbar .topbar__user .topbar__user-info .user-name,
.topbar .topbar__user .topbar__user-info strong,
.topbar .topbar__user .topbar-user-info .topbar__user-name,
.topbar .topbar__user .topbar-user-info .user-name,
.topbar .topbar__user .topbar-user-info strong,
.topbar .topbar__user .user-info .topbar__user-name,
.topbar .topbar__user .user-info .user-name,
.topbar .topbar__user .user-info strong,
.topbar .topbar-user .topbar__user-info .topbar__user-name,
.topbar .topbar-user .topbar__user-info .user-name,
.topbar .topbar-user .topbar__user-info strong,
.topbar .topbar-user .topbar-user-info .topbar__user-name,
.topbar .topbar-user .topbar-user-info .user-name,
.topbar .topbar-user .topbar-user-info strong,
.topbar .topbar-user .user-info .topbar__user-name,
.topbar .topbar-user .user-info .user-name,
.topbar .topbar-user .user-info strong {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}
.topbar .topbar__user .topbar__user-info .topbar__user-role,
.topbar .topbar__user .topbar__user-info span,
.topbar .topbar__user .topbar-user-info .topbar__user-role,
.topbar .topbar__user .topbar-user-info span,
.topbar .topbar__user .user-info .topbar__user-role,
.topbar .topbar__user .user-info span,
.topbar .topbar-user .topbar__user-info .topbar__user-role,
.topbar .topbar-user .topbar__user-info span,
.topbar .topbar-user .topbar-user-info .topbar__user-role,
.topbar .topbar-user .topbar-user-info span,
.topbar .topbar-user .user-info .topbar__user-role,
.topbar .topbar-user .user-info span {
  font-size: 12px;
  color: #6B7280;
}
.topbar .topbar__hamburger,
.topbar .sidebar-toggle,
.topbar .icon-button {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #111827;
  padding: 4px;
}
@media (max-width: 1023px) {
  .topbar {
    left: 56px;
  }
  .topbar .topbar__user-info,
  .topbar .topbar-user-info {
    display: none;
  }
  .topbar .topbar__hamburger,
  .topbar .sidebar-toggle,
  .topbar .icon-button {
    display: flex;
  }
}
@media (max-width: 767px) {
  .topbar {
    left: 0;
    padding: 0 16px;
  }
  .topbar .topbar__title,
  .topbar .topbar-title {
    font-size: 16px;
  }
  .topbar .topbar__hamburger,
  .topbar .sidebar-toggle,
  .topbar .icon-button {
    display: flex;
  }
}

/* Content */
.app-wrapper {
  margin-left: 240px;
  transition: margin-left 200ms ease;
}
@media (max-width: 1023px) {
  .app-wrapper {
    margin-left: 56px;
  }
}
@media (max-width: 767px) {
  .app-wrapper {
    margin-left: 0;
  }
}

.main-content {
  margin-left: 0;
  padding-top: 64px;
  padding-left: 16px;
  padding-right: 16px;
  min-height: 100vh;
  background: #F9FAFB;
  transition: margin-left 200ms ease;
}
.main-content .page-inner {
  padding: 28px 20px 36px;
  max-width: 1440px;
  margin: 0 auto;
}
@media (max-width: 767px) {
  .main-content {
    padding-left: 10px;
    padding-right: 10px;
  }
  .main-content .page-inner {
    padding: 20px 10px 28px;
  }
}

/* Auth */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(90deg, #C0392B 0 50%, #F8FAFC 50% 100%);
}

.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  overflow: hidden;
}
@media (max-width: 1023px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-page {
    background: #F8FAFC;
  }
}

.auth-left {
  background: #C0392B;
  color: #FFFFFF;
  padding: clamp(40px, 6vw, 72px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
@media (max-width: 1023px) {
  .auth-left {
    display: none;
  }
}

.auth-left-inner {
  width: min(520px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: clamp(4px, 1vw, 18px);
  animation: authFadeUp 420ms ease-out both;
}

.auth-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-brand-row .brand-circle {
  width: clamp(132px, 16vw, 168px);
  height: clamp(88px, 11vw, 112px);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.34);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transform: translateZ(0);
}
.auth-brand-row .brand-circle img {
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  display: block;
  background: #FFFFFF;
  padding: 3px;
}

.auth-brand-copy {
  margin-top: 24px;
}
.auth-brand-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  color: #FFFFFF;
}
.auth-brand-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
}

.auth-left-content {
  margin-top: 44px;
  width: 100%;
}
.auth-left-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.auth-left-content ul li {
  position: relative;
  padding-left: 32px;
  margin: 0;
  text-align: left;
  font-size: 18px;
}
.auth-left-content ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.auth-right {
  background: #FFFFFF;
  padding: clamp(32px, 6vw, 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
@media (max-width: 767px) {
  .auth-right {
    padding: 24px 16px 72px;
  }
}

.auth-card-inner {
  width: min(440px, 100%);
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.08);
  padding: clamp(22px, 3vw, 30px);
  animation: authFadeUp 460ms ease-out both;
}
@media (max-width: 767px) {
  .auth-card-inner {
    border-radius: 14px;
    padding: 18px 16px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  }
}

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

.auth-right .form-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  color: #9CA3AF;
  font-size: 12px;
  padding: 0 16px;
  border-top: 0;
  background: transparent;
  box-shadow: none;
  display: block;
  z-index: 1;
}
@media (max-width: 767px) {
  .auth-right .form-footer {
    bottom: 12px;
  }
}

.settings-page .page-header {
  margin-bottom: 14px;
}
.settings-page .page-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  color: #111827;
  line-height: 1.2;
}
.settings-page .page-header p {
  margin: 8px 0 0;
  color: #6B7280;
}
.settings-page .settings-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 980px;
}
.settings-page .settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 980px;
}
.settings-page .settings-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 24px;
}
.settings-page .settings-card h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  color: #111827;
  font-weight: 650;
}
.settings-page .settings-card h3 {
  margin: 20px 0 12px;
  font-size: 16px;
  color: #111827;
  font-weight: 600;
}
.settings-page .settings-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}
.settings-page .settings-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 500;
  color: #111827;
}
.settings-page .settings-card input[type=text],
.settings-page .settings-card input[type=email],
.settings-page .settings-card input[type=password],
.settings-page .settings-card textarea {
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  min-height: 46px;
  padding: 10px 14px;
  background: #F9FAFB;
  color: #111827;
  font-size: 16px;
  font-weight: 450;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.settings-page .settings-card input[type=text]:focus,
.settings-page .settings-card input[type=email]:focus,
.settings-page .settings-card input[type=password]:focus,
.settings-page .settings-card textarea:focus {
  outline: none;
  border-color: rgba(192, 57, 43, 0.5);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.14);
}
.settings-page .settings-card textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.45;
}
.settings-page .settings-card .field-error {
  font-size: 14px;
  color: #991B1B;
  font-weight: 600;
}
.settings-page .settings-card .hint {
  margin: 2px 0 0;
  color: #6B7280;
  font-size: 13px;
  line-height: 1.45;
}
.settings-page .settings-form-grid {
  display: grid;
  gap: 14px;
}
.settings-page .settings-form-grid--two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.settings-page .form-actions--start {
  justify-content: flex-start;
  margin-top: 8px;
}
.settings-page .inline-success {
  color: #065F46;
  font-weight: 600;
  font-size: 14px;
}
.settings-page .settings-status-row {
  margin-top: 2px;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.settings-page .settings-status-label {
  font-size: 13px;
  color: #6B7280;
  font-weight: 600;
}
.settings-page .settings-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}
.settings-page .settings-status-pill.is-linked {
  color: #065F46;
  background: #D1FAE5;
  border-color: rgba(16, 185, 129, 0.3);
}
.settings-page .settings-status-pill.is-unlinked {
  color: #92400E;
  background: #FEF3C7;
  border-color: rgba(245, 158, 11, 0.35);
}
.settings-page .settings-status-meta {
  margin-top: 0;
  margin-bottom: 0;
}
.settings-page .settings-status-error {
  margin: 0;
}
.settings-page .settings-diagnostics-box {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  background: #F9FAFB;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.settings-page .settings-diagnostics-item {
  margin: 0;
}

/* .settings-page .settings-divider {
  margin-top: 14px;
  border-top: 1px solid #E5E7EB;
} */

.settings-page--admin .settings-stack {
  gap: 28px;
}
.settings-page--admin .settings-intro {
  margin-top: 8px;
  margin-bottom: 12px;
}
.settings-page--admin .settings-card--maintenance {
  background: linear-gradient(180deg, #FFFFFF 0%, rgba(254, 242, 242, 0.3) 100%);
}
.settings-page--admin .maintenance-panel {
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  background: #FFFFFF;
  padding: 14px;
  margin-top: 4px;
}
.settings-page--admin .maintenance-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.settings-page--admin .maintenance-panel__head h3 {
  margin: 0 0 4px;
}
.settings-page--admin .maintenance-state {
  display: inline-flex;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}
.settings-page--admin .maintenance-state.is-on {
  color: #065F46;
  background: #D1FAE5;
  border-color: rgba(16, 185, 129, 0.3);
}
.settings-page--admin .maintenance-state.is-off {
  color: #991B1B;
  background: #FEE2E2;
  border-color: rgba(239, 68, 68, 0.25);
}
.settings-page--admin .maintenance-switch {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}
.settings-page--admin .maintenance-switch input[type=checkbox] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.settings-page--admin .maintenance-switch .toggle-slider {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #D1D5DB;
  position: relative;
  transition: background 0.2s ease;
}
.settings-page--admin .maintenance-switch .toggle-slider::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}
.settings-page--admin .maintenance-switch input[type=checkbox]:checked + .toggle-slider {
  background: #C0392B;
}
.settings-page--admin .maintenance-switch input[type=checkbox]:checked + .toggle-slider::after {
  transform: translateX(20px);
}
.settings-page--admin .maintenance-switch .maintenance-switch__label {
  line-height: 1.35;
}

@media (max-width: 1280px) {
  .settings-page .settings-card h2 {
    font-size: 28px;
  }
  .settings-page .settings-card label {
    font-size: 14px;
  }
  .settings-page .settings-card input[type=text],
  .settings-page .settings-card input[type=email],
  .settings-page .settings-card input[type=password],
  .settings-page .settings-card textarea {
    min-height: 44px;
    font-size: 15px;
  }
  .settings-page .inline-success {
    font-size: 13px;
  }
}
@media (max-width: 900px) {
  .settings-page .settings-grid {
    grid-template-columns: 1fr;
  }
  .settings-page .settings-form-grid--two-col {
    grid-template-columns: 1fr;
  }
  .settings-page .settings-card {
    padding: 18px;
  }
  .settings-page .settings-card h2 {
    font-size: 22px;
  }
  .settings-page .settings-card h3 {
    font-size: 15px;
  }
  .settings-page .settings-card label {
    font-size: 14px;
  }
  .settings-page .settings-card input[type=text],
  .settings-page .settings-card input[type=email],
  .settings-page .settings-card input[type=password],
  .settings-page .settings-card textarea {
    min-height: 42px;
    font-size: 15px;
  }
  .settings-page .inline-success {
    font-size: 13px;
  }
  .settings-page--admin .maintenance-panel__head {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* Generic cards */
.card, .metric-card,
.kpi-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 24px;
}
@media (max-width: 767px) {
  .card, .metric-card,
  .kpi-card {
    padding: 16px;
  }
}

/* Page header */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.page-header .page-header__title {
  font-size: 24px;
  font-weight: 600;
  color: #111827;
}
.page-header .page-header__subtitle {
  font-size: 14px;
  color: #6B7280;
  margin-top: 4px;
}
@media (max-width: 767px) {
  .page-header {
    flex-direction: column;
    align-items: stretch;
  }
  .page-header .page-header__title {
    font-size: 20px;
  }
  .page-header .btn-primary,
  .page-header .button-primary {
    width: 100%;
    justify-content: center;
  }
}

/* Metrics */
.metrics-grid,
.dashboard-metrics,
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 1023px) {
  .metrics-grid,
  .dashboard-metrics,
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 767px) {
  .metrics-grid,
  .dashboard-metrics,
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.metric-card,
.kpi-card {
  position: relative;
  overflow: hidden;
}
.metric-card .metric-card__label,
.metric-card .kpi-card__label,
.kpi-card .metric-card__label,
.kpi-card .kpi-card__label {
  font-size: 14px;
  color: #6B7280;
  font-weight: 400;
}
.metric-card .metric-card__value,
.metric-card .kpi-card__value,
.kpi-card .metric-card__value,
.kpi-card .kpi-card__value {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  margin: 8px 0 4px;
  line-height: 1;
}
.metric-card .metric-card__trend,
.metric-card .kpi-card__trend,
.kpi-card .metric-card__trend,
.kpi-card .kpi-card__trend {
  font-size: 12px;
  color: #6B7280;
  display: flex;
  align-items: center;
  gap: 4px;
}
.metric-card .metric-card__icon,
.metric-card .kpi-card__icon,
.metric-card .metric-icon,
.kpi-card .metric-card__icon,
.kpi-card .kpi-card__icon,
.kpi-card .metric-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.metric-card .metric-card__icon svg,
.metric-card .kpi-card__icon svg,
.metric-card .metric-icon svg,
.kpi-card .metric-card__icon svg,
.kpi-card .kpi-card__icon svg,
.kpi-card .metric-icon svg {
  width: 20px;
  height: 20px;
}
.metric-card--pending .metric-card__icon,
.metric-card--pending .kpi-card__icon,
.metric-card--pending .metric-icon,
.kpi-card--pending .metric-card__icon,
.kpi-card--pending .kpi-card__icon,
.kpi-card--pending .metric-icon {
  background: #FEF3C7;
  color: #92400E;
}
.metric-card--valid .metric-card__icon,
.metric-card--valid .kpi-card__icon,
.metric-card--valid .metric-icon, .metric-card--success .metric-card__icon,
.metric-card--success .kpi-card__icon,
.metric-card--success .metric-icon,
.kpi-card--valid .metric-card__icon,
.kpi-card--valid .kpi-card__icon,
.kpi-card--valid .metric-icon,
.kpi-card--success .metric-card__icon,
.kpi-card--success .kpi-card__icon,
.kpi-card--success .metric-icon {
  background: #D1FAE5;
  color: #065F46;
}
.metric-card--refused .metric-card__icon,
.metric-card--refused .kpi-card__icon,
.metric-card--refused .metric-icon, .metric-card--danger .metric-card__icon,
.metric-card--danger .kpi-card__icon,
.metric-card--danger .metric-icon,
.kpi-card--refused .metric-card__icon,
.kpi-card--refused .kpi-card__icon,
.kpi-card--refused .metric-icon,
.kpi-card--danger .metric-card__icon,
.kpi-card--danger .kpi-card__icon,
.kpi-card--danger .metric-icon {
  background: #FEE2E2;
  color: #991B1B;
}
.metric-card--paid .metric-card__icon,
.metric-card--paid .kpi-card__icon,
.metric-card--paid .metric-icon, .metric-card--info .metric-card__icon,
.metric-card--info .kpi-card__icon,
.metric-card--info .metric-icon,
.kpi-card--paid .metric-card__icon,
.kpi-card--paid .kpi-card__icon,
.kpi-card--paid .metric-icon,
.kpi-card--info .metric-card__icon,
.kpi-card--info .kpi-card__icon,
.kpi-card--info .metric-icon {
  background: #DBEAFE;
  color: #1E40AF;
}
.metric-card--euro .metric-card__icon,
.metric-card--euro .kpi-card__icon,
.metric-card--euro .metric-icon,
.kpi-card--euro .metric-card__icon,
.kpi-card--euro .kpi-card__icon,
.kpi-card--euro .metric-icon {
  background: #D1FAE5;
  color: #065F46;
}
.metric-card--delay .metric-card__icon,
.metric-card--delay .kpi-card__icon,
.metric-card--delay .metric-icon, .metric-card--purple .metric-card__icon,
.metric-card--purple .kpi-card__icon,
.metric-card--purple .metric-icon,
.kpi-card--delay .metric-card__icon,
.kpi-card--delay .kpi-card__icon,
.kpi-card--delay .metric-icon,
.kpi-card--purple .metric-card__icon,
.kpi-card--purple .kpi-card__icon,
.kpi-card--purple .metric-icon {
  background: #EDE9FE;
  color: #5B21B6;
}
@media (max-width: 767px) {
  .metric-card,
  .kpi-card {
    padding: 16px;
  }
  .metric-card .metric-card__value,
  .metric-card .kpi-card__value,
  .kpi-card .metric-card__value,
  .kpi-card .kpi-card__value {
    font-size: 24px;
  }
  .metric-card .metric-card__icon,
  .metric-card .kpi-card__icon,
  .metric-card .metric-icon,
  .kpi-card .metric-card__icon,
  .kpi-card .kpi-card__icon,
  .kpi-card .metric-icon {
    width: 32px;
    height: 32px;
    top: 16px;
    right: 16px;
  }
}

.admin-table-footer {
  padding: 12px 0 4px;
  display: flex;
  justify-content: flex-start;
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.badge--pending {
  background: #FEF3C7;
  color: #92400E;
}
.badge--valid, .badge--success {
  background: #D1FAE5;
  color: #065F46;
}
.badge--refused, .badge--danger {
  background: #FEE2E2;
  color: #991B1B;
}
.badge--paid, .badge--info {
  background: #DBEAFE;
  color: #1E40AF;
}
.badge--draft {
  background: #F3F4F6;
  color: #374151;
}

/* Role badges */
.role-badge,
.role-pill {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
}
.role-badge--user, .role-badge.role-user,
.role-pill--user,
.role-pill.role-user {
  background: #EDE9FE;
  color: #5B21B6;
}
.role-badge--admin, .role-badge.role-admin,
.role-pill--admin,
.role-pill.role-admin {
  background: #FEF3C7;
  color: #92400E;
}

/* Buttons */
.btn,
.button,
.button-primary,
.button-outlined,
.button-secondary,
.btn-validate,
.btn-reject,
.btn-complement,
.btn-view,
#filter-apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease, opacity 200ms ease;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:disabled, .btn.btn--disabled,
.button:disabled,
.button.btn--disabled,
.button-primary:disabled,
.button-primary.btn--disabled,
.button-outlined:disabled,
.button-outlined.btn--disabled,
.button-secondary:disabled,
.button-secondary.btn--disabled,
.btn-validate:disabled,
.btn-validate.btn--disabled,
.btn-reject:disabled,
.btn-reject.btn--disabled,
.btn-complement:disabled,
.btn-complement.btn--disabled,
.btn-view:disabled,
.btn-view.btn--disabled,
#filter-apply:disabled,
#filter-apply.btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--primary,
.button-primary,
.button.button-primary,
#filter-apply {
  background: #C0392B;
  color: white;
}
.btn--primary:hover:not(:disabled),
.button-primary:hover:not(:disabled),
.button.button-primary:hover:not(:disabled),
#filter-apply:hover:not(:disabled) {
  background: #A93226;
}

.btn--outlined,
.button-outlined,
.button-secondary,
.btn-view {
  background: transparent;
  border-color: #E5E7EB;
  color: #111827;
}
.btn--outlined:hover:not(:disabled),
.button-outlined:hover:not(:disabled),
.button-secondary:hover:not(:disabled),
.btn-view:hover:not(:disabled) {
  border-color: #6B7280;
}

.btn--outlined-red {
  background: transparent;
  border-color: #C0392B;
  color: #C0392B;
}
.btn--outlined-red:hover:not(:disabled) {
  background: #FEF2F2;
}

.btn--validate,
.btn-validate,
.button-success {
  background: #065F46;
  color: white;
  font-size: 13px;
  padding: 6px 12px;
}
.btn--validate:hover:not(:disabled),
.btn-validate:hover:not(:disabled),
.button-success:hover:not(:disabled) {
  background: #047857;
}

.btn--reject,
.btn-reject,
.button-danger,
.btn-complement {
  background: transparent;
  border-color: #C0392B;
  color: #C0392B;
  font-size: 13px;
  padding: 6px 12px;
}
.btn--reject:hover:not(:disabled),
.btn-reject:hover:not(:disabled),
.button-danger:hover:not(:disabled),
.btn-complement:hover:not(:disabled) {
  background: #FEF2F2;
}

.btn--sm,
.button-small {
  padding: 6px 12px;
  font-size: 13px;
}

.btn--lg {
  padding: 14px 24px;
  font-size: 16px;
}

.btn--full,
.button-full {
  width: 100%;
}

@media (max-width: 767px) {
  .btn,
  .button,
  .button-primary,
  .button-outlined,
  .button-secondary,
  .btn-validate,
  .btn-reject,
  .btn-complement,
  .btn-view,
  #filter-apply {
    padding: 10px 16px;
  }
}
/* Tables */
.table-wrapper,
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table,
.notes-table,
.table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th,
.notes-table th,
.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6B7280;
  padding: 12px 16px;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
}
.data-table td,
.notes-table td,
.table td {
  padding: 16px;
  border-bottom: 1px solid #F3F4F6;
  color: #111827;
  font-size: 14px;
  vertical-align: middle;
}
.data-table tr:hover td,
.notes-table tr:hover td,
.table tr:hover td {
  background: #F9FAFB;
}
.data-table tr:last-child td,
.notes-table tr:last-child td,
.table tr:last-child td {
  border-bottom: none;
}
.data-table .table__id,
.data-table .link-red,
.data-table .note-link,
.notes-table .table__id,
.notes-table .link-red,
.notes-table .note-link,
.table .table__id,
.table .link-red,
.table .note-link {
  color: #C0392B;
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
}
.data-table .table__id:hover,
.data-table .link-red:hover,
.data-table .note-link:hover,
.notes-table .table__id:hover,
.notes-table .link-red:hover,
.notes-table .note-link:hover,
.table .table__id:hover,
.table .link-red:hover,
.table .note-link:hover {
  text-decoration: underline;
}
.data-table .table__amount,
.notes-table .table__amount,
.table .table__amount {
  font-weight: 600;
  white-space: nowrap;
}
.data-table .table__actions,
.data-table .actions,
.data-table .actions-cell,
.notes-table .table__actions,
.notes-table .actions,
.notes-table .actions-cell,
.table .table__actions,
.table .actions,
.table .actions-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.data-table .table__actions .action-icon,
.data-table .table__actions .icon-action,
.data-table .actions .action-icon,
.data-table .actions .icon-action,
.data-table .actions-cell .action-icon,
.data-table .actions-cell .icon-action,
.notes-table .table__actions .action-icon,
.notes-table .table__actions .icon-action,
.notes-table .actions .action-icon,
.notes-table .actions .icon-action,
.notes-table .actions-cell .action-icon,
.notes-table .actions-cell .icon-action,
.table .table__actions .action-icon,
.table .table__actions .icon-action,
.table .actions .action-icon,
.table .actions .icon-action,
.table .actions-cell .action-icon,
.table .actions-cell .icon-action {
  color: #6B7280;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  border: 0;
  background: transparent;
}
.data-table .table__actions .action-icon:hover,
.data-table .table__actions .icon-action:hover,
.data-table .actions .action-icon:hover,
.data-table .actions .icon-action:hover,
.data-table .actions-cell .action-icon:hover,
.data-table .actions-cell .icon-action:hover,
.notes-table .table__actions .action-icon:hover,
.notes-table .table__actions .icon-action:hover,
.notes-table .actions .action-icon:hover,
.notes-table .actions .icon-action:hover,
.notes-table .actions-cell .action-icon:hover,
.notes-table .actions-cell .icon-action:hover,
.table .table__actions .action-icon:hover,
.table .table__actions .icon-action:hover,
.table .actions .action-icon:hover,
.table .actions .icon-action:hover,
.table .actions-cell .action-icon:hover,
.table .actions-cell .icon-action:hover {
  color: #111827;
  background: #F3F4F6;
}
@media (max-width: 767px) {
  .data-table thead,
  .notes-table thead,
  .table thead {
    display: none;
  }
  .data-table tr,
  .notes-table tr,
  .table tr {
    display: block;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  }
  .data-table td,
  .notes-table td,
  .table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #F3F4F6;
    font-size: 13px;
  }
  .data-table td:last-child,
  .notes-table td:last-child,
  .table td:last-child {
    border-bottom: none;
  }
  .data-table td::before,
  .notes-table td::before,
  .table td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    color: #6B7280;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    margin-right: 12px;
  }
}

/* Filter chips */
.filter-chips,
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.filter-chips .chip,
.chips-row .chip {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #6B7280;
  transition: all 200ms ease;
}
.filter-chips .chip:hover,
.chips-row .chip:hover {
  border-color: #6B7280;
  color: #111827;
}
.filter-chips .chip.active, .filter-chips .chip.chip--active,
.chips-row .chip.active,
.chips-row .chip.chip--active {
  background: #FFFFFF;
  border-color: #C0392B;
  color: #C0392B;
  font-weight: 500;
}

/* Avatar */
.avatar,
.user-avatar {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}
.avatar--sm,
.user-avatar--sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}
.avatar--md,
.user-avatar--md {
  width: 36px;
  height: 36px;
  font-size: 13px;
}
.avatar--lg,
.user-avatar--lg {
  width: 48px;
  height: 48px;
  font-size: 16px;
}
.avatar--red,
.user-avatar--red {
  background: #C0392B;
}
.avatar--gray,
.user-avatar--gray {
  background: #4B5563;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.modal-overlay.modal-overlay--open, .modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal,
.modal-card {
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  position: relative;
  transform: translateY(16px);
  transition: transform 200ms ease;
}
.modal-overlay--open .modal, .open .modal,
.modal-overlay--open .modal-card,
.open .modal-card {
  transform: translateY(0);
}
.modal .modal__header,
.modal-card .modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal .modal__header .modal__title,
.modal-card .modal__header .modal__title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}
.modal .modal__header .modal__close,
.modal-card .modal__header .modal__close {
  background: none;
  border: none;
  cursor: pointer;
  color: #6B7280;
  padding: 4px;
  border-radius: 4px;
}
.modal .modal__header .modal__close:hover,
.modal-card .modal__header .modal__close:hover {
  color: #111827;
  background: #F9FAFB;
}
.modal .modal__footer,
.modal .modal-actions,
.modal-card .modal__footer,
.modal-card .modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}
@media (max-width: 767px) {
  .modal .modal__footer,
  .modal .modal-actions,
  .modal-card .modal__footer,
  .modal-card .modal-actions {
    flex-direction: column-reverse;
  }
}
@media (max-width: 767px) {
  .modal,
  .modal-card {
    padding: 24px 20px;
  }
}

/* Side drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.drawer-overlay.drawer-overlay--open, .drawer-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.side-drawer,
.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  height: 100vh;
  background: #FFFFFF;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  z-index: 400;
  transform: translateX(100%);
  transition: transform 300ms ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.side-drawer.side-drawer--open, .side-drawer.open,
.drawer-panel.side-drawer--open,
.drawer-panel.open {
  transform: translateX(0);
}
@media (max-width: 767px) {
  .side-drawer,
  .drawer-panel {
    width: 100%;
  }
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.drawer-content {
  padding: 20px;
  overflow-y: auto;
}

.drawer-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.drawer-values strong {
  font-size: 48px;
  line-height: 1;
  color: #111827;
}

.drawer-section {
  margin-bottom: 16px;
}
.drawer-section h3 {
  margin: 0 0 10px;
  font-size: 28px;
  color: #111827;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.drawer-motif {
  margin: 0;
  font-size: 32px;
  line-height: 1.25;
  color: #111827;
  font-weight: 600;
}

.drawer-subline {
  margin: 6px 0 0;
  color: #6B7280;
  font-size: 24px;
}

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

.drawer-field span {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
  color: #9CA3AF;
  font-weight: 600;
}
.drawer-field strong {
  font-size: 16px;
  color: #111827;
  font-weight: 600;
}

.drawer-cost-list {
  display: grid;
  gap: 0;
}

.drawer-cost-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #E5E7EB;
}
.drawer-cost-item:last-child {
  border-bottom: 0;
}
.drawer-cost-item span {
  font-size: 16px;
  color: #6B7280;
}
.drawer-cost-item strong {
  font-size: 30px;
  line-height: 1;
  color: #111827;
  font-weight: 700;
}

.drawer-footer {
  border-top: 1px solid #E5E7EB;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #FFFFFF;
}

.drawer-complement-link {
  border: none;
  background: transparent;
  color: #6B7280;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.drawer-complement-link:hover {
  color: #C0392B;
}

.drawer-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 900px) {
  .drawer-content {
    padding: 14px;
  }
  .drawer-values strong {
    font-size: 36px;
  }
  .drawer-section h3 {
    font-size: 22px;
  }
  .drawer-motif {
    font-size: 24px;
  }
  .drawer-subline {
    font-size: 18px;
  }
  .drawer-grid {
    grid-template-columns: 1fr;
  }
  .drawer-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .drawer-footer-actions {
    justify-content: flex-end;
  }
}
/* Timeline */
.workflow-timeline,
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.workflow-timeline .timeline-step,
.timeline .timeline-step {
  display: flex;
  gap: 16px;
  position: relative;
}
.workflow-timeline .timeline-step::before,
.timeline .timeline-step::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 36px;
  width: 2px;
  height: calc(100% - 16px);
  background: #E5E7EB;
}
.workflow-timeline .timeline-step:last-child::before,
.timeline .timeline-step:last-child::before {
  display: none;
}
.workflow-timeline .timeline-step .timeline-step__icon,
.workflow-timeline .timeline-step .timeline-icon,
.timeline .timeline-step .timeline-step__icon,
.timeline .timeline-step .timeline-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
  font-size: 14px;
  background: #F9FAFB;
  color: #6B7280;
}
.workflow-timeline .timeline-step .timeline-step__content,
.workflow-timeline .timeline-step .timeline-text,
.timeline .timeline-step .timeline-step__content,
.timeline .timeline-step .timeline-text {
  padding-bottom: 24px;
}
.workflow-timeline .timeline-step .timeline-step__content .timeline-step__label,
.workflow-timeline .timeline-step .timeline-step__content strong,
.workflow-timeline .timeline-step .timeline-text .timeline-step__label,
.workflow-timeline .timeline-step .timeline-text strong,
.timeline .timeline-step .timeline-step__content .timeline-step__label,
.timeline .timeline-step .timeline-step__content strong,
.timeline .timeline-step .timeline-text .timeline-step__label,
.timeline .timeline-step .timeline-text strong {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}
.workflow-timeline .timeline-step .timeline-step__content .timeline-step__date,
.workflow-timeline .timeline-step .timeline-step__content span,
.workflow-timeline .timeline-step .timeline-text .timeline-step__date,
.workflow-timeline .timeline-step .timeline-text span,
.timeline .timeline-step .timeline-step__content .timeline-step__date,
.timeline .timeline-step .timeline-step__content span,
.timeline .timeline-step .timeline-text .timeline-step__date,
.timeline .timeline-step .timeline-text span {
  font-size: 12px;
  color: #6B7280;
  margin-top: 2px;
}
.workflow-timeline .timeline-step--done .timeline-step__icon,
.workflow-timeline .timeline-step--done .timeline-icon,
.timeline .timeline-step--done .timeline-step__icon,
.timeline .timeline-step--done .timeline-icon {
  background: #D1FAE5;
  color: #065F46;
}
.workflow-timeline .timeline-step--done::before,
.timeline .timeline-step--done::before {
  background: #D1FAE5;
}
.workflow-timeline .timeline-step--current .timeline-step__icon,
.workflow-timeline .timeline-step--current .timeline-icon,
.timeline .timeline-step--current .timeline-step__icon,
.timeline .timeline-step--current .timeline-icon {
  background: #FEF3C7;
  color: #F59E0B;
  animation: pulse-timeline 2s infinite;
}
.workflow-timeline .timeline-step--current .timeline-step__label,
.timeline .timeline-step--current .timeline-step__label {
  color: #F59E0B;
  font-weight: 600;
}
.workflow-timeline .timeline-step--future .timeline-step__icon,
.workflow-timeline .timeline-step--future .timeline-icon,
.timeline .timeline-step--future .timeline-step__icon,
.timeline .timeline-step--future .timeline-icon {
  background: #F9FAFB;
  color: #6B7280;
}
.workflow-timeline .timeline-step--future .timeline-step__label,
.timeline .timeline-step--future .timeline-step__label {
  color: #6B7280;
}

@keyframes pulse-timeline {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
  }
}
/* Form stepper */
.form-stepper,
.progress-steps {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 16px 24px;
  background: #FFFFFF;
  border-bottom: 1px solid #E5E7EB;
  position: sticky;
  top: 64px;
  z-index: 50;
}
.form-stepper .stepper-step,
.form-stepper .progress-step,
.progress-steps .stepper-step,
.progress-steps .progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.form-stepper .stepper-step .stepper-step__circle,
.form-stepper .stepper-step .step-indicator,
.form-stepper .progress-step .stepper-step__circle,
.form-stepper .progress-step .step-indicator,
.progress-steps .stepper-step .stepper-step__circle,
.progress-steps .stepper-step .step-indicator,
.progress-steps .progress-step .stepper-step__circle,
.progress-steps .progress-step .step-indicator {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  background: #F9FAFB;
  color: #6B7280;
}
.form-stepper .stepper-step .stepper-step__label,
.form-stepper .stepper-step .step-label,
.form-stepper .progress-step .stepper-step__label,
.form-stepper .progress-step .step-label,
.progress-steps .stepper-step .stepper-step__label,
.progress-steps .stepper-step .step-label,
.progress-steps .progress-step .stepper-step__label,
.progress-steps .progress-step .step-label {
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
}
.form-stepper .stepper-step--active .stepper-step__circle,
.form-stepper .stepper-step--active .step-indicator,
.form-stepper .progress-step--active .stepper-step__circle,
.form-stepper .progress-step--active .step-indicator,
.progress-steps .stepper-step--active .stepper-step__circle,
.progress-steps .stepper-step--active .step-indicator,
.progress-steps .progress-step--active .stepper-step__circle,
.progress-steps .progress-step--active .step-indicator {
  background: #C0392B;
  color: white;
}
.form-stepper .stepper-step--active .stepper-step__label,
.form-stepper .progress-step--active .stepper-step__label,
.progress-steps .stepper-step--active .stepper-step__label,
.progress-steps .progress-step--active .stepper-step__label {
  color: #C0392B;
  font-weight: 500;
}
.form-stepper .stepper-step--done .stepper-step__circle,
.form-stepper .stepper-step--done .step-indicator,
.form-stepper .progress-step--done .stepper-step__circle,
.form-stepper .progress-step--done .step-indicator,
.progress-steps .stepper-step--done .stepper-step__circle,
.progress-steps .stepper-step--done .step-indicator,
.progress-steps .progress-step--done .stepper-step__circle,
.progress-steps .progress-step--done .step-indicator {
  background: #D1FAE5;
  color: #065F46;
}
.form-stepper .stepper-step--done .stepper-step__label,
.form-stepper .progress-step--done .stepper-step__label,
.progress-steps .stepper-step--done .stepper-step__label,
.progress-steps .progress-step--done .stepper-step__label {
  color: #065F46;
}
.form-stepper .stepper-step--future .stepper-step__circle,
.form-stepper .stepper-step--future .step-indicator,
.form-stepper .progress-step--future .stepper-step__circle,
.form-stepper .progress-step--future .step-indicator,
.progress-steps .stepper-step--future .stepper-step__circle,
.progress-steps .stepper-step--future .step-indicator,
.progress-steps .progress-step--future .stepper-step__circle,
.progress-steps .progress-step--future .step-indicator {
  background: #F9FAFB;
  color: #6B7280;
}
.form-stepper .stepper-step--future .stepper-step__label,
.form-stepper .progress-step--future .stepper-step__label,
.progress-steps .stepper-step--future .stepper-step__label,
.progress-steps .progress-step--future .stepper-step__label {
  color: #6B7280;
}
.form-stepper .stepper-divider,
.progress-steps .stepper-divider {
  flex: 1;
  height: 1px;
  background: #E5E7EB;
  margin: 0 8px;
  max-width: 40px;
}
@media (max-width: 767px) {
  .form-stepper,
  .progress-steps {
    padding: 12px 16px;
  }
  .form-stepper .stepper-step__label,
  .form-stepper .step-label,
  .progress-steps .stepper-step__label,
  .progress-steps .step-label {
    display: none;
  }
  .form-stepper .stepper-divider,
  .progress-steps .stepper-divider {
    max-width: 20px;
  }
}

/* Sticky form footer */
.form-footer,
.note-footer {
  position: sticky;
  bottom: 0;
  background: #FFFFFF;
  border-top: 1px solid #E5E7EB;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
  gap: 16px;
}
.form-footer .form-footer__totals,
.note-footer .form-footer__totals {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #6B7280;
}
.form-footer .form-footer__totals .form-footer__total-main,
.note-footer .form-footer__totals .form-footer__total-main {
  font-size: 16px;
  font-weight: 700;
  color: #C0392B;
}
.form-footer .form-footer__actions,
.form-footer .button-group,
.note-footer .form-footer__actions,
.note-footer .button-group {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
@media (max-width: 767px) {
  .form-footer,
  .note-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .form-footer .form-footer__totals,
  .note-footer .form-footer__totals {
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
  }
  .form-footer .form-footer__actions,
  .form-footer .button-group,
  .note-footer .form-footer__actions,
  .note-footer .button-group {
    flex-direction: column-reverse;
  }
  .form-footer .btn,
  .form-footer .button,
  .form-footer .button-primary,
  .form-footer .button-outlined,
  .note-footer .btn,
  .note-footer .button,
  .note-footer .button-primary,
  .note-footer .button-outlined {
    width: 100%;
  }
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
}
.pagination .page-btn,
.pagination .page-link,
.pagination a,
.pagination button {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 200ms ease;
  text-decoration: none;
}
.pagination .page-btn:hover,
.pagination .page-link:hover,
.pagination a:hover,
.pagination button:hover {
  border-color: #6B7280;
  color: #111827;
}
.pagination .page-btn.active,
.pagination .page-link.active,
.pagination a.active,
.pagination button.active {
  background: #C0392B;
  border-color: #C0392B;
  color: white;
}
.pagination .page-btn:disabled, .pagination .page-btn.disabled,
.pagination .page-link:disabled,
.pagination .page-link.disabled,
.pagination a:disabled,
.pagination a.disabled,
.pagination button:disabled,
.pagination button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.form-group {
  margin-bottom: 24px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  margin-bottom: 8px;
}
.form-group label .required {
  color: #C0392B;
}
.form-group .form-error {
  font-size: 12px;
  color: #991B1B;
  margin-top: 4px;
}
.form-group .form-hint {
  font-size: 12px;
  color: #9CA3AF;
  margin-top: 4px;
}

input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=date],
input[type=tel],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background-color: #FFFFFF;
  color: #111827;
  transition: all 200ms ease;
}
input[type=text]::placeholder,
input[type=email]::placeholder,
input[type=password]::placeholder,
input[type=number]::placeholder,
input[type=date]::placeholder,
input[type=tel]::placeholder,
select::placeholder,
textarea::placeholder {
  color: #9CA3AF;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus,
input[type=number]:focus,
input[type=date]:focus,
input[type=tel]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #C0392B;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}
input[type=text]:disabled,
input[type=email]:disabled,
input[type=password]:disabled,
input[type=number]:disabled,
input[type=date]:disabled,
input[type=tel]:disabled,
select:disabled,
textarea:disabled {
  background-color: #F9FAFB;
  color: #9CA3AF;
  cursor: not-allowed;
  opacity: 0.6;
}
input[type=text].error,
input[type=email].error,
input[type=password].error,
input[type=number].error,
input[type=date].error,
input[type=tel].error,
select.error,
textarea.error {
  border-color: #991B1B;
}
input[type=text].error:focus,
input[type=email].error:focus,
input[type=password].error:focus,
input[type=number].error:focus,
input[type=date].error:focus,
input[type=tel].error:focus,
select.error:focus,
textarea.error:focus {
  box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.1);
}
input[type=text].success,
input[type=email].success,
input[type=password].success,
input[type=number].success,
input[type=date].success,
input[type=tel].success,
select.success,
textarea.success {
  border-color: #065F46;
}
input[type=text].success:focus,
input[type=email].success:focus,
input[type=password].success:focus,
input[type=number].success:focus,
input[type=date].success:focus,
input[type=tel].success:focus,
select.success:focus,
textarea.success:focus {
  box-shadow: 0 0 0 3px rgba(6, 95, 70, 0.1);
}

/* textarea {
  resize: vertical;
  min-height: 120px;
} */

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

input[type=checkbox],
input[type=radio] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #C0392B;
}

.checkbox,
.radio {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.checkbox input,
.radio input {
  flex-shrink: 0;
}
.checkbox label,
.radio label {
  margin-bottom: 0;
  cursor: pointer;
  flex: 1;
}

.toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.toggle input {
  display: none;
}
.toggle .toggle-slider {
  position: relative;
  width: 48px;
  height: 24px;
  background-color: #D1D5DB;
  border-radius: 100px;
  transition: background-color 200ms ease;
}
.toggle .toggle-slider::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: #FFFFFF;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: left 200ms ease;
}
.toggle input:checked + .toggle-slider {
  background-color: #C0392B;
}
.toggle input:checked + .toggle-slider::after {
  left: 26px;
}
.toggle input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-form-header {
  margin-bottom: 32px;
}
.auth-form-header h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  color: #111827;
  font-weight: 600;
}
.auth-form-header p {
  margin: 8px 0 0;
  color: #6B7280;
  font-size: 16px;
}

.auth-form {
  background: #FFFFFF;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}
.auth-form input,
.auth-form .button,
.auth-form .auth-reset-link,
.auth-form .password-toggle {
  transition: all 180ms ease;
}

.auth-error {
  margin-bottom: 16px;
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FECACA;
  border-radius: 12px;
  padding: 10px 12px;
}

.auth-success {
  margin-bottom: 16px;
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  border-radius: 12px;
  padding: 10px 12px;
}

.auth-field-hint {
  margin: 4px 0 0;
  color: #6B7280;
  font-size: 14px;
  line-height: 1.4;
}

.auth-validation-note {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
}

.auth-validation-note.is-neutral {
  color: #6B7280;
}

.auth-validation-note.is-valid {
  color: #065F46;
}

.auth-validation-note.is-invalid {
  color: #991B1B;
}

.form-field {
  display: block;
  margin-bottom: 16px;
}
.form-field label {
  display: block;
  font-size: 18px;
  font-weight: 500;
  color: #111827;
  margin-bottom: 8px;
}

.password-field {
  position: relative;
}
.password-field input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 16px;
  bottom: 11px;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #9CA3AF;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.password-toggle img {
  width: 18px;
  height: 18px;
  display: block;
}
.password-toggle .icon-eye-off {
  display: none;
}
.password-toggle.is-active .icon-eye {
  display: none;
}
.password-toggle.is-active .icon-eye-off {
  display: block;
}
.password-toggle:focus-visible {
  outline: 2px solid #C0392B;
  outline-offset: 2px;
  border-radius: 4px;
}

.auth-reset-link {
  display: block;
  margin-top: 16px;
  text-align: center;
  color: #C0392B;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.auth-reset-link:hover {
  color: #A93226;
  text-decoration: none;
}

.auth-reset-link:focus-visible {
  outline: 2px solid rgba(192, 57, 43, 0.3);
  outline-offset: 2px;
  border-radius: 6px;
}

.auth-security-divider {
  margin: 32px 0 24px;
  text-align: center;
  border-top: 1px solid #E5E7EB;
}
.auth-security-divider span {
  display: inline-block;
  transform: translateY(-50%);
  background: #FFFFFF;
  padding: 0 16px;
  color: #9CA3AF;
  font-size: 14px;
}

.auth-security-card {
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  background: #F9FAFB;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth-security-copy h2 {
  margin: 0;
  font-size: 20px;
  color: #111827;
}
.auth-security-copy p {
  margin: 4px 0 0;
  font-size: 14px;
  color: #9CA3AF;
}

.note-page {
  display: flex;
  flex-direction: column;
  gap: 0;
  /* padding-bottom: 120px; */
}

.note-sticky-header {
  position: sticky;
  top: 64px;
  z-index: 55;
  background: #F9FAFB;
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.06);
}

.note-page .header-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  margin: 0 24px;
  border: 1px solid #FECACA;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #FEF2F2;
}
.note-page .header-band h1 {
  margin: 0;
  color: #C0392B;
  font-size: 20px;
  font-weight: 600;
}
.note-page .header-band p {
  margin: 4px 0 0;
  color: #6B7280;
  font-size: 13px;
}

.note-page .header-recu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #6B7280;
}
.note-page .header-recu input {
  width: 108px;
  padding: 8px 10px;
  border: 1px dashed #E5E7EB;
  background: #F9FAFB;
  border-radius: 6px;
  color: #9CA3AF;
  font-weight: 600;
}

.note-page .progress-steps {
  margin: 0 24px;
  border: 1px solid #E5E7EB;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  position: static;
  top: auto;
}

.note-page .note-stage {
  scroll-margin-top: 220px;
}

.note-page .ors-status {
  min-height: 1.5rem;
  font-size: 13px;
}

.note-page .ors-success {
  color: #065F46;
}

.note-page .ors-error {
  color: #991B1B;
}

.note-page .note-form-card {
  margin: 20px 24px 0;
}

.note-page .form-readonly {
  background: #FEF3C7;
  border-color: #F59E0B;
}

.note-page .upload-zone-title {
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
  color: #111827;
  font-weight: 600;
  font-size: 12px;
}

.note-page .upload-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.note-page .upload-item-pdf {
  font-weight: 700;
  color: #C0392B;
}

.note-page .upload-item-info div {
  font-size: 0.85rem;
  color: #6B7280;
}

@media (max-width: 767px) {
  .note-page .header-band,
  .note-page .progress-steps,
  .note-page .note-form-card {
    margin-left: 12px;
    margin-right: 12px;
  }
  .note-page .note-stage {
    scroll-margin-top: 180px;
  }
  .note-page .header-band {
    flex-direction: column;
    align-items: flex-start;
  }
}
.input-group {
  display: flex;
  gap: 0;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
  background-color: #FFFFFF;
}
.input-group:focus-within {
  border-color: #C0392B;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}
.input-group input,
.input-group select,
.input-group button {
  border: none;
  border-radius: 0;
}
.input-group input:focus,
.input-group select:focus {
  box-shadow: none;
}
.input-group .input-addon {
  display: flex;
  align-items: center;
  padding: 0 16px;
  background-color: #F9FAFB;
  color: #9CA3AF;
  font-size: 13px;
  border-right: 1px solid #E5E7EB;
}
.input-group .input-addon.addon-right {
  border-right: none;
  border-left: 1px solid #E5E7EB;
  order: 2;
}
.input-group input,
.input-group select {
  flex: 1;
  padding: 12px 16px;
}

.form-grid {
  display: grid;
  gap: 24px;
}
@media (min-width: 768px) {
  .form-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.file-input {
  position: relative;
}
.file-input input[type=file] {
  display: none;
}
.file-input .file-label {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  padding: 48px;
  border: 2px dashed #E5E7EB;
  border-radius: 8px;
  background-color: #FFFFFF;
  cursor: pointer;
  transition: all 200ms ease;
  text-align: center;
}
.file-input .file-label svg {
  width: 32px;
  height: 32px;
  color: #9CA3AF;
}
.file-input .file-label span {
  color: #9CA3AF;
  font-size: 14px;
}
.file-input .file-label:hover {
  border-color: #C0392B;
  background-color: #FEF2F2;
}
.file-input .file-label:hover svg {
  color: #C0392B;
}
.file-input .file-label:hover span {
  color: #C0392B;
}
.file-input.dragover .file-label {
  border-color: #C0392B;
  background-color: #FEF2F2;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
}
.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
}

table {
  width: 100%;
  font-size: 14px;
}
table thead {
  background-color: #F9FAFB;
  border-bottom: 2px solid #E5E7EB;
}
table thead th {
  padding: 16px;
  text-align: left;
  font-weight: 600;
  color: #9CA3AF;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
table thead th:first-child {
  padding-left: 24px;
}
table thead th:last-child {
  padding-right: 24px;
}
table tbody tr {
  transition: background-color 200ms ease;
}
table tbody tr:hover {
  background-color: #F9FAFB;
}
table tbody tr td {
  padding: 16px;
  color: #111827;
}
table tbody tr td:first-child {
  padding-left: 24px;
}
table tbody tr td:last-child {
  padding-right: 24px;
}
table a {
  color: #C0392B;
  text-decoration: none;
  font-weight: 500;
  transition: color 200ms ease;
}
table a:hover {
  color: #A93226;
  text-decoration: underline;
}
table strong {
  font-weight: 600;
  color: #111827;
}
table .table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
table .table-actions button,
table .table-actions a {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background-color: #F9FAFB;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease;
  color: #9CA3AF;
}
table .table-actions button svg,
table .table-actions a svg {
  width: 16px;
  height: 16px;
}
table .table-actions button:hover,
table .table-actions a:hover {
  background-color: #FEF2F2;
  color: #C0392B;
}
table .table-actions button.danger:hover,
table .table-actions a.danger:hover {
  background-color: #FEE2E2;
  color: #991B1B;
}
table .table-actions button.success:hover,
table .table-actions a.success:hover {
  background-color: #D1FAE5;
  color: #065F46;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.pagination a,
.pagination button,
.pagination span {
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #E5E7EB;
  background-color: #FFFFFF;
  color: #111827;
  border-radius: 6px;
  cursor: pointer;
  transition: all 200ms ease;
  font-size: 13px;
  text-decoration: none;
}
.pagination a:hover,
.pagination button:hover,
.pagination span:hover {
  border-color: #C0392B;
  color: #C0392B;
  background-color: #FEF2F2;
}
.pagination a.active,
.pagination button.active,
.pagination span.active {
  background-color: #C0392B;
  color: #FFFFFF;
  border-color: #C0392B;
}
.pagination a.disabled,
.pagination button.disabled,
.pagination span.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.pagination a.disabled:hover,
.pagination button.disabled:hover,
.pagination span.disabled:hover {
  border-color: #E5E7EB;
  color: #111827;
  background-color: #FFFFFF;
}

@media (max-width: 767px) {
  .table-wrapper {
    overflow-x: auto;
  }
  table thead {
    display: none;
  }
  table tbody tr {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    margin-bottom: 24px;
    overflow: hidden;
  }
  table tbody tr td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #E5E7EB;
  }
  table tbody tr td:last-child {
    border-bottom: none;
  }
  table tbody tr td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #9CA3AF;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
}
/* Primary */
/* Surfaces */
/* Borders */
/* Text */
/* Sidebar */
/* Topbar */
/* Status badges */
/* Metric accents */
/* Table action buttons */
/* Avatars / roles */
/* Toggle */
/* Form */
/* Alerts */
/* Exports */
/* Organization */
/* Layout */
/* Useful scale */
/* Breakpoints */
/* Compatibility aliases */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  color: #111827;
  background-color: #F9FAFB;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@keyframes fade-up-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.dashboard-page,
.notes-page,
.admin-dashboard-page,
.admin-table-card,
.users-table-card,
.org-card,
.note-form-card,
.filter-card,
.table-card {
  animation: fade-up-in 260ms ease-out both;
}

.card,
.metric-card,
.kpi-card,
.admin-table-card,
.users-table-card,
.org-card,
.filter-card,
.table-card {
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.card:hover,
.metric-card:hover,
.kpi-card:hover,
.admin-table-card:hover,
.users-table-card:hover,
.org-card:hover,
.filter-card:hover,
.table-card:hover {
  transform: translateY(-1px);
}

a,
button,
input,
select,
textarea {
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(192, 57, 43, 0.35);
  outline-offset: 2px;
}

.ui-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex-shrink: 0;
}

.metric-icon .ui-icon,
.kpi-card__icon .ui-icon,
.section-title .ui-icon {
  width: 20px;
  height: 20px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 5px;
  color: #111827;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 18px;
}

h4 {
  font-size: 18px;
}

h5 {
  font-size: 16px;
}

h6 {
  font-size: 14px;
}

p {
  /* margin-bottom: 16px; */
  color: #6B7280;
}

a {
  color: #C0392B;
  text-decoration: none;
  transition: color 200ms ease;
}
a:hover {
  color: #A93226;
}

small {
  font-size: 12px;
  color: #9CA3AF;
}

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

code {
  background-color: #F9FAFB;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.9em;
  color: #991B1B;
}

pre {
  background-color: #111827;
  color: #F3F4F6;
  padding: 24px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 24px;
}
pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
}

ul, ol {
  margin-bottom: 24px;
  padding-left: 24px;
}
ul li, ol li {
  margin-bottom: 8px;
}

dl {
  margin-bottom: 24px;
}
dl dt {
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}
dl dd {
  margin-bottom: 16px;
  color: #9CA3AF;
}

hr {
  border: none;
  border-top: 1px solid #E5E7EB;
  margin: 24px 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 767px) {
  .container {
    padding: 0 16px;
  }
}

.grid {
  display: grid;
  gap: 24px;
}
@media (min-width: 768px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.flex {
  display: flex;
}
.flex--center {
  align-items: center;
}
.flex--between {
  justify-content: space-between;
}
.flex--end {
  justify-content: flex-end;
}
.flex--start {
  justify-content: flex-start;
}
.flex--gap-sm {
  gap: 8px;
}
.flex--gap-md {
  gap: 16px;
}
.flex--gap-lg {
  gap: 24px;
}
.flex--column {
  flex-direction: column;
}
.flex--wrap {
  flex-wrap: wrap;
}

.mt-xs {
  margin-top: 4px;
}

.mt-sm {
  margin-top: 8px;
}

.mt-md {
  margin-top: 16px;
}

.mt-lg {
  margin-top: 24px;
}

.mt-xl {
  margin-top: 32px;
}

.mb-xs {
  margin-bottom: 4px;
}

.mb-sm {
  margin-bottom: 8px;
}

.mb-md {
  margin-bottom: 16px;
}

.mb-lg {
  margin-bottom: 24px;
}

.mb-xl {
  margin-bottom: 32px;
}

.px-sm {
  padding-left: 8px;
  padding-right: 8px;
}

.px-md {
  padding-left: 16px;
  padding-right: 16px;
}

.px-lg {
  padding-left: 24px;
  padding-right: 24px;
}

.py-sm {
  padding-top: 8px;
  padding-bottom: 8px;
}

.py-md {
  padding-top: 16px;
  padding-bottom: 16px;
}

.py-lg {
  padding-top: 24px;
  padding-bottom: 24px;
}

/* .text-center {
  text-align: center;
} */

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: #9CA3AF;
}

.text-primary {
  color: #C0392B;
}

.text-success {
  color: #065F46;
}

.text-danger {
  color: #991B1B;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.font-medium {
  font-weight: 500;
}

.text-sm {
  font-size: 13px;
}

.text-base {
  font-size: 14px;
}

.text-lg {
  font-size: 18px;
}

.uppercase {
  text-transform: uppercase;
}

.lowercase {
  text-transform: lowercase;
}

.capitalize {
  text-transform: capitalize;
}

.format-card {
  position: relative;
  isolation: isolate;
}
.format-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.04);
  pointer-events: none;
  transition: box-shadow 180ms ease;
}
.format-card:hover::after {
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.1);
}
.format-card.selected:has(.format-icon.xlsx) {
  background: #F0FDF4;
  border-color: #22C55E;
}
.format-card.selected:has(.format-icon.xlsx) .format-ext {
  background: #DCFCE7;
  color: #16A34A;
}
.format-card.selected:has(.format-icon.csv), .format-card.selected:has(.format-icon.word), .format-card.selected:has(.format-icon.doc), .format-card.selected:has(.format-icon.docx) {
  background: #DBEAFE;
  border-color: #3B82F6;
}
.format-card.selected:has(.format-icon.csv) .format-ext, .format-card.selected:has(.format-icon.word) .format-ext, .format-card.selected:has(.format-icon.doc) .format-ext, .format-card.selected:has(.format-icon.docx) .format-ext {
  background: #DBEAFE;
  color: #1E40AF;
}
.format-card.selected:has(.format-icon.pdf) {
  background: #FEF2F2;
  border-color: #EF4444;
}
.format-card.selected:has(.format-icon.pdf) .format-ext {
  background: #FEE2E2;
  color: #991B1B;
}

.button,
.btn,
.button-primary,
.button-outlined,
.button-secondary,
.btn-validate,
.btn-reject,
.btn-complement,
.btn-view,
#filter-apply {
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.button:hover:not(:disabled),
.btn:hover:not(:disabled),
.button-primary:hover:not(:disabled),
.button-outlined:hover:not(:disabled),
.button-secondary:hover:not(:disabled),
.btn-validate:hover:not(:disabled),
.btn-reject:hover:not(:disabled),
.btn-complement:hover:not(:disabled),
.btn-view:hover:not(:disabled),
#filter-apply:hover:not(:disabled) {
  transform: translateY(-1px);
}

.sidebar .sidebar-item,
.sidebar .sidebar__nav-item {
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.sidebar .sidebar-item:hover,
.sidebar .sidebar__nav-item:hover {
  transform: translateX(2px);
}

.form-footer,
.note-footer {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 -8px 20px rgba(17, 24, 39, 0.06);
}

.sidebar {
  box-shadow: 2px 0 20px rgba(17, 24, 39, 0.05);
}

.topbar {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.04);
}

@media (max-width: 1023px) {
  .sidebar {
    width: 56px !important;
  }
  .sidebar .sidebar__logo-text,
  .sidebar .sidebar__nav-item span,
  .sidebar .sidebar__user-info,
  .sidebar .brand,
  .sidebar .user-details,
  .sidebar .sidebar-item span {
    display: none !important;
  }
  .topbar {
    left: 56px !important;
  }
  .app-wrapper {
    margin-left: 56px !important;
  }
}
@media (max-width: 767px) {
  .sidebar {
    width: 240px !important;
    transform: translateX(-100%) !important;
  }
  .sidebar.sidebar--open,
  .sidebar.open {
    transform: translateX(0) !important;
  }
  .topbar {
    left: 0 !important;
  }
  .app-wrapper {
    margin-left: 0 !important;
  }
}
.hidden {
  display: none !important;
}

.invisible {
  visibility: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

::selection {
  background-color: #C0392B;
  color: #FFFFFF;
}

body {
  margin: 0;
}

.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1600;
  display: grid;
  gap: 10px;
  width: min(360px, 100vw - 28px);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-left-width: 4px;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(6px);
  padding: 11px 12px;
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.toast.is-closing {
  transform: translateY(-6px);
  opacity: 0;
}

.toast--success {
  border-left-color: #0f766e;
}

.toast--error {
  border-left-color: #b91c1c;
}

.toast__icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  margin-top: 1px;
}

.toast--success .toast__icon {
  background: rgba(15, 118, 110, 0.14);
  color: #0f766e;
}

.toast--error .toast__icon {
  background: rgba(185, 28, 28, 0.14);
  color: #b91c1c;
}

.toast__content {
  min-width: 0;
}

.toast__title {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.toast__message {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #6B7280;
}

.toast__close {
  border: none;
  background: transparent;
  color: #9CA3AF;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

.toast__close:hover {
  background: rgba(148, 163, 184, 0.15);
  color: #111827;
}

@media (max-width: 767px) {
  .toast-stack {
    right: 10px;
    left: 10px;
    width: auto;
  }
}
.sidebar .sidebar-brand,
.sidebar .sidebar-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid #E5E7EB;
  min-height: 80px;
}
.sidebar .brand-mark,
.sidebar .logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #C0392B;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  overflow: hidden;
}
.sidebar .brand-mark img,
.sidebar .logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  display: block;
}
.sidebar .brand-title,
.sidebar .brand-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}
.sidebar .brand-subtitle {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9CA3AF;
}
.sidebar .sidebar-nav {
  flex: 1;
  padding: 16px 0;
}
.sidebar .sidebar-item {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  margin: 2px 8px;
  color: #9CA3AF;
  border-left: 3px solid transparent;
  text-decoration: none;
  font-weight: 600;
  transition: all 200ms ease;
  border-radius: 8px;
}
.sidebar .sidebar-item:hover, .sidebar .sidebar-item.active {
  background: #FEF2F2;
  color: #C0392B;
  border-left-color: #C0392B;
}
.sidebar .sidebar-footer {
  border-top: 1px solid #E5E7EB;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sidebar .sidebar-footer .user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}
.sidebar .avatar-circle,
.sidebar .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #C0392B;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.sidebar .sidebar-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #111827;
  border-radius: 8px;
  padding: 10px 12px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
}

.topbar {
  height: 64px;
  padding: 0 24px;
}
.topbar .icon-button {
  border: 0;
  background: transparent;
  color: #9CA3AF;
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
}
.topbar .icon-button:hover {
  background: #F9FAFB;
  color: #111827;
}
.topbar .topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar .icon-notification {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F9FAFB;
  display: grid;
  place-items: center;
}
.topbar .notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #FEF3C7;
  color: #92400E;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}
.topbar .topbar-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  align-items: flex-end;
}
.topbar .topbar-user-info strong {
  font-size: 13px;
}
.topbar .topbar-user-info span {
  font-size: 12px;
  color: #9CA3AF;
}
.topbar .topbar-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}
.topbar .topbar-notification-panel {
  width: min(360px, 100vw - 32px);
  max-height: min(460px, 100vh - 120px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.18);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.topbar .topbar-notification-panel[hidden] {
  display: none !important;
}
.topbar .topbar-notification-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.topbar .notification-panel__header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
  color: #111827;
  letter-spacing: 0.02em;
}
.topbar [data-notification-list] {
  display: grid;
  gap: 8px;
  padding: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.topbar [data-notification-list]::-webkit-scrollbar {
  width: 6px;
}
.topbar [data-notification-list]::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.65);
  border-radius: 999px;
}
.topbar .notification-item {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #fff;
  color: #111827;
  display: grid;
  gap: 6px;
  line-height: 1.35;
}
.topbar .notification-item__header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar .notification-item__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  flex-shrink: 0;
}
.topbar .notification-item--empty {
  padding: 12px;
  box-shadow: none;
}
.topbar .notification-item--empty .notification-item__dot {
  display: none;
}
.topbar [data-notification-empty][hidden] {
  display: none !important;
}
.topbar .notification-item.is-unread {
  border-color: rgba(192, 57, 43, 0.28);
  background: linear-gradient(180deg, #fff8f6 0%, #ffffff 100%);
  box-shadow: inset 3px 0 0 #c0392b;
}
.topbar .notification-item.is-read {
  border-color: rgba(20, 128, 61, 0.28);
  background: linear-gradient(180deg, #f5fff7 0%, #ffffff 100%);
  box-shadow: inset 3px 0 0 #15803d;
}
.topbar .notification-item__title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}
.topbar .notification-item__message {
  font-size: 12px;
  color: #334155;
}
.topbar .notification-item__meta {
  font-size: 11px;
  color: #64748b;
}
.topbar .notification-item__link {
  justify-self: start;
  font-size: 12px;
  font-weight: 600;
  color: #b42318;
  text-decoration: none;
}
.topbar .notification-item__link:hover {
  text-decoration: underline;
}
.topbar .notification-item--success {
  border-left: 3px solid #1d976c;
}
.topbar .notification-item--error {
  border-left: 3px solid #b42318;
}
.topbar .notification-item--warning {
  border-left: 3px solid #b54708;
}
.topbar .notification-item--info {
  border-left: 3px solid #155eef;
}
.topbar .notification-actions {
  border: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0;
  padding: 10px 12px;
  background: #f8fafc;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.topbar .notification-actions.notification-actions--single {
  grid-template-columns: 1fr;
}
.topbar [data-notification-mark-all] {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 10px;
  padding: 7px 10px;
  background: #ffffff;
  color: #0f172a;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}
.topbar [data-notification-mark-all]:hover {
  border-color: rgba(180, 35, 24, 0.38);
  color: #b42318;
  transform: translateY(-1px);
}
.topbar [data-notification-view-all] {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 10px;
  padding: 7px 10px;
  background: #ffffff;
  color: #0f172a;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.16s ease;
}
.topbar [data-notification-view-all]:hover {
  border-color: rgba(180, 35, 24, 0.38);
  color: #b42318;
  transform: translateY(-1px);
}
.topbar [data-notification-mark-all]:focus-visible,
.topbar [data-notification-view-all]:focus-visible,
.topbar .notification-item__link:focus-visible {
  outline: 2px solid rgba(192, 57, 43, 0.35);
  outline-offset: 2px;
}

.settings-page .page-header h1 {
  font-size: 22px;
  font-weight: 600;
}
.settings-page .settings-card h2 {
  font-size: 22px;
  font-weight: 620;
}
.settings-page .settings-card h3 {
  font-size: 15px;
  font-weight: 600;
}
.settings-page .settings-card label {
  font-size: 13px;
  font-weight: 500;
}
.settings-page .settings-card input[type=text],
.settings-page .settings-card input[type=email],
.settings-page .settings-card input[type=password],
.settings-page .settings-card textarea {
  font-size: 14px;
  min-height: 42px;
}
.settings-page .settings-card .password-field {
  position: relative;
}
.settings-page .settings-card .password-field input[type=password] {
  padding-right: 44px;
}
.settings-page .settings-card .password-field .password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  z-index: 2;
}
.settings-page .settings-card .hint {
  font-size: 12px;
}
.settings-page .inline-success {
  font-size: 12px;
}

.button,
.button-primary,
.button-secondary,
.button-outlined,
.btn-validate,
.btn-reject,
.btn-complement,
.btn-view,
#filter-apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.button-primary,
.button.button-primary,
.button-success,
.button-danger,
.btn-validate,
.btn-reject,
.btn-complement,
#filter-apply,
.users-add-btn,
.logout-btn {
  font-weight: 600;
}

.button-outlined,
.button-secondary,
.btn-view,
.icon-action,
.org-icon-btn,
.notes-action-btn {
  font-weight: 500;
}

.button-primary,
.button.button-primary,
.btn-validate,
#filter-apply {
  background: #C0392B;
  color: #FFFFFF;
}

.button-outlined,
.button.button-outlined,
.button-secondary,
.btn-view {
  background: #FFFFFF;
  color: #111827;
  border-color: #E5E7EB;
}

.button-danger,
.btn-reject,
.btn-complement {
  background: #FFFFFF;
  color: #991B1B;
  border-color: #FECACA;
}

.button-small {
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.button-full {
  width: 100%;
}

.dashboard-page .dashboard-header {
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.dashboard-page .dashboard-header h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
  color: #111827;
}
.dashboard-page .dashboard-header p {
  margin: 0;
  color: #6B7280;
  font-size: 14px;
}
.dashboard-page .dashboard-metrics {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}
@media (max-width: 1023px) {
  .dashboard-page .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .dashboard-page .dashboard-metrics {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
.dashboard-page .metric-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-top: 4px solid #C0392B;
  border-radius: 12px;
  padding: 24px;
  min-height: 136px;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.dashboard-page .metric-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  color: #9CA3AF;
  font-size: 14px;
  font-weight: 500;
}
.dashboard-page .metric-card__value {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.05;
  font-weight: 700;
  color: #111827;
}
.dashboard-page .metric-card__trend {
  margin-top: 8px;
  font-size: 12px;
  color: #6B7280;
}
.dashboard-page .metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.dashboard-page .metric-card--pending {
  border-top-color: #FEF3C7;
}
.dashboard-page .metric-card--pending .metric-icon {
  background: #FEF3C7;
}
.dashboard-page .metric-card--success {
  border-top-color: #D1FAE5;
}
.dashboard-page .metric-card--success .metric-icon {
  background: #D1FAE5;
}
.dashboard-page .metric-card--danger {
  border-top-color: #FECACA;
}
.dashboard-page .metric-card--danger .metric-icon {
  background: #FEE2E2;
}
.dashboard-page .metric-card--info {
  border-top-color: #DBEAFE;
}
.dashboard-page .metric-card--info .metric-icon {
  background: #DBEAFE;
}
.dashboard-page .recent-notes {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 24px;
}
.dashboard-page .recent-notes__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.dashboard-page .recent-notes__header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 600;
  color: #111827;
}
.dashboard-page .search-filter-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.dashboard-page #note-search {
  width: 100%;
  max-width: 320px;
}
.dashboard-page .filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
}
.dashboard-page .filter-chips .chip {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #6B7280;
  transition: all 200ms ease;
}
.dashboard-page .filter-chips .chip:hover {
  border-color: #6B7280;
  color: #111827;
}
.dashboard-page .filter-chips .chip--active {
  background: #FFFFFF;
  border-color: #C0392B;
  color: #C0392B;
  font-weight: 500;
}
.dashboard-page .table-responsive {
  overflow-x: auto;
}
.dashboard-page .data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.dashboard-page .data-table th,
.dashboard-page .data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #E5E7EB;
  text-align: left;
  vertical-align: middle;
}
.dashboard-page .data-table th {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6B7280;
  font-size: 11px;
}
.dashboard-page .data-table tbody tr:hover {
  background: #F9FAFB;
}
.dashboard-page .badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.dashboard-page .link-red {
  color: #C0392B;
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
}
.dashboard-page .link-red:hover {
  text-decoration: underline;
}
.dashboard-page .icon-action {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #F9FAFB;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #111827;
  border: 0;
  cursor: pointer;
}
@media (max-width: 767px) {
  .dashboard-page .dashboard-header {
    flex-direction: column;
    align-items: stretch;
  }
  .dashboard-page .dashboard-header .button-primary {
    width: 100%;
    justify-content: center;
  }
  .dashboard-page .recent-notes {
    padding: 16px;
  }
  .dashboard-page .recent-notes__header {
    align-items: flex-start;
    flex-direction: column;
  }
  .dashboard-page #note-search {
    max-width: none;
  }
  .dashboard-page .data-table {
    min-width: 640px;
  }
}

.sidebar-toggle {
  display: none;
}
@media (max-width: 767px) {
  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 767px) {
  .topbar .topbar-user-info {
    display: none;
  }
  .main-content {
    padding: 16px;
  }
  .dashboard-header,
  .page-header,
  .notes-header,
  .users-page-header,
  .org-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .table-responsive .data-table,
  .table-responsive .notes-table,
  .table-responsive .table {
    min-width: 640px;
  }
}
.dashboard-header,
.recent-notes__header,
.admin-filters,
.notes-page,
.settings-page,
.admin-dashboard-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.notes-page {
  padding: 24px;
}

.note-frais-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.filters-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}

.notes-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.notes-table th,
.notes-table td {
  padding: 16px 14px;
  border-bottom: 1px solid #E5E7EB;
  text-align: left;
  vertical-align: middle;
}
.notes-table th {
  color: #6B7280;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  background: #F9FAFB;
}
.notes-table tbody tr {
  transition: background 0.15s ease;
}
.notes-table tbody tr:hover {
  background: #F9FAFB;
}
.notes-table .icon-action {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #F9FAFB;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #111827;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.notes-table .icon-action:hover {
  transform: scale(1.05);
  background: #E5E7EB;
}

.notes-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.notes-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #111827;
}
.notes-header .notes-count {
  color: #6B7280;
  font-size: 14px;
}

.notes-page .filter-card {
  padding: 20px;
}

.notes-page .filters-row input[type=search],
.notes-page .filters-row input[type=date] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #FFFFFF;
  color: #111827;
  font-size: 14px;
}
.notes-page .filters-row input[type=search]:focus,
.notes-page .filters-row input[type=date]:focus {
  outline: none;
  border-color: #C0392B;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.notes-page .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, background-color 0.16s ease;
}

.admin-notes-page .note-id-link {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.notes-page .pagination {
  border-top: 1px solid #E5E7EB;
  padding-top: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.notes-page .pagination .page-link {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  background: #FFFFFF;
  color: #374151;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.notes-page .pagination .page-link:hover:not(.disabled) {
  border-color: #C0392B;
  color: #C0392B;
  transform: translateY(-1px);
}

.notes-page .pagination .page-link.active {
  border-color: #C0392B;
  background: #C0392B;
  color: #FFFFFF;
}

.notes-page .pagination .page-link.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.notes-page .pagination button,
.notes-page .chip,
.notes-page .icon-action,
.note-page button {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 10px;
}

.notes-page .pagination button {
  min-width: 38px;
  height: 38px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #111827;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
}

.notes-page .pagination button:hover:not(:disabled) {
  border-color: #C0392B;
  color: #C0392B;
  transform: translateY(-1px);
}

.notes-page .pagination button:disabled {
  background: #F3F4F6;
  color: #9CA3AF;
  border-color: #E5E7EB;
  cursor: not-allowed;
}

.note-form-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 26px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin: 0 24px 22px;
}

.note-form-card .field-group label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #111827;
  font-weight: 500;
}
.note-form-card .field-group input,
.note-form-card .field-group select,
.note-form-card .field-group textarea {
  width: 100%;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 12px 14px;
  background: #FFFFFF;
  color: #111827;
}
.note-form-card .field-group input:focus,
.note-form-card .field-group select:focus,
.note-form-card .field-group textarea:focus {
  outline: none;
  border-color: #C0392B;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.field-inline {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.km-layout {
  display: grid;
  gap: 12px;
}

.km-inline {
  display: grid;
  grid-template-columns: minmax(160px, 260px) auto 1fr;
  align-items: center;
  gap: 10px;
}

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

.note-page .km-row td {
  vertical-align: top;
}

.km-unit {
  font-size: 14px;
  font-weight: 600;
  color: #6B7280;
}

.field-span-full {
  grid-column: 1/-1;
}

.grid-tight {
  gap: 12px;
}

.grid-wide {
  gap: 24px;
}

.align-start {
  align-items: start;
}

.mt-24 {
  margin-top: 24px;
}

.mt-20 {
  margin-top: 20px;
}

.mb-12 {
  margin-bottom: 12px;
}

.mb-8 {
  margin-bottom: 8px;
}

.button-outlined-red {
  border-color: #C0392B;
  color: #C0392B;
}

.km-readonly {
  flex: 1;
  min-width: 180px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.km-rate {
  color: #6B7280;
  font-size: 14px;
  white-space: nowrap;
}

.field-group-tight {
  gap: 4px;
  margin: 0;
}
.field-group-tight input {
  margin: 0;
}
.field-group-tight .badge-overcap {
  margin-top: 4px;
}

.aside-note__title {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

.total-card {
  border-left: 4px solid #C0392B;
  background: #FFFFFF;
  border-radius: 8px;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 24px;
}

.button-group {
  display: flex;
  gap: 12px;
}

.note-page .button-group .button-primary,
.note-page .button-group .button-outlined,
.note-page #calculate-route {
  border-radius: 12px;
}

.button-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.total-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.total-summary div {
  display: flex;
  justify-content: space-between;
  color: #111827;
  font-size: 14px;
}

.total-box {
  border: 2px solid #C0392B;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}
.total-box .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6B7280;
  margin-bottom: 12px;
  font-weight: 600;
}
.total-box .amount {
  font-size: 32px;
  font-weight: 700;
  color: #C0392B;
  line-height: 1;
}

.signature-area {
  width: 100%;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #FFFFFF;
  position: relative;
  overflow: hidden;
}

#signature-canvas {
  width: 100%;
  height: 150px;
  border: none;
  border-radius: 8px;
  background: #FFFFFF;
  display: block;
  cursor: crosshair;
}

.signature-instructions {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: #9CA3AF;
  font-size: 0.95rem;
}

.signature-clear {
  margin-top: 8px;
  color: #C0392B;
  cursor: pointer;
  font-size: 0.95rem;
  text-decoration: none;
  font-weight: 500;
}

.aside-note {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 16px;
  font-size: 0.9rem;
  color: #6B7280;
  line-height: 1.6;
}

.upload-zone {
  border: 2px dashed #E5E7EB;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.upload-zone:hover {
  border-color: #C0392B;
  background: #FEF2F2;
}
.upload-zone.drag-over {
  background: #FEF2F2;
  border-color: #C0392B;
}
.upload-zone input {
  display: none;
}
.upload-zone p {
  margin: 8px 0 0;
  color: #6B7280;
  font-size: 14px;
}
.upload-zone svg {
  margin-bottom: 8px;
}

.upload-preview {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #F9FAFB;
  border-radius: 8px;
}
.upload-item img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.upload-item button {
  border: none;
  background: transparent;
  color: #EF4444;
  cursor: pointer;
  font-weight: 700;
}

.footer-note-band {
  background: #F9FAFB;
  border-radius: 8px;
  padding: 14px 16px;
  color: #6B7280;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 20px;
}

.subtext,
.transport-note {
  color: #6B7280;
}

.transport-note {
  font-style: italic;
  margin-top: 12px;
  font-size: 0.9rem;
}

.section-divider {
  margin: 32px 0 16px;
  border-top: 1px solid #E5E7EB;
}

.dashboard-header,
.recent-notes__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.users-page-header,
.org-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 0 2px;
}
.users-page-header h1,
.org-header h1 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 650;
}
.users-page-header p,
.org-header p {
  margin: 0 0 2px;
  color: #6B7280;
  font-size: 13px;
  line-height: 1.45;
}
.users-header-meta,
.org-header-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.users-page-header .hint,
.org-header .hint {
  max-width: 860px;
  color: #64748b;
  font-size: 12.5px;
}

.notes-header {
  padding: 0 2px;
  margin-bottom: 12px;
}
.notes-header h1 {
  font-size: 24px;
  line-height: 1.15;
  font-weight: 650;
}
.notes-header .notes-count {
  font-size: 13px;
  color: #64748b;
}

.users-page-header > div,
.org-header > div,
.notes-header > div {
  max-width: 860px;
}

.users-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
  margin-top: 42px;
  justify-content: flex-end;
}

.users-page-header > .users-btn-back {
  margin-top: 22px;
}

.users-header-actions .users-btn-archives,
.users-header-actions .users-btn-import,
.users-header-actions .users-btn-create,
.org-header > .org-add-btn,
.users-page-header > .users-btn-back {
  width: auto;
  height: auto;
  min-width: 0;
  max-width: 100%;
  padding: 8px 14px;
  box-sizing: border-box;
  flex: 0 0 auto;
  justify-content: center;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 550;
}

.users-btn-import {
  background: #ffffff;
  color: #c93428;
  border: 1px solid #c93428;
}

.users-import-modal {
  width: min(850px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.users-import-template {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px;
  margin: 16px 0;
  border-radius: 10px;
  background: #f7f8fa;
}

.users-import-result {
  margin-top: 16px;
}

.users-import-summary {
  padding: 12px 14px;
  border-radius: 8px;
}

.users-import-summary--success {
  color: #146c43;
  background: #e9f7ef;
  border: 1px solid #b7e4ca;
}

.users-import-summary--error {
  color: #842029;
  background: #f8d7da;
  border: 1px solid #f5c2c7;
}

.users-import-table-wrap {
  overflow-x: auto;
  margin: 12px 0;
}

.users-import-table {
  width: 100%;
  border-collapse: collapse;
}

.users-import-table th,
.users-import-table td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 1px solid #e3e6ea;
}

.users-import-table code {
  white-space: nowrap;
  font-size: 0.88rem;
}

.users-import-errors {
  margin-top: 14px;
  color: #842029;
}

.users-import-errors li {
  margin: 6px 0;
}
.org-header > .org-add-btn {
  margin-top: 24px;
}
.users-header-actions .users-btn-archives {
  padding-left: 8px;
  padding-right: 8px;
}

.users-btn-width-probe {
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .users-header-actions .users-btn-archives,
  .users-header-actions .users-btn-import,
  .users-header-actions .users-btn-create,
  .org-header > .org-add-btn,
  .users-page-header > .users-btn-back {
    width: auto;
    min-width: 0;
    height: auto;
  }
}
.recent-notes,
.admin-table-card,
.filter-card,
.table-card,
.users-table-card,
.org-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 16px;
}

.recent-notes,
.admin-table-card,
.filter-card,
.table-card,
.users-table-card,
.org-card,
.settings-card,
.bareme-card,
.filters-card,
.note-form-card,
.kpi-card,
.metric-card,
.format-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.recent-notes:hover,
.admin-table-card:hover,
.filter-card:hover,
.table-card:hover,
.users-table-card:hover,
.org-card:hover,
.settings-card:hover,
.bareme-card:hover,
.filters-card:hover,
.note-form-card:hover,
.kpi-card:hover,
.metric-card:hover,
.format-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 23, 42, 0.16);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.status-en_attente,
.status-pending {
  background: #FEF3C7;
  color: #92400E;
}

.status-validee,
.status-success {
  background: #D1FAE5;
  color: #065F46;
}

.status-refusee,
.status-danger {
  background: #FEE2E2;
  color: #991B1B;
}

.status-payee,
.status-info {
  background: #DBEAFE;
  color: #1E40AF;
}

.status-brouillon,
.status-draft {
  background: #F3F4F6;
  color: #374151;
}

.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  max-width: 100%;
  height: 100vh;
  background: #FFFFFF;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 300ms ease;
  z-index: 400;
  display: flex;
  flex-direction: column;
}
.drawer-panel.open {
  transform: translateX(0);
}

#drawer-complement-modal {
  z-index: 520;
}
#drawer-complement-modal .modal-card {
  position: relative;
  z-index: 521;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 300;
}
.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 767px) {
  .drawer-panel {
    width: 100%;
  }
  .dashboard-header,
  .recent-notes__header {
    align-items: flex-start;
  }
}
.admin-dashboard-page {
  padding: 0;
}
.admin-dashboard-page .page-header {
  margin-bottom: 24px;
}
.admin-dashboard-page .page-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #111827;
}
.admin-dashboard-page .page-header p {
  margin: 8px 0 0;
  color: #6B7280;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.kpi-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 24px;
  flex-shrink: 0;
}
.kpi-card--success .kpi-card__icon {
  background: #DCFCE7;
}
.kpi-card--info .kpi-card__icon {
  background: #DBEAFE;
}
.kpi-card--pending .kpi-card__icon {
  background: #FEF3C7;
}
.kpi-card--purple .kpi-card__icon {
  background: #EDE9FE;
}
.kpi-card__label {
  margin: 0;
  font-size: 13px;
  color: #6B7280;
  font-weight: 500;
  line-height: 1.4;
}
.kpi-card__value {
  margin: 6px 0 4px;
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}
.kpi-card__trend {
  margin: 0;
  font-size: 12px;
  color: #6B7280;
}

.admin-table-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-bottom: 24px;
}
.admin-table-card .admin-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 13px;
  padding: 10px;
  border-bottom: 1px solid #E5E7EB;
}
.admin-table-card .admin-table-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}
.admin-table-card .data-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table-card .data-table thead {
  background: #F9FAFB;
}
.admin-table-card .data-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6B7280;
  border-bottom: 1px solid #E5E7EB;
}
.admin-table-card .data-table tbody tr {
  transition: background 0.15s ease;
}
.admin-table-card .data-table tbody tr:hover {
  background: #F9FAFB;
}
.admin-table-card .data-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #E5E7EB;
  vertical-align: middle;
  font-size: 14px;
  color: #111827;
}
.admin-table-card .data-table tbody td strong {
  font-weight: 600;
}

.actions-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #F9FAFB;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.15s ease;
}
.icon-action:hover {
  background: #E5E7EB;
  transform: scale(1.05);
}

.button {
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  /* font-size: 14px; */
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.button-small {
  padding: 8px 12px;
  font-size: 12px;
}
.button-success {
  background: #C0392B;
  color: #FFFFFF;
}
.button-success:hover {
  background: rgb(150.3319148936, 44.629787234, 33.6680851064);
}
.button-danger {
  background: #EF4444;
  color: #FFFFFF;
}
.button-danger:hover {
  background: #DC2626;
}
.button-outlined {
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #111827;
}
.button-outlined:hover {
  background: #F9FAFB;
  border-color: #C0392B;
  color: #C0392B;
}

.admin-filters {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.admin-filters .card, .admin-filters .metric-card,
.admin-filters .kpi-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
.admin-filters .card > div, .admin-filters .metric-card > div,
.admin-filters .kpi-card > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.admin-filters .card > div input, .admin-filters .metric-card > div input,
.admin-filters .kpi-card > div input,
.admin-filters .card > div select,
.admin-filters .metric-card > div select,
.admin-filters .kpi-card > div select {
  flex: 1;
  min-width: 160px;
  padding: 10px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #FFFFFF;
  color: #111827;
  font-size: 14px;
}
.admin-filters .card > div input:focus, .admin-filters .metric-card > div input:focus,
.admin-filters .kpi-card > div input:focus,
.admin-filters .card > div select:focus,
.admin-filters .metric-card > div select:focus,
.admin-filters .kpi-card > div select:focus {
  outline: none;
  border-color: #C0392B;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}
.admin-filters .card > div button, .admin-filters .metric-card > div button,
.admin-filters .kpi-card > div button {
  padding: 10px 16px;
  background: #C0392B;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}
.admin-filters .card > div button:hover, .admin-filters .metric-card > div button:hover,
.admin-filters .kpi-card > div button:hover {
  background: rgb(150.3319148936, 44.629787234, 33.6680851064);
}

.page-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #111827;
}
.page-header .muted {
  margin: 8px 0 0;
  color: #6B7280;
  font-size: 14px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}
.table thead tr {
  border-bottom: 1px solid #E5E7EB;
}
.table thead th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6B7280;
}
.table tbody tr {
  border-bottom: 1px solid #F3F4F6;
  transition: background 0.15s ease;
}
.table tbody tr:hover {
  background: #F9FAFB;
}
.table tbody tr td {
  padding: 14px 16px;
  vertical-align: middle;
  font-size: 14px;
  color: #111827;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #4B5563;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.user-avatar--gray {
  background: #4B5563;
}
.user-avatar--red {
  background: #C0392B;
}

.user-name {
  font-weight: 600;
  color: #111827;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}
.role-pill--user {
  background: #EDE9FE;
  color: #5B21B6;
}
.role-pill--admin {
  background: #FEF3C7;
  color: #92400E;
}

.status-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.status-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.status-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.status-text--active {
  color: #15803d;
}

.status-text--inactive {
  color: #b42318;
}

.status-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #9CA3AF;
  border-radius: 999px;
  transition: 0.2s;
}
.status-slider:before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: white;
  transition: 0.2s;
}
input:checked + .status-slider {
  background: #C0392B;
}
input:checked + .status-slider:before {
  transform: translateX(20px);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-overlay.open, .modal-overlay:not(.hidden) {
  display: flex;
}
.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background: #FFFFFF;
  width: 100%;
  max-width: 480px;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16);
  padding: 24px;
}
.modal-card h3 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}
.modal-card textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #FFFFFF;
  color: #111827;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 16px;
}
.modal-card textarea:focus {
  outline: none;
  border-color: #C0392B;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.modal-actions button {
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s ease;
}

.org-card,
.users-table-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.drawer-panel::-webkit-scrollbar {
  width: 8px;
}

.drawer-panel::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.drawer-panel::-webkit-scrollbar-track {
  background: transparent;
}

.org-table,
.users-table {
  width: 100%;
  border-collapse: collapse;
}
.org-table thead,
.users-table thead {
  background: #F9FAFB;
}
.org-table thead th,
.users-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6B7280;
  border-bottom: 1px solid #E5E7EB;
}
.org-table tbody tr,
.users-table tbody tr {
  border-bottom: 1px solid #F3F4F6;
  transition: background 0.15s ease;
}
.org-table tbody tr:hover,
.users-table tbody tr:hover {
  background: #F9FAFB;
}
.org-table tbody tr td,
.users-table tbody tr td {
  padding: 14px 16px;
  vertical-align: middle;
  font-size: 14px;
  color: #111827;
}
.org-table tbody tr td:last-child,
.users-table tbody tr td:last-child {
  text-align: right;
}

.users-table .users-empty-cell {
  text-align: left !important;
}

.org-name-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.org-name-code {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(180, 35, 24, 0.2);
  background: rgba(180, 35, 24, 0.08);
  color: #8b1f16;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

.org-actions,
.org-icons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.org-icon-btn,
.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  background: #FFFFFF;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.15s ease;
}
.org-icon-btn.edit,
.icon-btn.edit {
  color: #111827;
}
.org-icon-btn.edit:hover,
.icon-btn.edit:hover {
  color: #C0392B;
  border-color: rgba(192, 57, 43, 0.35);
  background: #FEF2F2;
}
.org-icon-btn.delete,
.icon-btn.delete {
  color: #991B1B;
}
.org-icon-btn.delete:hover,
.icon-btn.delete:hover {
  color: #DC2626;
  border-color: rgba(220, 38, 38, 0.35);
  background: #FEF2F2;
}

.users-field,
.org-field,
.filters-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.users-field label,
.org-field label,
.filters-field label {
  font-size: 13px;
  color: #6B7280;
  font-weight: 500;
}
.users-field input,
.users-field select,
.org-field input,
.org-field select,
.filters-field input,
.filters-field select {
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 10px 12px;
  background: #FFFFFF;
  color: #111827;
  font-size: 14px;
}
.users-field input:focus,
.users-field select:focus,
.org-field input:focus,
.org-field select:focus,
.filters-field input:focus,
.filters-field select:focus {
  outline: none;
  border-color: #C0392B;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.users-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.users-field-full {
  grid-column: 1/-1;
}

.users-temp-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.users-temp-wrap #copy-temp-password {
  flex-shrink: 0;
}

.users-add-btn,
.org-add-btn,
.btn-submit,
.org-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  background: #C0392B;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.users-add-btn:hover,
.org-add-btn:hover,
.btn-submit:hover,
.org-submit:hover {
  background: rgb(150.3319148936, 44.629787234, 33.6680851064);
}
.users-add-btn:focus, .users-add-btn:focus-visible,
.org-add-btn:focus,
.org-add-btn:focus-visible,
.btn-submit:focus,
.btn-submit:focus-visible,
.org-submit:focus,
.org-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.22);
}

a.users-add-btn,
a.users-add-btn:link,
a.users-add-btn:visited,
a.users-add-btn:hover,
a.users-add-btn:active {
  color: #FFFFFF;
  text-decoration: none;
}

a.users-btn-archives,
a.users-btn-archives:link,
a.users-btn-archives:visited,
a.users-btn-archives:hover,
a.users-btn-archives:active,
a.users-btn-back,
a.users-btn-back:link,
a.users-btn-back:visited,
a.users-btn-back:hover,
a.users-btn-back:active {
  color: #FFFFFF;
  text-decoration: none;
}

.org-actions-footer,
.modal-actions,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.btn-cancel,
.org-cancel {
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-cancel:hover,
.org-cancel:hover {
  background: #F9FAFB;
  border-color: #C0392B;
  color: #C0392B;
}

.exports-header {
  margin-bottom: 24px;
}
.exports-header h1 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 28px;
  font-weight: 700;
}
.exports-header p {
  margin: 0;
  color: #6B7280;
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.format-card--compact {
  padding: 14px;
}
.format-card--compact .format-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
}

.format-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}
.format-card.selected--xlsx {
  background: #F0FDF4;
  border-color: #22C55E;
}
.format-card.selected--csv {
  background: #DBEAFE;
  border-color: #2563EB;
}
.format-card.selected--pdf {
  background: #FEF2F2;
  border-color: #DC2626;
}
.format-card.selected--virement {
  background: #F0FDF4;
  border-color: #22C55E;
}
.format-card:hover:not(.selected) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.08);
}
.format-card.format-card--xlsx:hover {
  border-color: #22C55E !important;
}
.format-card.format-card--csv:hover {
  border-color: #2563EB !important;
}
.format-card.format-card--pdf:hover {
  border-color: #DC2626 !important;
}
.format-card.format-card--virement:hover {
  border-color: #22C55E !important;
}

.format-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 18px;
}
.format-icon.xlsx {
  background: #DCFCE7;
  color: #16A34A;
}
.format-icon.csv {
  background: #DBEAFE;
  color: #2563EB;
}
.format-icon.pdf {
  background: #FEE2E2;
  color: #DC2626;
}
.format-icon.virement {
  background: #DCFCE7;
  color: #16A34A;
}

.format-title {
  margin: 0 0 4px;
  color: #111827;
  font-weight: 700;
}

.format-desc {
  margin: 0 0 10px;
  color: #6B7280;
  font-size: 14px;
}

.format-ext {
  display: inline-flex;
  background: #F9FAFB;
  color: #111827;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}

.format-card.selected--xlsx .format-ext {
  background: #DCFCE7;
  color: #16A34A;
}

.format-card.selected--csv .format-ext {
  background: #DBEAFE;
  color: #2563EB;
}

.format-card.selected--pdf .format-ext {
  background: #FEE2E2;
  color: #DC2626;
}

.format-card.selected--virement .format-ext {
  background: #DCFCE7;
  color: #16A34A;
}

.filters-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.filters-card h2 {
  margin: 0 0 16px;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
}

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

.exports-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  background: #C0392B;
  color: #FFFFFF;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.15s ease;
}
.exports-submit:hover {
  background: rgb(150.3319148936, 44.629787234, 33.6680851064);
}

.exports-submit-wrap {
  display: flex;
  justify-content: center;
}

.bareme-wrap {
  max-width: 860px;
}

.bareme-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 24px;
}
.bareme-card h1 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 22px;
  font-weight: 600;
}
.bareme-card p {
  margin: 0 0 20px;
  color: #6B7280;
}

.bareme-warning {
  margin-top: 20px;
  border: 1px solid #FDE68A;
  background: #FFFBEB;
  color: #92400E;
  border-radius: 12px;
  padding: 14px 16px;
}
.bareme-warning strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
  color: #92400E;
}
.bareme-warning p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #92400E;
}

.bareme-field {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 190px 96px;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  min-height: 46px;
}
.bareme-field .input-unit {
  display: contents;
}
.bareme-field label {
  color: #111827;
  font-weight: 500;
  margin: 0;
}
.bareme-field input {
  width: 100%;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: right;
  color: #111827;
}
.bareme-field input:focus {
  outline: none;
  border-color: #C0392B;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}
.bareme-field .unit {
  color: #6B7280;
  min-width: 96px;
  text-align: left;
  font-weight: 500;
}

.bareme-submit {
  width: fit-content;
  display: block;
  border: none;
  border-radius: 8px;
  background: #C0392B;
  color: #FFFFFF;
  font-weight: 600;
  padding: 12px 14px;
  cursor: pointer;
  margin: 8px auto 0;
  transition: all 0.15s ease;
}
.bareme-submit:hover {
  background: rgb(150.3319148936, 44.629787234, 33.6680851064);
}

.bareme-warning {
  margin-top: 18px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 12px;
  color: #92400E;
  padding: 14px;
  font-size: 14px;
  line-height: 1.45;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 16px;
}
.pagination a,
.pagination button {
  min-width: 38px;
  padding: 8px 10px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #FFFFFF;
  color: #111827;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.pagination a:hover:not([disabled]), .pagination a.active,
.pagination button:hover:not([disabled]),
.pagination button.active {
  border-color: #C0392B;
  background: #FEF2F2;
  color: #C0392B;
  font-weight: 500;
}
.pagination a[disabled],
.pagination button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.link-red {
  color: #C0392B;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}
.link-red:hover {
  text-decoration: underline;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.status-badge.status-en_attente {
  background: #FEF3C7;
  color: #92400E;
}
.status-badge.status-validee {
  background: #DCFCE7;
  color: #16A34A;
}
.status-badge.status-refusee {
  background: #FEE2E2;
  color: #991B1B;
}
.status-badge.status-payee {
  background: #DBEAFE;
  color: #1E40AF;
}
.status-badge.status-brouillon {
  background: #E5E7EB;
  color: #374151;
}

@media (max-width: 1023px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .format-grid,
  .filters-grid {
    grid-template-columns: 1fr;
  }
  .admin-filters > .card > div, .admin-filters > .metric-card > div,
  .admin-filters > .kpi-card > div,
  .admin-table-header {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-filters > .card > div input, .admin-filters > .metric-card > div input,
  .admin-filters > .kpi-card > div input,
  .admin-filters > .card > div select,
  .admin-filters > .metric-card > div select,
  .admin-filters > .kpi-card > div select,
  .admin-filters > .card > div button,
  .admin-filters > .metric-card > div button,
  .admin-filters > .kpi-card > div button,
  .admin-table-header input,
  .admin-table-header select,
  .admin-table-header button {
    width: 100%;
  }
}
@media (max-width: 767px) {
  .notes-page {
    padding: 16px;
  }
  .filters-row {
    grid-template-columns: 1fr;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .admin-dashboard-page {
    padding: 0;
  }
  .admin-filters {
    padding: 12px;
  }
  .admin-table-card .data-table {
    font-size: 13px;
  }
  .admin-table-card .data-table thead {
    display: none;
  }
  .admin-table-card .data-table tbody tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #FFFFFF;
  }
  .admin-table-card .data-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: none;
  }
  .admin-table-card .data-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6B7280;
  }
  .org-table thead,
  .users-table thead {
    display: none;
  }
  .org-table tbody tr,
  .users-table tbody tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
  }
  .org-table tbody td,
  .users-table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    text-align: left !important;
  }
  .org-table tbody td::before,
  .users-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6B7280;
    margin-right: 8px;
  }
  .bareme-field {
    grid-template-columns: 1fr;
  }
  .bareme-field .unit {
    min-width: 0;
  }
  .users-modal-grid,
  .settings-page .settings-grid {
    grid-template-columns: 1fr;
  }
  .users-temp-wrap,
  .org-actions-footer,
  .modal-actions,
  .form-actions {
    width: 100%;
    justify-content: stretch;
  }
  .users-temp-wrap > *,
  .org-actions-footer > *,
  .modal-actions > *,
  .form-actions > * {
    width: 100%;
  }
  .users-temp-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  .org-actions,
  .org-icons {
    justify-content: flex-start;
  }
  .note-form-card {
    margin: 0 16px 16px;
    padding: 16px;
  }
  .total-card {
    grid-template-columns: 1fr;
  }
  .button-group {
    width: 100%;
  }
  .button-outlined,
  .button-primary {
    width: 100%;
  }
  .progress-list {
    flex-wrap: wrap;
    gap: 8px;
  }
  .notes-table {
    min-width: 100%;
  }
  .notes-table th {
    display: none;
  }
  .notes-table tbody tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #FFFFFF;
  }
  .notes-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 12px;
  }
  .notes-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #111827;
    min-width: 80px;
  }
  .progress-step {
    flex: 0 1 auto;
    min-width: 80px;
  }
  .progress-step:not(:last-child)::after {
    display: none;
  }
  .step-label {
    font-size: 0.75rem;
  }
}
.dashboard-page .dashboard-header .button.button-primary,
.dashboard-page .dashboard-header .button-primary {
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(192, 57, 43, 0.2);
}

.dashboard-page #note-search {
  width: 100%;
  max-width: 360px;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 10px 12px;
  background: #FFFFFF;
  color: #111827;
  font-size: 14px;
}
.dashboard-page #note-search::placeholder {
  color: #6B7280;
}
.dashboard-page #note-search:focus {
  outline: none;
  border-color: #C0392B;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.dashboard-page .recent-notes .button-secondary {
  min-height: 36px;
  border-color: #E5E7EB;
  color: #111827;
  padding: 8px 12px;
}

.dashboard-page .recent-notes__header {
  justify-content: center;
  text-align: center;
}

.drawer-panel {
  z-index: 420;
  width: min(540px, 100%);
  top: 12px;
  right: 12px;
  transform: translateX(calc(100% + 24px));
  height: calc(100vh - 24px);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-left-width: 1px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.99));
  box-shadow: -22px 0 44px rgba(17, 24, 39, 0.16), 0 16px 32px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(4px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: none;
  -ms-overflow-style: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 300ms ease, opacity 0.16s ease, visibility 0.16s ease;
}

.drawer-panel.open,
.drawer-panel.side-drawer--open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.drawer-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.drawer-panel::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.drawer-panel::-webkit-scrollbar-track {
  background: transparent;
}

.drawer-overlay {
  z-index: 410;
  background: rgba(17, 24, 39, 0.28);
}

.drawer-header {
  padding: 24px 26px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  align-items: flex-start;
}

.drawer-header-meta {
  flex: 1;
  min-width: 0;
}

.drawer-ref-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(192, 57, 43, 0.1);
  color: #C0392B;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.drawer-header h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.drawer-header p {
  margin: 0;
  color: #6B7280;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 450;
}

.drawer-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(192, 57, 43, 0.32);
  border-radius: 10px;
  background: rgba(192, 57, 43, 0.12);
  color: #C0392B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}
.drawer-close:hover {
  background: #C0392B;
  color: #fff;
  border-color: #C0392B;
  transform: translateY(-1px);
}

.drawer-content {
  padding: 22px 24px 18px;
  display: grid;
  gap: 16px;
  overflow: visible;
}

.drawer-values {
  margin-bottom: 0;
}
.drawer-values strong,
.drawer-values #drawer-total {
  font-size: 28px;
  line-height: 1.18;
  font-weight: 580;
  letter-spacing: 0.01em;
  color: #1f2937;
}

.drawer-section h3 {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6B7280;
}

.drawer-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.drawer-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.drawer-field > span {
  font-size: 12px;
  font-weight: 520;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6B7280;
}

.drawer-field > strong {
  font-size: 16px;
  font-weight: 520;
  line-height: 1.35;
  color: #111827;
}

.drawer-motif {
  margin: 0 0 10px;
  color: #111827;
  font-weight: 520;
  line-height: 1.45;
}

.drawer-cost-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.drawer-cost-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.drawer-cost-item span {
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
}

.drawer-cost-item strong {
  font-size: 18px;
  font-weight: 560;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.drawer-cost-item.is-over-cap {
  border-color: rgba(185, 28, 28, 0.35);
  background: rgba(254, 242, 242, 0.9);
}

.drawer-cost-item.is-over-cap strong {
  color: #b91c1c;
}

.drawer-panel[data-role="administrateur"] .drawer-cost-item.is-over-cap::after {
  content: "Plafond depasse";
  display: inline-flex;
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(185, 28, 28, 0.35);
  background: rgba(185, 28, 28, 0.08);
  color: #991b1b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.drawer-cost-list {
  display: grid;
  gap: 10px;
}

.drawer-cost-empty {
  margin: 6px 0 2px;
  color: #6B7280;
  font-size: 14px;
  font-weight: 480;
}

.drawer-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  padding: 14px 16px;
}
.drawer-footer .drawer-complement-link {
  font-weight: 550;
}
.drawer-footer .button {
  font-weight: 560;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-step {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
}

.timeline-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.timeline-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeline-text strong {
  font-size: 16px;
}

.timeline-text span {
  font-size: 13px;
  color: #6B7280;
}

@media (max-width: 767px) {
  .drawer-content {
    padding: 16px;
  }
  .drawer-grid,
  .drawer-cost-grid {
    grid-template-columns: 1fr;
  }
  .drawer-header h2 {
    font-size: 20px;
  }
  .drawer-values strong,
  .drawer-values #drawer-total {
    font-size: 24px;
  }
  .drawer-panel {
    top: 0;
    right: 0;
    height: 100vh;
    border-radius: 0;
    border-right: none;
    border-top: none;
    border-bottom: none;
  }
}
@media (max-width: 1023px) {
  .modal-overlay,
  .modal-card {
    max-width: 90vw;
  }
}
@media (max-width: 767px) {
  .modal-overlay,
  .modal-card {
    max-width: 95vw;
    margin: 16px;
  }
}

@media (max-width: 767px) {
  .modal-card {
    padding: 16px;
  }
  .modal-card h3 {
    font-size: 16px;
  }
  .modal-card textarea {
    min-height: 100px;
  }
  .modal-card button {
    font-size: 13px;
    padding: 8px 12px;
  }
}

@media (max-width: 1023px) {
  .drawer-panel {
    width: 380px;
  }
}
@media (max-width: 767px) {
  .drawer-panel {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .form-field input,
  .form-field select,
  .form-field textarea,
  .users-field input,
  .users-field select,
  .users-field textarea,
  .org-field input,
  .org-field select,
  .org-field textarea,
  .filters-field input,
  .filters-field select,
  .filters-field textarea,
  .bareme-field input,
  .bareme-field select,
  .bareme-field textarea {
    font-size: 16px;
    padding: 12px;
  }
}

@media (max-width: 1023px) {
  .data-table,
  .table,
  .org-table,
  .users-table {
    font-size: 13px;
  }
  .data-table thead th,
  .table thead th,
  .org-table thead th,
  .users-table thead th {
    padding: 12px 12px;
    font-size: 10px;
  }
  .data-table tbody td,
  .table tbody td,
  .org-table tbody td,
  .users-table tbody td {
    padding: 12px;
  }
}
@media (max-width: 767px) {
  .data-table,
  .table,
  .org-table,
  .users-table {
    font-size: 12px;
  }
  .data-table thead th,
  .table thead th,
  .org-table thead th,
  .users-table thead th {
    padding: 10px 8px;
  }
  .data-table tbody td,
  .table tbody td,
  .org-table tbody td,
  .users-table tbody td {
    padding: 8px 10px;
  }
  .data-table tbody td::before,
  .table tbody td::before,
  .org-table tbody td::before,
  .users-table tbody td::before {
    font-size: 11px;
    font-weight: 600;
  }
}

@media (max-width: 1023px) {
  .admin-filters {
    padding: 12px;
  }
  .admin-filters input,
  .admin-filters select {
    min-width: 140px;
    font-size: 13px;
  }
}
@media (max-width: 767px) {
  .admin-filters {
    padding: 10px;
  }
  .admin-filters > .card > div, .admin-filters > .metric-card > div,
  .admin-filters > .kpi-card > div {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  .admin-filters > .card > div input, .admin-filters > .metric-card > div input,
  .admin-filters > .kpi-card > div input,
  .admin-filters > .card > div select,
  .admin-filters > .metric-card > div select,
  .admin-filters > .kpi-card > div select,
  .admin-filters > .card > div button,
  .admin-filters > .metric-card > div button,
  .admin-filters > .kpi-card > div button {
    width: 100% !important;
    min-width: auto !important;
  }
}

@media (max-width: 767px) {
  .button,
  .button-small,
  .button-success,
  .button-danger,
  .button-outlined {
    font-size: 13px;
    padding: 8px 12px;
  }
}

@media (max-width: 767px) {
  .icon-action,
  .org-icon-btn,
  .icon-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}

@media (max-width: 1023px) {
  .admin-table-card,
  .filters-card,
  .bareme-card,
  .card,
  .metric-card,
  .kpi-card {
    padding: 16px;
  }
}
@media (max-width: 767px) {
  .admin-table-card,
  .filters-card,
  .bareme-card,
  .card,
  .metric-card,
  .kpi-card {
    padding: 12px;
    border-radius: 8px;
  }
}

@media (max-width: 1023px) {
  .page-header,
  .admin-dashboard-page > .page-header {
    margin-bottom: 16px;
  }
  .page-header h1,
  .admin-dashboard-page > .page-header h1 {
    font-size: 22px;
  }
  .page-header p,
  .admin-dashboard-page > .page-header p {
    font-size: 13px;
  }
}
@media (max-width: 767px) {
  .page-header,
  .admin-dashboard-page > .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .page-header h1,
  .admin-dashboard-page > .page-header h1 {
    font-size: 18px;
  }
  .page-header button,
  .admin-dashboard-page > .page-header button {
    width: 100%;
  }
}

@media (max-width: 1023px) {
  .kpi-grid {
    gap: 12px;
  }
}
@media (max-width: 767px) {
  .kpi-grid {
    gap: 10px;
  }
}

@media (max-width: 1023px) {
  .kpi-card {
    padding: 16px;
  }
}
@media (max-width: 767px) {
  .kpi-card {
    padding: 12px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .kpi-card__icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  .kpi-card__value {
    font-size: 20px;
  }
  .kpi-card__label {
    font-size: 12px;
  }
  .kpi-card__trend {
    font-size: 11px;
  }
}

@media (max-width: 1023px) {
  .pagination {
    gap: 4px;
  }
  .pagination a,
  .pagination button {
    min-width: 36px;
    padding: 6px 8px;
    font-size: 12px;
  }
}
@media (max-width: 767px) {
  .pagination {
    flex-direction: column;
  }
  .pagination a,
  .pagination button {
    width: 100%;
  }
}

@media (max-width: 1023px) {
  .format-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 767px) {
  .format-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 1023px) {
  .format-card {
    padding: 14px;
  }
}
@media (max-width: 767px) {
  .format-card {
    padding: 12px;
  }
  .format-card .format-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
    margin-bottom: 8px;
  }
  .format-card .format-title {
    font-size: 13px;
  }
  .format-card .format-desc {
    font-size: 12px;
    margin-bottom: 8px;
  }
  .format-card .format-ext {
    font-size: 11px;
    padding: 3px 8px;
  }
}

@media (max-width: 1023px) {
  .user-cell {
    gap: 8px;
  }
}
@media (max-width: 767px) {
  .user-cell {
    flex-direction: column;
    align-items: flex-start;
  }
  .user-cell .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }
  .user-cell .user-name {
    font-size: 13px;
  }
}

@media (max-width: 1023px) {
  .role-pill {
    padding: 3px 8px;
    font-size: 11px;
  }
}
@media (max-width: 767px) {
  .role-pill {
    padding: 2px 6px;
    font-size: 10px;
  }
}

@media (max-width: 1023px) {
  .status-badge {
    padding: 4px 10px;
    font-size: 11px;
  }
}
@media (max-width: 767px) {
  .status-badge {
    padding: 3px 8px;
    font-size: 10px;
  }
}

@media (max-width: 767px) {
  .status-switch {
    width: 40px;
    height: 22px;
  }
}

@media (max-width: 1023px) {
  .org-code {
    padding: 3px 8px;
    font-size: 11px;
  }
}
@media (max-width: 767px) {
  .org-code {
    padding: 2px 6px;
    font-size: 10px;
  }
}

@media (max-width: 1023px) {
  .admin-table-header {
    flex-direction: column;
    gap: 12px;
  }
  .admin-table-header h2 {
    font-size: 16px;
  }
}
@media (max-width: 767px) {
  .admin-table-header {
    gap: 10px;
  }
  .admin-table-header h2 {
    font-size: 14px;
  }
  .admin-table-header a {
    font-size: 12px;
  }
}

.notes-page {
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 24px;
}

.notes-page .notes-header {
  margin-bottom: 0;
}

.notes-page .notes-header h1 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 600;
  color: #111827;
}

.notes-page .notes-count {
  margin: 0;
  font-size: 14px;
  color: #6B7280;
}

.notes-page .filter-card,
.notes-page .table-card {
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.notes-page .filter-card {
  padding: 24px;
}

.notes-page .table-card {
  padding: 24px 24px 18px;
}

.notes-page .filter-card:hover,
.notes-page .table-card:hover {
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.notes-page .filter-card.is-loading,
.notes-page .table-card.is-loading {
  opacity: 0.72;
}

.notes-page .filters-row {
  gap: 16px;
  margin-bottom: 16px;
}

.notes-page .filters-row input[type=search],
.notes-page .filters-row input[type=date] {
  min-height: 44px;
  padding: 11px 14px;
  border-radius: 10px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.notes-page .chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2px;
}

.notes-page .chip {
  padding: 8px 12px;
  transition: border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, background-color 0.16s ease;
}

.admin-notes-page .actions-cell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-notes-page .notes-action-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #111827;
  transition: all 0.16s ease;
}
.admin-notes-page .notes-action-btn .ui-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}
.admin-notes-page .notes-action-btn:hover {
  transform: translateY(-1px);
}

.admin-dashboard-page .admin-table-header {
  justify-content: center;
}

.admin-dashboard-page .admin-table-header > div {
  width: 100%;
}

.admin-dashboard-page .admin-table-header h2 {
  text-align: center;
}

.admin-dashboard-page .data-table td[data-label="#ID"] a {
  color: #C0392B;
  font-weight: 700;
  text-decoration: none !important;
  letter-spacing: 0.01em;
}

.admin-dashboard-page .data-table td[data-label="#ID"] a:hover,
.admin-dashboard-page .data-table td[data-label="#ID"] a:focus-visible {
  color: #A93226;
  text-decoration: none !important;
}

.admin-dashboard-page .actions-cell {
  gap: 12px;
}

.admin-dashboard-page .actions-cell .validate-note,
.admin-dashboard-page .actions-cell .reject-note {
  position: relative;
  min-height: 42px;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transform: translateY(0) scale(1);
  transition: transform 180ms ease, box-shadow 220ms ease, background-color 220ms ease, border-color 220ms ease, color 220ms ease;
}

.admin-dashboard-page .actions-cell .validate-note {
  background: rgb(192, 57, 43);
  border-color: rgb(192, 57, 43);
  color: #FFFFFF;
  box-shadow: 0 6px 14px rgba(192, 57, 43, 0.24);
}

.admin-dashboard-page .actions-cell .reject-note {
  background: #FFFFFF;
  border-color: #E6B7B1;
  color: rgb(192, 57, 43);
  box-shadow: 0 4px 12px rgba(148, 163, 184, 0.14);
}

.admin-dashboard-page .actions-cell .validate-note:hover:not(:disabled),
.admin-dashboard-page .actions-cell .reject-note:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.01);
}

.admin-dashboard-page .actions-cell .validate-note:hover:not(:disabled) {
  background: #AB3226;
  border-color: #AB3226;
  box-shadow: 0 10px 18px rgba(192, 57, 43, 0.3);
}

.admin-dashboard-page .actions-cell .reject-note:hover:not(:disabled) {
  background: #FFF6F5;
  border-color: #D68A80;
  color: #9D2E21;
  box-shadow: 0 8px 14px rgba(192, 57, 43, 0.16);
}

.admin-dashboard-page .actions-cell .validate-note:active:not(:disabled),
.admin-dashboard-page .actions-cell .reject-note:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
}

.admin-dashboard-page .actions-cell .validate-note:focus-visible,
.admin-dashboard-page .actions-cell .reject-note:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.18);
}

.user-home-page {
  gap: 24px;
}

.user-home-page > .page-header,
.user-home-page > .kpi-grid,
.user-home-page > .user-home-table-card {
  animation: fade-up-in 240ms ease-out both;
}

.user-home-page > .kpi-grid {
  animation-delay: 40ms;
}

.user-home-page > .user-home-table-card {
  animation-delay: 90ms;
}

.user-home-page .page-header {
  margin-bottom: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  align-items: center;
}

.user-home-page__cta-group {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.user-home-page .page-header h1 {
  margin: 0 0 6px;
}

.user-home-page .page-header p,
.user-home-table-card .admin-table-header p {
  color: #6B7280;
  margin-bottom: 16px;
}

.user-home-page p:last-child,
.user-home-table-card .admin-table-header p:last-child {
  margin-bottom: 16px;
}

.user-home-page .kpi-grid {
  margin-bottom: 10px;
}

.user-home-page .kpi-card {
  border: 1px solid #E5E7EB;
  padding: 18px 18px 16px;
  min-height: 144px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.user-home-page .kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
  border-color: rgba(192, 57, 43, 0.18);
}

.user-home-page .kpi-card__value {
  font-size: 30px;
}

.user-home-page .kpi-card__trend {
  min-height: 34px;
}

.user-home-table-card .admin-table-header {
  justify-content: flex-start;
  align-items: flex-start;
}

.user-home-table-card .admin-table-header > div {
  width: auto;
}

.user-home-table-card .admin-table-header h2 {
  text-align: left;
}

.user-home-table-card .settings-divider {
  margin: 0 24px;
  border-top: 1px solid #E5E7EB;
}

.user-notes-page .user-home-table-card {
  border-radius: 16px;
  overflow: visible;
}

.user-notes-page .user-home-table-card .data-table thead,
.user-notes-page .user-home-table-card .data-table thead th,
.user-notes-page .user-home-table-card .data-table thead th:first-child,
.user-notes-page .user-home-table-card .data-table thead th:last-child {
  border-radius: 0;
}

.user-notes-page .pagination {
  border-top: 0;
  padding-top: 0;
}

.user-home-table-card {
  border-radius: 16px;
  overflow: hidden;
}

.user-home-table-card .search-filter-row {
  padding: 18px 24px 0;
  margin-bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.user-home-table-card #note-search {
  width: 100%;
  max-width: 100%;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
}

.user-home-table-card #note-search:focus {
  border-color: #C0392B;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

.user-home-table-card .filter-chips {
  margin-top: 0;
  justify-content: flex-start;
}

.user-home-table-card .filter-chips .chip {
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 100px;
}

.user-home-table-card .data-table thead th {
  font-size: 10px;
  letter-spacing: 0.12em;
}

.user-home-table-card .table-responsive,
.user-home-table-card .data-table,
.user-home-table-card .data-table thead {
  border-top: 0;
}

.user-home-table-card .data-table thead th:first-child {
  border-top-left-radius: 14px;
}

.user-home-table-card .data-table thead th:last-child {
  border-top-right-radius: 14px;
  text-align: center;
}

.user-home-table-card .data-table tbody td {
  padding-top: 18px;
  padding-bottom: 18px;
}

.user-home-table-card .data-table tbody tr:hover td {
  background: #fcfcfd;
}

.user-home-table-card .data-table tbody tr {
  transition: background-color 0.16s ease;
}

.user-home-table-card .link-red {
  font-size: 14px;
  font-weight: 600;
  transition: color 0.16s ease, text-decoration-color 0.16s ease;
}

.user-home-table-card .link-red:hover,
.user-home-table-card .link-red:focus-visible {
  text-decoration: none;
}

.user-home-table-card .badge {
  font-weight: 600;
}

.user-home-page .actions-cell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.user-home-page td.actions-cell,
.user-notes-page td.actions-cell {
  display: table-cell;
  text-align: center;
  white-space: nowrap;
}

.user-notes-page .notes-table th:last-child,
.user-home-page .data-table th:last-child {
  text-align: center;
}

.user-home-page td.actions-cell > * + *,
.user-notes-page td.actions-cell > * + * {
  margin-left: 10px;
}

.user-home-action {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #111827;
  transition: all 0.16s ease;
}

.user-home-action .ui-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.user-home-action:hover {
  transform: translateY(-1px);
}

.user-home-action--view:hover {
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.08);
}

.user-home-action--pdf:hover {
  color: #C0392B;
  border-color: rgba(192, 57, 43, 0.35);
  background: rgba(192, 57, 43, 0.08);
}

.user-home-table-card__footer {
  display: flex;
  justify-content: flex-end;
  padding: 18px 24px 22px;
}

.user-home-table-card__footer .button {
  min-height: unset;
  padding: 8px 12px;
}

.drawer-panel[data-role=utilisateur] .drawer-footer,
.drawer-panel[data-role=utilisateur] #drawer-admin-footer {
  display: none !important;
}

@media (max-width: 1023px) {
  .user-home-page .page-header {
    align-items: flex-start;
  }

  .user-home-table-card .search-filter-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 767px) {
  .user-home-page__cta-group {
    width: 100%;
  }
  .user-home-page__cta-group .button {
    flex: 1 1 100%;
  }
  .user-home-action {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }
  .user-home-table-card .search-filter-row {
    padding: 16px 16px 0;
    grid-template-columns: 1fr;
  }
  .user-home-table-card__footer {
    justify-content: stretch;
    padding: 16px;
  }
  .user-home-table-card__footer .button {
    width: 100%;
  }
}

.admin-notes-page .notes-action-validate {
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.32);
  background: rgba(15, 118, 110, 0.08);
}
.admin-notes-page .notes-action-validate:hover {
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.45);
  background: rgba(15, 118, 110, 0.14);
}

.admin-notes-page .notes-action-reject {
  color: #DC2626;
  border-color: rgba(220, 38, 38, 0.32);
  background: rgba(220, 38, 38, 0.06);
}
.admin-notes-page .notes-action-reject:hover {
  color: #DC2626;
  border-color: rgba(220, 38, 38, 0.45);
  background: rgba(220, 38, 38, 0.12);
}

.admin-notes-page .notes-action-pdf:hover {
  color: #C0392B;
  border-color: rgba(192, 57, 43, 0.35);
  background: rgba(192, 57, 43, 0.08);
}

@media (max-width: 767px) {
  .admin-notes-page .notes-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }
}
.notes-page .chip:hover {
  transform: translateY(-1px);
}

.notes-page .chip:active {
  transform: translateY(0);
}

.notes-page .table-responsive {
  border-radius: 12px;
}

.notes-page .notes-table th,
.notes-page .notes-table td {
  padding: 14px 16px;
}

.user-notes-page .notes-table tbody td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.notes-page .notes-table th {
  background: #F9FAFB;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.notes-page .notes-table tbody tr {
  transition: background-color 0.16s ease;
}

.notes-page .notes-table tbody tr:hover td {
  background: #fcfcfd;
}

.notes-page .icon-action {
  transition: transform 0.16s ease, background-color 0.16s ease;
}

.notes-page .icon-action:hover {
  transform: scale(1.04);
}

.notes-page .pagination {
  padding-top: 16px;
}

.user-notes-page {
  gap: 22px;
}

.notes-page .notes-header {
  margin-bottom: 24px;
}

.user-notes-page .admin-table-header {
  justify-content: flex-start;
  align-items: flex-start;
  padding-bottom: 8px;
}

.user-notes-page .admin-table-header > div {
  width: 100%;
}

.user-notes-page .link-red,
.user-notes-page .note-id-link {
  font-weight: 700;
}

.user-notes-page .link-red:hover,
.user-notes-page .note-id-link:hover {
  text-decoration: none;
}

.user-notes-page .user-notes-intro {
  margin-top: 4px;
}

.user-notes-page .user-notes-filters {
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fdfdfe 100%);
}

.user-notes-page .user-notes-filters .filters-row {
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.user-notes-page .user-notes-filters .chips-row {
  margin-top: 0;
}

.user-notes-page .user-notes-filters input[type=search],
.user-notes-page .user-notes-filters input[type=date] {
  min-height: 42px;
  border-radius: 12px;
}

.user-notes-page .user-home-table-card {
  border-radius: 16px;
  overflow: visible;
}

.user-notes-page .user-home-table-card .admin-table-header {
  padding-bottom: 14px;
}

.user-notes-page .user-home-table-card .data-table tbody tr {
  transition: transform 0.16s ease, box-shadow 0.2s ease, background-color 0.16s ease;
}

.user-notes-page .user-home-table-card .data-table tbody tr:hover {
  transform: translateY(-1px);
}

.user-notes-page .user-home-action {
  border-color: #e5e7eb;
  color: #374151;
}

.user-notes-page .user-home-action:hover,
.user-notes-page .user-home-action:focus-visible {
  color: #C0392B;
  border-color: rgba(192, 57, 43, 0.35);
  background: rgba(192, 57, 43, 0.08);
  transform: translateY(-1px);
}

.user-notes-page .user-home-action:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.14);
}

.user-notes-page .user-home-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.user-notes-page .user-home-table-card__footer {
  padding-top: 14px;
}

.user-notes-page .pagination {
  border-top: 0;
  padding-top: 0;
}

.user-notes-page .pagination:empty {
  display: none;
}

.user-notes-page .user-home-table-card .data-table tbody tr:last-child td {
  border-bottom: 1px solid #E5E7EB;
}

.user-notes-page .user-home-table-card .data-table thead,
.user-notes-page .user-home-table-card .data-table thead th,
.user-notes-page .user-home-table-card .data-table thead th:first-child,
.user-notes-page .user-home-table-card .data-table thead th:last-child {
  border-radius: 0 !important;
}

@media (max-width: 1023px) {
  .user-notes-page .user-notes-filters .filters-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1023px) {
  .notes-page {
    padding: 0;
  }
  .notes-page .notes-header h1 {
    font-size: 22px;
  }
  .notes-page .filter-card,
  .notes-page .table-card {
    padding: 18px;
  }
}
@media (max-width: 767px) {
  .notes-page {
    padding: 0;
    gap: 14px;
  }
  .notes-page .notes-header h1 {
    font-size: 20px;
  }
  .notes-page .filter-card,
  .notes-page .table-card {
    padding: 14px;
    border-radius: 14px;
  }
  .notes-page .filters-row {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 10px;
  }
}

body.sidebar-open {
  overflow-x: hidden;
}

@media (max-width: 1023px) {
  .sidebar {
    width: 280px !important;
    transform: translateX(-100%) !important;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0) !important;
  }
  .sidebar.sidebar--open,
  .sidebar.open {
    transform: translateX(0) !important;
    box-shadow: 10px 0 32px rgba(17, 24, 39, 0.18) !important;
  }
  .sidebar .sidebar__logo-text,
  .sidebar .sidebar__nav-item span,
  .sidebar .sidebar__user-info,
  .sidebar .brand,
  .sidebar .user-details,
  .sidebar .sidebar-item span {
    display: block !important;
  }
  .sidebar .sidebar__logo,
  .sidebar .sidebar-brand,
  .sidebar .sidebar-header {
    justify-content: flex-start !important;
    padding: 18px 18px !important;
    min-height: 72px !important;
  }
  .sidebar .sidebar__nav-item,
  .sidebar .sidebar-item {
    justify-content: flex-start !important;
    padding: 12px 14px !important;
  }
  .sidebar .sidebar__user,
  .sidebar .sidebar-footer {
    justify-content: flex-start !important;
  }
  .topbar {
    left: 0 !important;
    padding: 0 18px !important;
  }
  .topbar .topbar__hamburger,
  .topbar .sidebar-toggle,
  .topbar .icon-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
  }
  .topbar .topbar__title,
  .topbar .topbar-title {
    font-size: 17px;
    min-width: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: 12px;
  }
  .topbar .topbar__right,
  .topbar .topbar-actions {
    gap: 12px;
  }
  .topbar .topbar-notification-panel {
    right: 0;
    width: min(340px, calc(100vw - 28px));
  }
  .app-wrapper {
    margin-left: 0 !important;
  }
  .main-content {
    padding-left: 14px;
    padding-right: 14px;
  }
  .main-content .page-inner {
    padding: 32px 12px 32px;
  }
  .dashboard-header,
  .page-header,
  .notes-header,
  .users-page-header,
  .org-header,
  .exports-header {
    gap: 14px;
  }
  .filters-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .notes-page {
    padding: 0;
  }
  .recent-notes,
  .admin-table-card,
  .filter-card,
  .table-card,
  .users-table-card,
  .org-card {
    padding: 14px;
  }
  .drawer-panel {
    width: min(420px, calc(100vw - 20px));
    top: 10px;
    right: 10px;
    height: calc(100vh - 20px);
  }
}

@media (max-width: 767px) {
  .sidebar {
    width: min(88vw, 300px) !important;
  }
  .topbar {
    padding: 0 12px !important;
  }
  .topbar .topbar__title,
  .topbar .topbar-title {
    margin-left: 10px;
    font-size: 15px;
  }
  .topbar .topbar__right,
  .topbar .topbar-actions {
    gap: 8px;
  }
  .topbar .topbar-notification-panel {
    right: 0;
    width: min(320px, calc(100vw - 20px));
  }
  .main-content {
    padding-left: 8px;
    padding-right: 8px;
  }
  .main-content .page-inner {
    padding: 30px 6px 24px;
  }
  .dashboard-header,
  .page-header,
  .notes-header,
  .users-page-header,
  .org-header,
  .exports-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .filters-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .chips-row {
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .chips-row::-webkit-scrollbar {
    display: none;
  }
  .recent-notes,
  .admin-table-card,
  .filter-card,
  .table-card,
  .users-table-card,
  .org-card,
  .bareme-card,
  .settings-page .settings-card {
    border-radius: 16px;
    padding: 12px;
  }
}

.page-header,
.notes-header,
.users-page-header,
.org-header,
.exports-header,
.settings-page .page-header,
.admin-dashboard-page .page-header {
  margin-bottom: 24px;
}

.page-header h1,
.notes-header h1,
.users-page-header h1,
.org-header h1,
.exports-header h1,
.settings-page .page-header h1,
.admin-dashboard-page .page-header h1 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.12;
}

.page-header p,
.notes-header p,
.users-page-header p,
.org-header p,
.exports-header p,
.settings-page .page-header p,
.admin-dashboard-page .page-header p {
  margin: 0;
  color: #6B7280;
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 1023px) {
  .page-header,
  .notes-header,
  .users-page-header,
  .org-header,
  .exports-header,
  .settings-page .page-header,
  .admin-dashboard-page .page-header {
    margin-bottom: 20px;
  }

  .page-header h1,
  .notes-header h1,
  .users-page-header h1,
  .org-header h1,
  .exports-header h1,
  .settings-page .page-header h1,
  .admin-dashboard-page .page-header h1 {
    font-size: 24px;
  }

  .page-header p,
  .notes-header p,
  .users-page-header p,
  .org-header p,
  .exports-header p,
  .settings-page .page-header p,
  .admin-dashboard-page .page-header p {
    font-size: 13px;
  }
}

@media (max-width: 767px) {
  .page-header,
  .notes-header,
  .users-page-header,
  .org-header,
  .exports-header,
  .settings-page .page-header,
  .admin-dashboard-page .page-header {
    display: block;
    margin-bottom: 18px;
  }

  .page-header h1,
  .notes-header h1,
  .users-page-header h1,
  .org-header h1,
  .exports-header h1,
  .settings-page .page-header h1,
  .admin-dashboard-page .page-header h1 {
    margin-bottom: 6px;
    font-size: 24px;
  }

  .page-header p,
  .notes-header p,
  .users-page-header p,
  .org-header p,
  .exports-header p,
  .settings-page .page-header p,
  .admin-dashboard-page .page-header p {
    font-size: 13px;
  }
}

.topbar .topbar-notification-panel.is-open {
  display: flex;
}

@media (max-width: 1023px) {
  .topbar .topbar__user,
  .topbar .topbar-user {
    position: static;
  }

  .topbar .topbar-notification-panel {
    position: fixed;
    top: 76px;
    right: 16px;
    width: min(360px, calc(100vw - 32px));
    max-height: calc(100vh - 96px);
    z-index: 260;
  }
}

@media (max-width: 767px) {
  .topbar .topbar-notification-panel {
    top: 74px;
    left: 50%;
    right: auto;
    width: 95vw;
    max-width: 95vw;
    max-height: 60vh;
    border-radius: 18px;
    transform: translateX(-50%) translateY(-8px) scale(0.985);
    transform-origin: top center;
  }
  .topbar .topbar-notification-panel.is-open {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  .topbar .notification-panel__header {
    padding: 11px 12px;
  }
  .topbar [data-notification-list] {
    gap: 6px;
    padding: 8px;
  }
  .topbar .notification-item {
    padding: 9px 10px;
    border-radius: 10px;
    gap: 4px;
  }
  .topbar .notification-item__title {
    font-size: 12px;
  }
  .topbar .notification-item__message {
    font-size: 11px;
  }
  .topbar .notification-item__meta,
  .topbar .notification-item__link {
    font-size: 10px;
  }
  .topbar .notification-actions {
    padding: 8px;
    gap: 6px;
  }
}

@media (max-width: 767px) {
  .admin-dashboard-page .page-header {
    display: block;
    margin-bottom: 18px;
  }

  .admin-dashboard-page .page-header h1 {
    margin-bottom: 6px;
    font-size: 24px;
    line-height: 1.15;
  }

  .admin-dashboard-page .page-header p {
    margin-top: 0;
    font-size: 13px;
    line-height: 1.45;
  }

  .admin-dashboard-page .table-responsive {
    overflow: visible;
  }

  .admin-dashboard-page .data-table {
    min-width: 0;
  }

  .admin-table-card .data-table tbody tr {
    gap: 0;
    border-radius: 14px;
    overflow: hidden;
  }

  .admin-table-card .data-table tbody td {
    display: grid;
    grid-template-columns: minmax(84px, 96px) minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #F3F4F6;
  }

  .admin-table-card .data-table tbody td:last-child {
    border-bottom: none;
  }

  .admin-table-card .data-table tbody td::before {
    margin-right: 0;
  }

  .admin-dashboard-page .actions-cell {
    justify-content: flex-start;
    gap: 8px;
  }

  .admin-dashboard-page .actions-cell .button {
    min-height: 38px;
  }

  .admin-table-card .text-center {
    display: block !important;
    grid-template-columns: none !important;
    padding: 24px 14px !important;
    text-align: center !important;
    color: #6B7280;
    font-size: 13px;
    border-bottom: none !important;
  }

  .admin-table-card .text-center::before {
    content: none !important;
  }
}

@media (hover: none) {
  .card:active,
  .metric-card:active,
  .kpi-card:active,
  .admin-table-card:active,
  .users-table-card:active,
  .org-card:active,
  .filter-card:active,
  .table-card:active,
  .button:active:not(:disabled),
  .btn:active:not(:disabled),
  .button-primary:active:not(:disabled),
  .button-outlined:active:not(:disabled),
  .button-secondary:active:not(:disabled),
  .btn-validate:active:not(:disabled),
  .btn-reject:active:not(:disabled),
  .btn-complement:active:not(:disabled),
  .btn-view:active:not(:disabled),
  .topbar .topbar__bell:active,
  .topbar .notifications:active,
  .topbar .icon-notification:active {
    transform: translateY(-1px);
  }
}

.note-page--redesign {
  position: relative;
  isolation: isolate;
}
.note-page--redesign::before {
  content: '';
  position: fixed;
  inset: 0 0 auto 0;
  height: 360px;
  pointer-events: none;
  background: radial-gradient(circle at top left, rgba(192, 57, 43, 0.1), transparent 34%), radial-gradient(circle at top right, rgba(15, 23, 42, 0.08), transparent 26%);
  z-index: -1;
}
.note-page--redesign .note-sticky-header {
  top: 72px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: blur(14px);
}
.note-page--redesign .progress-steps {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}
.note-page--redesign .progress-step {
  cursor: pointer;
  border-radius: 14px;
  padding: 8px 10px;
  transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.note-page--redesign .progress-step:hover {
  transform: translateY(-1px);
  background: rgba(248, 250, 252, 0.92);
}
.note-page--redesign .progress-step--active {
  background: linear-gradient(180deg, #fff2ef 0%, #ffffff 100%);
  box-shadow: inset 0 0 0 1px rgba(192, 57, 43, 0.14);
}
.note-page--redesign .progress-step--done {
  background: rgba(236, 253, 245, 0.9);
}
.note-page--redesign .progress-step .step-indicator {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}
.note-page--redesign .note-stage {
  scroll-margin-top: 168px;
}
.note-page--redesign .policy-alert,
.note-page--redesign .header-band--modern,
.note-page--redesign .note-footer--modern,
.note-page--redesign .footer-note-band--bottom {
  position: relative;
  overflow: hidden;
}
.note-page--redesign .policy-alert::after,
.note-page--redesign .header-band--modern::after,
.note-page--redesign .note-footer--modern::after,
.note-page--redesign .footer-note-band--bottom::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.note-page--redesign .note-form-card {
  position: relative;
  overflow: hidden;
}
.note-page--redesign .note-form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.72) 50%, rgba(255, 255, 255, 0) 100%);
}
.note-page--redesign .note-form-card--sidebar,
.note-page--redesign .transport-guidelines {
  position: sticky;
  top: 214px;
}
.note-page--redesign .section-heading h2::after {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  margin-bottom : 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #c0392b 0%, rgba(192, 57, 43, 0.18) 100%);
}
.note-page--redesign .note-checklist li,
.note-page--redesign .guideline-list li,
.note-page--redesign .total-breakdown__item,
.note-page--redesign .builder-preview > div,
.note-page--redesign .transport-item {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}
.note-page--redesign .note-checklist li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.note-page--redesign .note-checklist li::before {
  content: '';
  width: 8px;
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #c0392b 0%, #e85d4a 100%);
  flex-shrink: 0;
}
.note-page--redesign .transport-item {
  overflow: hidden;
}

.note-page--redesign .summary-table {
  overflow: hidden;
  border-radius: 16px;
}
.note-page--redesign .expense-summary-card__actions .button-outlined,
.note-page--redesign .button-group .button-outlined,
.note-page--redesign .button-group .button-primary,
.note-page--redesign #calculate-route,
.expense-builder-page .button-primary,
.expense-builder-page .button-outlined {
  min-height: 40px;
  padding-inline: 16px;
  border-radius: 14px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.note-page--redesign .expense-summary-card__actions .button-outlined:hover,
.note-page--redesign .button-group .button-outlined:hover,
.note-page--redesign .button-group .button-primary:hover,
.note-page--redesign #calculate-route:hover,
.expense-builder-page .button-primary:hover,
.expense-builder-page .button-outlined:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}
.note-page--redesign .button-group .button-primary {
  background: linear-gradient(180deg, #c84a39 0%, #b63727 100%);
  border-color: #b63727;
}
.note-page--redesign .button-group .button-primary:disabled {
  transform: none;
  box-shadow: none;
  opacity: 0.68;
}
.note-page--redesign .signature-area--modern::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(148, 163, 184, 0.48) 18%, rgba(148, 163, 184, 0.48) 82%, transparent 100%);
  pointer-events: none;
}
.expense-builder-page .note-form-card {
  border-radius: 20px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}
.expense-builder-page__header h1 {
  margin: 6px 0 8px;
  font-size: 32px;
  line-height: 1.08;
}
.expense-builder-page__header p {
  margin: 0;
  color: #6b7280;
  max-width: 760px;
}
@media (max-width: 1100px) {
  .note-page--redesign .note-form-card--sidebar,
  .note-page--redesign .transport-guidelines,
  .note-page--redesign .note-footer--modern {
    position: static;
  }
}
.note-page--redesign .header-band--modern {
  margin-bottom: 14px;
}
.note-page--redesign .progress-steps {
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.note-page--redesign .progress-steps::-webkit-scrollbar {
  display: none;
}
.note-page--redesign .progress-step {
  min-width: max-content;
}
.note-page--redesign .progress-step .step-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.note-page--redesign .stepper-divider {
  opacity: 0.42;
}
.note-page--redesign .note-form-card--sidebar,
.note-page--redesign .transport-guidelines {
  max-height: calc(100vh - 260px);
  overflow: auto;
  scrollbar-width: thin;
}
.note-page--redesign .field-shell input,
.note-page--redesign .field-shell select,
.note-page--redesign .field-shell textarea {
  font-weight: 500;
}
.note-page--redesign .field-shell input::placeholder,
.note-page--redesign .field-shell textarea::placeholder {
  color: #94a3b8;
}
.note-page--redesign .transport-item__head {
  align-items: baseline;
}
.note-page--redesign .transport-item__head span {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.note-page--redesign .summary-table tbody tr:hover td {
  background: #fcfcfd;
}
.note-page--redesign .expense-summary-card__actions {
  padding-top: 6px;
}
.note-page--redesign .compliance-card,
.note-page--redesign .certification-card,
.note-page--redesign .total-breakdown__item,
.note-page--redesign .builder-preview > div,
.note-page--redesign .note-checklist li,
.note-page--redesign .guideline-list li {
  backdrop-filter: saturate(115%) blur(2px);
}
.note-page--redesign .note-footer--modern {
  align-items: stretch;
}
.note-page--redesign .note-footer-totals {
  row-gap: 8px;
}
.note-page--redesign .button-group {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.note-page--redesign .button-group .button-primary,
.note-page--redesign .button-group .button-outlined {
  min-width: 210px;
  justify-content: center;
}
.expense-builder-page .expense-builder-page__header {
  position: sticky;
  top: 84px;
  z-index: 16;
  padding: 18px 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}
.expense-builder-page .summary-table tbody tr:hover td {
  background: #fcfcfd;
}
@media (max-width: 767px) {
  .note-page--redesign .progress-steps {
    padding: 10px 10px;
    border-radius: 16px;
  }
  .note-page--redesign .progress-step {
    padding: 8px 8px;
  }
  .note-page--redesign .policy-alert {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .note-page--redesign .policy-alert__icon {
    width: 38px;
    height: 38px;
  }
  .note-page--redesign .field-shell input,
  .note-page--redesign .field-shell select,
  .note-page--redesign .field-shell textarea {
    min-height: 48px;
    padding: 13px 14px;
    font-size: 14px;
  }
  .note-page--redesign .summary-table {
    border-radius: 14px;
  }
  .note-page--redesign .button-group {
    width: 100%;
    justify-content: stretch;
  }
  .note-page--redesign .button-group .button-primary,
  .note-page--redesign .button-group .button-outlined {
    width: 100%;
    min-width: 0;
  }
  .note-page--redesign .note-footer--modern {
    padding: 16px;
    border-radius: 18px;
  }
  .note-page--redesign .note-footer-totals {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }
  .expense-builder-page .expense-builder-page__header {
    position: static;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
  }
}
.note-page--redesign::before {
  content: none !important;
}
.note-page--redesign .note-sticky-header {
  position: static !important;
  top: auto !important;
  z-index: 70 !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 24px 0 !important;
  background: #f8fafc !important;
  /* box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05) !important; */
  backdrop-filter: none !important;
}
.note-page--redesign .header-band--modern {
  width: 100% !important;
  margin: 0 !important;
  border-radius: 22px !important;
  background: #fff8f6 !important;
  box-shadow: none !important;
}
.note-page--redesign .header-chip,
.note-page--redesign .policy-alert,
.note-page--redesign .progress-steps,
.expense-builder-page .expense-builder-page__header,
.note-page--redesign .note-footer--modern {
  backdrop-filter: none !important;
}
.note-page--redesign .progress-steps {
  position: sticky !important;
  top: 64px !important;
  z-index: 70 !important;
  margin: 12px 0 0 !important;
  background: #ffffff !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06) !important;
}
/* .note-page--redesign .section-heading__icon {
  background: #fff3ef !important;
  box-shadow: none !important;
} */
.note-page--redesign .section-heading__icon img,
.note-page--redesign .policy-alert__icon img {
  width: 22px !important;
  height: 22px !important;
  object-fit: contain !important;
  display: block !important;
}
.note-page--redesign .section-heading {
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px !important;
}
.note-page--redesign .section-heading > div:last-child {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-width: 0 !important;
}
.note-page--redesign .section-heading--compact {
  align-items: center !important;
}
.note-page--redesign .section-heading__icon {
  flex: 0 0 auto !important;
}
.note-page--redesign .policy-alert {
  background: #fff9e8 !important;
  margin: 20px 24px !important;
  border-radius: 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  min-height: 96px !important;
  padding: 18px 22px !important;
  box-shadow: none !important;
}

.note-page--redesign .policy-alert > div {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}
.note-page--redesign .note-comment-card {
  margin-top: auto;
}
/* .note-page--redesign .note-comment-field textarea {
  min-height: 132px !important;
  resize: vertical !important;
} */

.note-page--redesign .policy-alert::after,
.note-page--redesign .header-band--modern::after,
.note-page--redesign .note-footer--modern::after,
.note-page--redesign .footer-note-band--bottom::after {
  content: none !important;
}
.note-page--redesign .transport-item,
.note-page--redesign .summary-table th,
.note-page--redesign .summary-table td {
  background: #ffffff !important;
}

/* Transport card only: spacing and layout refinements without touching other cards. */
.note-page--redesign #section-transport .note-layout-grid--transport > .note-form-card:first-child {
  padding: 30px 30px 28px !important;
}

.note-page--redesign #section-transport .note-layout-grid--transport > .note-form-card:first-child .section-heading {
  margin-bottom: 18px;
}

.note-page--redesign #section-transport .note-layout-grid--transport > .note-form-card:first-child .section-heading p {
  max-width: 780px;
  line-height: 1.55;
}

.note-page--redesign #section-transport .transport-stack {
  display: grid;
  gap: 14px;
}

.note-page--redesign #section-transport .transport-item {
  border: 1px solid #e6eaf0 !important;
  border-radius: 14px !important;
  padding: 15px 16px 14px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.note-page--redesign #section-transport .transport-item::after {
  display: none !important;
}

.note-page--redesign #section-transport .transport-item__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.note-page--redesign #section-transport .transport-item__head h3 {
  margin: 0;
  /* font-size: 26px; */
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.note-page--redesign #section-transport .transport-item__head span {
    display: block;
    padding: 0;
    border-radius: 0;
    /* background: transparent; */
    /* color: #667085; */
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: normal;
    text-transform: none;
    /* max-width: 920px; */
    background: #fff9e8;
    /* border: 1px solid #F8E2E0; */
    color: #111827;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 12px;
}

.note-page--redesign #section-transport .transport-item__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 188px;
  gap: 10px 12px;
  align-items: end;
}

.note-page--redesign #section-transport .transport-item--km .transport-item__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.note-page--redesign #section-transport .transport-item--km .km-layout--modern {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding: 12px;
  border: 1px solid #e6eaf0;
  border-radius: 12px;
  background: #f8fafc;
}

.note-page--redesign #section-transport .transport-guidelines .guideline-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 2px;
  display: grid;
  gap: 14px;
}

.note-page--redesign #section-transport .transport-guidelines .guideline-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 0;
  background: transparent !important;
  border: 0;
  backdrop-filter: none;
  box-shadow: none !important;
}

.note-page--redesign #section-transport .transport-guidelines .guideline-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  margin-top: 8px;
  margin-left: -4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #c0392b 0%, #e85d4a 100%);
  flex-shrink: 0;
}

.note-page--redesign #section-transport .transport-guidelines .guideline-list li strong,
.note-page--redesign #section-transport .transport-guidelines .guideline-list li span {
  display: inline;
  font-size: 15px;
  line-height: 1.45;
}

.note-page--redesign #section-transport .transport-guidelines .guideline-list li strong {
  color: #1f2937;
  font-weight: 700;
  margin-right: 6px;
}

.note-page--redesign #section-transport .transport-guidelines .guideline-list li span {
  color: #1f2937;
  font-weight: 500;
}

.note-page--redesign #section-transport .transport-guidelines .section-heading {
  margin-bottom: 12px;
}

.note-page--redesign #section-transport .transport-guidelines .section-heading p {
  margin-top: 6px;
  line-height: 1.5;
  max-width: 620px;
}

@media (max-width: 920px) {
  .note-page--redesign #section-transport .transport-item__grid,
  .note-page--redesign #section-transport .transport-item--km .transport-item__grid {
    grid-template-columns: 1fr;
  }
}
.note-page--redesign #section-validation > .note-form-card:last-child {
  padding: 22px !important;
}

.note-page--redesign #section-validation > .note-form-card:last-child .section-heading {
  margin-bottom: 12px !important;
}

.note-page--redesign #section-validation > .note-form-card:last-child .compliance-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

.note-page--redesign #section-validation > .note-form-card:last-child .compliance-grid--refonte {
  gap: 12px !important;
}

.note-page--redesign #section-validation > .note-form-card:last-child .compliance-card {
  display: grid !important;
  width: 100%;
  grid-template-columns: 20px 1fr !important;
  column-gap: 10px !important;
  align-items: start !important;
  min-height: 0 !important;
  padding: 12px 14px !important;
  border: 1px solid #e6ebf2 !important;
  border-radius: 12px !important;
  background: #f9fbfd !important;
  backdrop-filter: none !important;
}

.note-page--redesign #section-validation > .note-form-card:last-child .compliance-card--refonte {
  grid-template-columns: minmax(0, 1fr) auto !important;
  column-gap: 12px !important;
  align-items: center !important;
  padding: 13px 14px !important;
  border-radius: 14px !important;
  border: 1px solid #e3e9f1 !important;
  background: #ffffff !important;
}

.note-page--redesign #section-validation > .note-form-card:last-child .compliance-card--refonte .compliance-card__body {
  min-width: 0 !important;
}

.note-page--redesign #section-validation > .note-form-card:last-child .compliance-card--refonte .compliance-card__body strong {
  font-size: 16px !important;
  font-weight: 620 !important;
  line-height: 1.3;
}

.note-page--redesign #section-validation > .note-form-card:last-child .compliance-card--refonte .compliance-card__body small {
  margin-top: 3px;
  color: #7b8798 !important;
  font-size: 13px !important;
  line-height: 1.4;
}

.note-page--redesign #section-validation > .note-form-card:last-child .compliance-card--refonte .compliance-card__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.note-page--redesign #section-validation > .note-form-card:last-child .compliance-card--refonte .note-assets-link {
  min-height: 36px;
  padding: 0 14px !important;
  border-radius: 10px !important;
  border-color: #d0d8e3 !important;
  color: #1f2937 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none;
}

.note-page--redesign #section-validation > .note-form-card:last-child .compliance-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #e3e8ef;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.note-page--redesign #section-validation > .note-form-card:last-child .compliance-status-chip--ok {
  border-color: #cde7d8;
  background: #f0fdf4;
  color: #166534;
}

.note-page--redesign #section-validation > .note-form-card:last-child .compliance-status-chip--warn {
  border-color: #f3e0bf;
  background: #fffbeb;
  color: #92400e;
}

.note-page--redesign #section-validation > .note-form-card:last-child .compliance-card input {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  accent-color: #9f3426;
}

.note-page--redesign #section-validation > .note-form-card:last-child .compliance-card__body {
  min-width: 0 !important;
}

.note-page--redesign #section-validation > .note-form-card:last-child .compliance-card__body strong,
.note-page--redesign #section-validation > .note-form-card:last-child .compliance-card__body small {
  display: block !important;
}

.note-page--redesign #section-validation > .note-form-card:last-child .compliance-card__body strong {
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.3;
}

.note-page--redesign #section-validation > .note-form-card:last-child .compliance-card__body small {
  margin-top: 2px;
  font-size: 13px !important;
  line-height: 1.4;
  color: #7b8798 !important;
}

.note-page--redesign #section-validation > .note-form-card:last-child .note-assets-links {
  gap: 10px;
}

.note-page--redesign #section-validation > .note-form-card:last-child .single-upload-wrap {
  width: 100%;
  margin-top: 16px !important;
}

.note-page--redesign #section-validation > .note-form-card:last-child .upload-zone--single {
  min-height: 118px !important;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  border-style: dashed !important;
}

.note-page--redesign #section-validation > .note-form-card:last-child .upload-zone__plus {
  font-size: 24px !important;
  line-height: 1 !important;
  font-weight: 600 !important;
  color: #111827 !important;
  margin: 2px 0 6px !important;
}

.note-page--redesign #section-validation > .note-form-card:last-child .upload-zone--single p {
  font-size: 13px !important;
  max-width: 460px !important;
}

@media (max-width: 980px) {
  .note-page--redesign #section-validation > .note-form-card:last-child .compliance-card--refonte {
    grid-template-columns: 1fr !important;
    align-items: start !important;
  }

  .note-page--redesign #section-validation > .note-form-card:last-child .compliance-card--refonte .compliance-card__actions {
    justify-content: flex-start;
    width: 100%;
  }
}
.note-page--redesign .note-footer--modern {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  margin: 20px 24px 0 !important;
  padding: 12px 16px !important;
  border: 1px solid #efcfc8 !important;
  border-radius: 24px !important;
  background: #fff8f6 !important;
  box-shadow: none !important;
}
.note-page--redesign .note-footer-totals {
  display: grid !important;
  grid-auto-flow: column !important;
  justify-content: start !important;
  column-gap: 8px !important;
  row-gap: 6px !important;
  font-size: 14px !important;
  align-items: center !important;
}

.note-page--redesign .note-footer-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 36px;
  padding: 0 12px !important;
  border: 1px solid #efd5cf !important;
  border-radius: 999px !important;
  background: #fffdfd !important;
  color: #1f2937 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

.note-page--redesign .note-footer-item[hidden] {
  display: none !important;
}

.note-page--redesign .note-footer-total-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 36px;
  padding: 0 14px !important;
  border-radius: 999px !important;
  background: #111827 !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
}

.note-page--redesign .note-footer-total-badge .footer-total {
  color: inherit !important;
}

.note-page--redesign .total-signature-card {
  padding: 18px !important;
}

.note-page--redesign .total-signature-card .section-heading {
  margin-bottom: 10px !important;
}

.note-page--redesign .total-signature-card .section-heading h2 {
  font-size: 18px !important;
  line-height: 1.18 !important;
  font-weight: 600 !important;
}

.note-page--redesign .total-signature-card .section-heading p {
  font-size: 14px !important;
  color: #667085 !important;
}

.note-page--redesign .total-signature-card .total-card {
  border-left: 0 !important;
  border: 1px solid #e6ebf2 !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  padding: 12px !important;
  gap: 10px !important;
  grid-template-columns: minmax(0, 1fr) 246px !important;
}

.note-page--redesign .total-signature-card .total-breakdown {
  display: grid;
  gap: 8px;
  align-content: start;
}

.note-page--redesign .total-signature-card .total-breakdown__item {
  padding: 8px 10px !important;
  border-radius: 10px !important;
  border: 1px solid #edf1f5 !important;
  background: #f9fbfc !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  column-gap: 12px !important;
}

.note-page--redesign .total-signature-card .total-breakdown__label {
  font-size: 13px !important;
  color: #4b5563 !important;
  font-weight: 550 !important;
}

.note-page--redesign .total-signature-card .total-breakdown__amount {
  font-size: 14px !important;
  color: #111827 !important;
  font-weight: 620 !important;
}

.note-page--redesign .total-signature-card .total-breakdown__item--empty {
  opacity: 0.85;
}

.note-page--redesign .total-signature-card .total-box--focus {
  border-width: 1px !important;
  border-color: #d6dde7 !important;
  border-radius: 12px !important;
  padding: 12px !important;
  display: grid;
  align-content: center;
  gap: 4px;
  background: #f9fbfd !important;
}

.note-page--redesign .total-signature-card .total-box .label {
  font-size: 11px !important;
  letter-spacing: 0.08em !important;
  margin-bottom: 0 !important;
}

.note-page--redesign .total-signature-card .total-box .amount {
  font-size: clamp(28px, 3.9vw, 36px) !important;
  line-height: 1.08 !important;
  font-weight: 600 !important;
  color: #9f3426 !important;
}

.note-page--redesign .total-signature-card .total-signature-meta {
  margin-top: 10px !important;
}

.note-page--redesign .total-signature-card .total-signature-sign {
  margin-top: 10px !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 238px;
  gap: 12px;
  align-items: start;
}

.note-page--redesign .total-signature-card .signature-area {
  border: 1px solid #dbe1ea !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  width: 100%;
  max-width: none;
  padding: 8px;
}

.note-page--redesign .total-signature-card #signature-canvas {
  height: 160px !important;
  border-radius: 10px;
}

.note-page--redesign .total-signature-card .signature-instructions {
  font-size: 12px !important;
  color: #8692a4 !important;
  inset: 8px;
  border-radius: 10px;
}

.note-page--redesign .total-signature-card .signature-actions {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  justify-content: flex-start;
  align-self: start;
  width: 238px;
}


.note-page--redesign .total-signature-card .total-signature-import-btn {
  min-height: 36px !important;
  min-width: 0;
  width: 100%;
  padding: 0 12px !important;
  border-radius: 999px !important;
  border-color: #cbd5e1 !important;
  color: #344054 !important;
  background: #ffffff !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}
.note-page--redesign .total-signature-card .total-signature-import-btn:hover {
  background: #f8fafc !important;
}
.note-page--redesign .total-signature-card .signature-file-help {
  display: block;
  font-size: 10px;
  line-height: 1.3;
  color: #98a2b3;
  text-align: center;
}
.note-page--redesign .total-signature-card .total-signature-clear-btn {
  min-height: 36px !important;
  min-width: 0;
  width: 100%;
  padding: 0 12px !important;
  border-radius: 999px !important;
  border-color: #e2e8f0 !important;
  color: #667085 !important;
  background: #f8fafc !important;
  font-size: 13px !important;
  font-weight: 560 !important;
  box-shadow: none !important;
}

.note-page--redesign .total-signature-card .total-signature-clear-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.note-page--redesign .total-signature-card .total-signature-clear-btn:hover {
  background: #f1f5f9 !important;
}

.note-page--redesign .total-signature-card .signature-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  width: 100%;
  padding: 0 10px;
  font-size: 12px;
  color: #667085;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  white-space: nowrap;
}

.note-page--redesign .total-signature-card .total-signature-cert {
  margin-top: 10px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  border: 1px solid #e6ebf2 !important;
  background: #f9fbfd !important;
  grid-template-columns: 20px 1fr !important;
  column-gap: 10px !important;
  align-items: start !important;
  display: grid !important;
  width: 100% !important;
  max-width: none !important;
}

.note-page--redesign .total-signature-card .total-signature-cert input {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  accent-color: #9f3426;
}

.note-page--redesign .total-signature-card .total-signature-cert span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.note-page--redesign .total-signature-card .total-signature-cert input:checked + span strong {
  color: #9f3426 !important;
}

.note-page--redesign .total-signature-card .total-signature-cert strong {
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.28;
}

.note-page--redesign .total-signature-card .total-signature-cert small {
  margin-top: 2px;
  color: #7b8798 !important;
  font-size: 13px !important;
  line-height: 1.4;
}

@media (max-width: 980px) {
  .note-page--redesign .total-signature-card {
    padding: 15px !important;
  }

  .note-page--redesign .total-signature-card .total-card {
    grid-template-columns: 1fr !important;
  }

  .note-page--redesign .total-signature-card .total-box .amount {
    font-size: 31px !important;
  }

  .note-page--redesign .total-signature-card .total-signature-sign {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .note-page--redesign .total-signature-card .signature-area {
    max-width: 100%;
  }

  .note-page--redesign .total-signature-card .signature-actions {
    width: 100%;
    align-items: stretch;
    align-self: start;
  }

  .note-page--redesign .total-signature-card .total-signature-clear-btn {
    width: 100% !important;
  }
}
.note-page--redesign .button-group {
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 10px !important;
}
.note-page--redesign .note-footer--modern .button-group .button-primary,
.note-page--redesign .note-footer--modern .button-group .button-outlined {
  min-width: 208px !important;
  width: auto !important;
  min-height: 40px !important;
  padding-inline: 14px !important;
  border-radius: 12px !important;
  font-size: 12px !important;
  font-weight: 620 !important;
  letter-spacing: 0.01em;
  justify-content: center !important;
  box-shadow: none !important;
}

.note-page--redesign .note-footer--modern .button-group .button-outlined {
  border-color: #d9dfe8 !important;
  background: #ffffff !important;
  color: #1f2937 !important;
}

.note-page--redesign .note-footer--modern .button-group .button-primary {
  background: linear-gradient(180deg, #c98679 0%, #bf7a6d 100%) !important;
  border-color: #bf7a6d !important;
}

.note-page--redesign .note-footer--modern .button-group .button-primary:hover,
.note-page--redesign .note-footer--modern .button-group .button-outlined:hover {
  transform: translateY(-1px);
}

@media (max-width: 980px) {
  .note-page--redesign .note-footer--modern {
    border-radius: 18px !important;
  }

  .note-page--redesign .note-footer-totals {
    grid-auto-flow: row !important;
  }

  .note-page--redesign .note-footer--modern .button-group .button-primary,
  .note-page--redesign .note-footer--modern .button-group .button-outlined {
    min-width: 0 !important;
    width: 100% !important;
  }
}
.note-page--redesign .footer-note-band--bottom {
  margin: 0 24px 120px !important;
  min-height: 72px !important;
  display: flex !important;
  align-items: center !important;
  background: #f8fafc !important;
  border-radius: 16px !important;
}
html {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
html:hover {
  scrollbar-color: rgba(148, 163, 184, 0.72) transparent;
}
body::-webkit-scrollbar {
  width: 10px;
}
body::-webkit-scrollbar-track {
  background: transparent;
}
body::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
}
body:hover::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.72);
}

/* Note detail pages (user + admin) */
.notes-page.user-notes-page,
.notes-page.admin-notes-page {
  padding: 4px 8px 20px;
  --nd-surface: #ffffff;
  --nd-surface-soft: #f8fafc;
  --nd-border: #e7edf4;
  --nd-border-strong: #dce4ee;
  --nd-text: #0f172a;
  --nd-text-soft: #5f6f84;
  --nd-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.notes-page.user-notes-page .notes-header,
.notes-page.admin-notes-page .notes-header {
  margin-bottom: 12px;
  padding: 0 2px;
  align-items: center;
  gap: 12px;
}

.notes-page.user-notes-page .notes-header h1,
.notes-page.admin-notes-page .notes-header h1 {
  margin: 0 0 5px;
  font-size: clamp(27px, 2.6vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 570;
  color: var(--nd-text);
}

.notes-page.user-notes-page .notes-header .notes-count,
.notes-page.admin-notes-page .notes-header .notes-count {
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--nd-border);
  border-radius: 999px;
  background: var(--nd-surface-soft);
  color: var(--nd-text-soft);
  font-size: 12px;
  font-weight: 580;
}

.notes-page.user-notes-page .notes-header .button,
.notes-page.admin-notes-page .notes-header .button {
  min-height: 35px;
  padding-inline: 13px;
  border-radius: 9px;
  border-color: var(--nd-border-strong);
  color: #243246;
  background: #fff;
  font-size: 13px;
  font-weight: 570;
}

.notes-page.user-notes-page .table-card,
.notes-page.user-notes-page .filter-card,
.notes-page.admin-notes-page .table-card,
.notes-page.admin-notes-page .filter-card {
  margin: 0 2px 10px;
  padding: 13px;
  border-radius: 14px;
  border: 1px solid var(--nd-border);
  background: var(--nd-surface);
  box-shadow: var(--nd-shadow);
}

.notes-page.user-notes-page .note-detail-card,
.notes-page.admin-notes-page .note-detail-card {
  border-radius: 14px;
  border: 1px solid var(--nd-border);
  box-shadow: var(--nd-shadow);
}

.notes-page.user-notes-page .note-detail-stack h2,
.notes-page.admin-notes-page .note-detail-stack h2 {
  margin: 0 0 10px;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.14;
  font-weight: 560;
  color: var(--nd-text);
}

.notes-page.user-notes-page .note-detail-summary,
.notes-page.admin-notes-page .note-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.notes-page.user-notes-page .note-detail-summary .note-detail-metric,
.notes-page.admin-notes-page .note-detail-summary .note-detail-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-height: 74px;
  padding: 10px 11px;
  border: 1px solid var(--nd-border);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
}

.notes-page.user-notes-page .note-detail-info-grid,
.notes-page.admin-notes-page .note-detail-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 28px;
}

.notes-page.user-notes-page .note-detail-info-grid .note-detail-metric,
.notes-page.admin-notes-page .note-detail-info-grid .note-detail-metric {
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 8px;
  align-items: baseline;
}

.notes-page.user-notes-page .note-detail-metric,
.notes-page.admin-notes-page .note-detail-metric {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: baseline;
  column-gap: 10px;
  row-gap: 1px;
  min-width: 0;
}

.notes-page.user-notes-page .note-detail-label,
.notes-page.admin-notes-page .note-detail-label {
  font-size: 12px;
  line-height: 1.35;
  color: var(--nd-text-soft);
  font-weight: 570;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.notes-page.user-notes-page .note-detail-value,
.notes-page.admin-notes-page .note-detail-value {
  font-size: 14px;
  line-height: 1.4;
  color: var(--nd-text);
  font-weight: 540;
}

.notes-page.user-notes-page .note-detail-info-grid .note-detail-label,
.notes-page.admin-notes-page .note-detail-info-grid .note-detail-label {
  white-space: nowrap;
}

.notes-page.user-notes-page .note-detail-info-grid .note-detail-value,
.notes-page.admin-notes-page .note-detail-info-grid .note-detail-value {
  min-width: 0;
}

.notes-page.user-notes-page .note-detail-summary .note-detail-label,
.notes-page.admin-notes-page .note-detail-summary .note-detail-label {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 999px;
  background: #edf3f9;
  border: 1px solid #e2e9f2;
}

.notes-page.user-notes-page .note-detail-summary .note-detail-value,
.notes-page.admin-notes-page .note-detail-summary .note-detail-value {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f6f9fc;
  border: 1px solid #e6edf5;
}

.notes-page.user-notes-page .note-detail-summary .badge,
.notes-page.admin-notes-page .note-detail-summary .badge {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
}

.notes-page.user-notes-page .notes-table,
.notes-page.admin-notes-page .notes-table {
  border: 1px solid var(--nd-border);
  border-radius: 12px;
  overflow: hidden;
}

.notes-page.user-notes-page .note-detail-totals-table,
.notes-page.admin-notes-page .note-detail-totals-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.notes-page.user-notes-page .note-detail-totals-table th,
.notes-page.user-notes-page .note-detail-totals-table td,
.notes-page.admin-notes-page .note-detail-totals-table th,
.notes-page.admin-notes-page .note-detail-totals-table td {
  text-align: left;
  vertical-align: top;
}

.notes-page.user-notes-page .note-detail-totals-table th:first-child,
.notes-page.user-notes-page .note-detail-totals-table td:first-child,
.notes-page.admin-notes-page .note-detail-totals-table th:first-child,
.notes-page.admin-notes-page .note-detail-totals-table td:first-child {
  width: 26%;
}

.notes-page.user-notes-page .note-detail-totals-table th:nth-child(2),
.notes-page.user-notes-page .note-detail-totals-table td:nth-child(2),
.notes-page.admin-notes-page .note-detail-totals-table th:nth-child(2),
.notes-page.admin-notes-page .note-detail-totals-table td:nth-child(2) {
  width: 16%;
  white-space: nowrap;
}

.notes-page.user-notes-page .note-detail-totals-table th:nth-child(3),
.notes-page.user-notes-page .note-detail-totals-table td:nth-child(3),
.notes-page.admin-notes-page .note-detail-totals-table th:nth-child(3),
.notes-page.admin-notes-page .note-detail-totals-table td:nth-child(3) {
  width: 58%;
  white-space: normal;
  word-break: break-word;
  line-height: 1.38;
}

.notes-page.user-notes-page .notes-table thead th,
.notes-page.admin-notes-page .notes-table thead th {
  background: #f7fafd;
  color: #607188;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.notes-page.user-notes-page .notes-table tbody td,
.notes-page.admin-notes-page .notes-table tbody td {
  padding: 12px 14px;
  border-top: 1px solid #eef2f7;
  color: #1f2a3a;
}

.notes-page.user-notes-page .note-detail-digipost-metric,
.notes-page.admin-notes-page .note-detail-digipost-metric {
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  padding: 4px 0 2px;
}

.notes-page.user-notes-page .note-detail-digipost-metric .badge,
.notes-page.admin-notes-page .note-detail-digipost-metric .badge {
  width: 100%;
  justify-content: flex-start;
}

.notes-page.user-notes-page .note-detail-digipost-summary,
.notes-page.admin-notes-page .note-detail-digipost-summary {
  margin-top: 6px;
  color: #2f3b4d;
}

.notes-page.user-notes-page .note-detail-empty,
.notes-page.admin-notes-page .note-detail-empty {
  margin: 0;
  padding: 10px 11px;
  border: 1px dashed #d7e1ec;
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--nd-text-soft);
}

.notes-page.user-notes-page .note-detail-signature,
.notes-page.admin-notes-page .note-detail-signature {
  display: block;
  width: 100%;
  max-width: 760px;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid var(--nd-border-strong);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 10px;
}

.notes-page.user-notes-page .note-detail-files,
.notes-page.admin-notes-page .note-detail-files {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.notes-page.user-notes-page .note-detail-files-header,
.notes-page.admin-notes-page .note-detail-files-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.notes-page.user-notes-page .note-detail-files-header h2,
.notes-page.admin-notes-page .note-detail-files-header h2 {
  margin: 0;
}

.notes-page.user-notes-page .note-detail-section-copy,
.notes-page.admin-notes-page .note-detail-section-copy {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.notes-page.user-notes-page .note-detail-file-link,
.notes-page.admin-notes-page .note-detail-file-link {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border-color: var(--nd-border-strong);
  background: #f8fbff;
  padding: 7px 11px;
  text-decoration: none;
}

.notes-page.user-notes-page .note-detail-file-link:hover,
.notes-page.admin-notes-page .note-detail-file-link:hover {
  background: #f1f6fc;
  border-color: #cfdae8;
}

.notes-page.user-notes-page .note-detail-file-link span,
.notes-page.admin-notes-page .note-detail-file-link span {
  color: #5f7087;
  font-size: 12px;
  font-weight: 580;
}

.notes-page.user-notes-page .note-detail-file-link strong,
.notes-page.admin-notes-page .note-detail-file-link strong {
  color: var(--nd-text);
  font-size: 13px;
  font-weight: 540;
}

.notes-page.admin-notes-page .note-detail-upload-card {
  width: min(100%, 260px);
  border: 1px solid #dfe7f1;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.notes-page.user-notes-page .note-detail-upload-card {
  width: 100%;
  border: 1px solid #dfe7f1;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.notes-page.admin-notes-page .note-detail-upload-preview {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f3f7fc;
}

.notes-page.user-notes-page .note-detail-upload-preview {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f3f7fc;
}

.notes-page.admin-notes-page .note-detail-upload-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notes-page.user-notes-page .note-detail-upload-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notes-page.admin-notes-page .note-detail-upload-meta {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.notes-page.user-notes-page .note-detail-upload-meta {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.notes-page.admin-notes-page .note-detail-upload-meta span {
  color: #5f7087;
  font-size: 12px;
  font-weight: 580;
}

.notes-page.user-notes-page .note-detail-upload-meta span {
  color: #5f7087;
  font-size: 12px;
  font-weight: 580;
}

.notes-page.admin-notes-page .note-detail-upload-meta strong {
  color: var(--nd-text);
  font-size: 13px;
  font-weight: 540;
  word-break: break-word;
}

.notes-page.user-notes-page .note-detail-upload-meta strong {
  color: var(--nd-text);
  font-size: 13px;
  font-weight: 540;
  word-break: break-word;
}

.notes-page.admin-notes-page .note-detail-upload-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.notes-page.user-notes-page .note-detail-upload-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.notes-page.admin-notes-page .note-detail-upload-file {
  width: min(100%, 460px);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .notes-page.user-notes-page .notes-header,
  .notes-page.admin-notes-page .notes-header {
    gap: 10px;
  }

  .notes-page.user-notes-page .notes-header .button,
  .notes-page.admin-notes-page .notes-header .button {
    width: auto;
  }

  .notes-page.user-notes-page .table-card,
  .notes-page.user-notes-page .filter-card,
  .notes-page.admin-notes-page .table-card,
  .notes-page.admin-notes-page .filter-card {
    padding: 11px;
  }

  .notes-page.user-notes-page .note-detail-files,
  .notes-page.admin-notes-page .note-detail-files {
    grid-template-columns: 1fr;
  }

  .notes-page.user-notes-page .note-detail-file-link,
  .notes-page.admin-notes-page .note-detail-file-link {
    width: 100%;
    border-radius: 12px;
  }

  .notes-page.user-notes-page .note-detail-summary,
  .notes-page.admin-notes-page .note-detail-summary,
  .notes-page.user-notes-page .note-detail-info-grid,
  .notes-page.admin-notes-page .note-detail-info-grid {
    grid-template-columns: 1fr;
  }

  .notes-page.user-notes-page .note-detail-metric,
  .notes-page.admin-notes-page .note-detail-metric {
    grid-template-columns: 1fr;
    row-gap: 1px;
  }

  .notes-page.user-notes-page .note-detail-info-grid .note-detail-metric,
  .notes-page.admin-notes-page .note-detail-info-grid .note-detail-metric {
    grid-template-columns: 1fr;
    row-gap: 2px;
  }

  .notes-page.user-notes-page .note-detail-summary .note-detail-metric,
  .notes-page.admin-notes-page .note-detail-summary .note-detail-metric {
    grid-template-columns: 1fr;
  }

  .notes-page.user-notes-page .note-detail-totals-table,
  .notes-page.admin-notes-page .note-detail-totals-table {
    table-layout: auto;
  }

  .notes-page.user-notes-page .note-detail-totals-table th,
  .notes-page.user-notes-page .note-detail-totals-table td,
  .notes-page.admin-notes-page .note-detail-totals-table th,
  .notes-page.admin-notes-page .note-detail-totals-table td {
    width: auto !important;
  }

  .notes-page.user-notes-page .note-detail-digipost-metric,
  .notes-page.admin-notes-page .note-detail-digipost-metric {
    grid-template-columns: 1fr;
    row-gap: 6px;
  }

  .notes-page.user-notes-page .note-detail-files-header,
  .notes-page.admin-notes-page .note-detail-files-header {
    flex-direction: column;
    align-items: stretch;
  }

  .notes-page.admin-notes-page .note-detail-upload-card,
  .notes-page.admin-notes-page .note-detail-upload-file {
    width: 100%;
  }

  .notes-page.user-notes-page .note-detail-upload-card {
    width: 100%;
  }
}
@media (max-width: 767px) {
  .note-page--redesign .note-sticky-header {
    padding: 10px 12px 0 !important;
  }

  .note-page--redesign .progress-steps {
    top: 0 !important;
  }

  .note-page--redesign .note-footer--modern {
    margin: 16px 12px 0 !important;
    width: auto !important;
    padding: 16px !important;
    border-radius: 18px !important;
  }
  .note-page--redesign .note-footer-totals {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .note-page--redesign .footer-note-band--bottom {
    margin: 0 14px 146px !important;
    min-height: 0 !important;
    align-items: flex-start !important;
  }
}

/* Modern builder UI (repas + hebergement) */
.expense-builder-page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 6px 14px 14px;
}

.expense-builder-page .expense-builder-page__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
}

.expense-builder-page .expense-builder-page__header-copy {
  min-width: 0;
}

.expense-builder-page .expense-builder-page__header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.expense-builder-page .builder-kpis {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 760px;
}

.expense-builder-page .builder-kpi {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
  padding: 8px 10px;
  display: grid;
  gap: 3px;
}

.expense-builder-page .builder-kpi span {
  font-size: 12px;
  color: #64748b;
}

.expense-builder-page .builder-kpi strong {
  font-size: 15px;
  color: #111827;
}

.expense-builder-page .expense-builder-card {
  margin: 0 0 10px;
  padding: 14px;
  border-radius: 16px;
}

.expense-builder-page .expense-builder-card .section-heading {
  margin-bottom: 10px;
}

.expense-builder-page .expense-builder-form .form-grid {
  gap: 9px;
}

.expense-builder-page .builder-preview {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.expense-builder-page .builder-preview > div {
  border: 1px solid #e6eaf0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 8px 10px;
  display: grid;
  gap: 3px;
}
.expense-builder-page .field-shell input,
.expense-builder-page .field-shell select,
.expense-builder-page .field-shell textarea {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.expense-builder-page .field-shell input:focus,
.expense-builder-page .field-shell select:focus,
.expense-builder-page .field-shell textarea:focus {
  border-color: #c84a39;
  box-shadow: 0 0 0 3px rgba(200, 74, 57, 0.14);
  background: #ffffff;
}

.expense-builder-page .builder-feedback,
.expense-builder-page .builder-error {
  margin: 6px 0 0;
  min-height: 18px;
  font-size: 13px;
}

.expense-builder-page .builder-feedback {
  color: #0f766e;
}

.expense-builder-page .builder-error {
  color: #b91c1c;
}
.expense-builder-page .builder-feedback:not(:empty) {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #99f6e4;
  background: #ecfeff;
}
.expense-builder-page .builder-error:not(:empty) {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fff1f2;
}

.expense-builder-page .builder-row-actions {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.expense-builder-page .expense-builder-card--list .button-group {
  margin-top: 8px;
  justify-content: flex-start;
}

.expense-builder-page .summary-table td {
  vertical-align: middle;
.expense-builder-page .summary-table thead th {
  background: #f8fafc;
}
.expense-builder-page .summary-table tbody tr:nth-child(even) td {
  background: #fcfcfd;
}
.expense-builder-page .button-small {
  min-height: 34px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 650;
}
}

@media (max-width: 980px) {
  .expense-builder-page {
    padding: 4px 10px 10px;
  }
  .expense-builder-page .expense-builder-page__header {
    grid-template-columns: 1fr;
  }

  .expense-builder-page .expense-builder-page__header-actions {
    justify-content: flex-start;
  }

  .expense-builder-page .builder-kpis,
  .expense-builder-page .builder-preview {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .expense-builder-page .expense-builder-card:hover {
    transform: none;
  }
}

/* Builder v2 redesign aligned with Nouvelle note */
.expense-builder-page--v2 {
  --builder-surface: #ffffff;
  --builder-surface-soft: #f8fafd;
  --builder-border: #e5eaf1;
  --builder-border-strong: #d9e1eb;
  --builder-text: #111827;
  --builder-text-soft: #5f6f83;
  --builder-accent: #a63a2b;
  --builder-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px 20px 18px;
}

.expense-builder-page--v2::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background:
    radial-gradient(780px 280px at -10% -8%, rgba(166, 58, 43, 0.08), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(251, 253, 255, 0.95) 100%);
  pointer-events: none;
}

.expense-builder-page--v2 .expense-builder-hero,
.expense-builder-page--v2 .expense-builder-card {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin-inline: auto;
}

.expense-builder-page--v2 .expense-builder-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
  padding: 18px 20px;
  border: 1px solid var(--builder-border);
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff 0%, #fffaf7 78%, #fff5f1 100%);
  box-shadow: var(--builder-shadow);
}

.expense-builder-page--v2 .expense-builder-hero__main {
  min-width: 0;
}

.expense-builder-page--v2 .expense-builder-hero .header-band__eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fdf0ed;
  border: 1px solid #f5d6d0;
  letter-spacing: 0.06em;
  font-weight: 620;
  font-size: 11px;
  color: #8d3023;
  text-transform: uppercase;
}

.expense-builder-page--v2 .expense-builder-hero h1 {
  margin: 6px 0 6px;
  font-size: clamp(20px, 1.9vw, 24px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--builder-text);
}

.expense-builder-page--v2 .expense-builder-hero p {
  margin: 0;
  max-width: 76ch;
  color: var(--builder-text-soft);
  font-size: 14px;
  line-height: 1.5;
}

.expense-builder-page--v2 .expense-builder-hero__actions {
  display: flex;
  justify-content: flex-end;
}

.expense-builder-page--v2 .expense-builder-hero__actions .button-outlined {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 14px;
  border-color: var(--builder-border-strong);
  background: #ffffff;
  color: #253247;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.expense-builder-page--v2 .builder-kpis {
  grid-column: 1 / -1;
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.expense-builder-page--v2 .builder-kpi {
  padding: 11px 13px;
  border: 1px solid #eadfdc;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.93);
  display: grid;
  gap: 2px;
}

.expense-builder-page--v2 .builder-kpi span {
  display: block;
  color: #6a788c;
  font-size: 12px;
  font-weight: 560;
  line-height: 1.3;
}

.expense-builder-page--v2 .builder-kpi strong {
  color: var(--builder-text);
  /* font-size: clamp(20px, 1.8vw, 24px); */
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.expense-builder-page--v2 .expense-builder-shell {
  display: block;
  margin-bottom: 10px;
}

.expense-builder-page--v2 .expense-builder-card {
  margin: 0;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--builder-border);
  background: var(--builder-surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
}

.expense-builder-page--v2 .expense-builder-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.72) 50%, rgba(255, 255, 255, 0) 100%);
}

.expense-builder-page--v2 .expense-builder-card .section-heading {
  margin-bottom: 12px;
}

.expense-builder-page--v2 .expense-builder-card .section-heading h2 {
  margin-bottom: 4px;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: #1b2434;
}

.expense-builder-page--v2 .expense-builder-card .section-heading h2::after {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #c0392b 0%, rgba(192, 57, 43, 0.18) 100%);
}

.expense-builder-page--v2 .expense-builder-card .section-heading p {
  color: #677488;
  font-size: 14px;
  line-height: 1.5;
}

.expense-builder-page--v2 .expense-builder-form .form-grid {
  gap: 12px;
}

.expense-builder-page--v2 .field-shell > span {
  font-weight: 600;
  color: #1f2937;
  font-size: 13px;
}

.expense-builder-page--v2 .field-shell input,
.expense-builder-page--v2 .field-shell select,
.expense-builder-page--v2 .field-shell textarea {
  border-color: #d5dce5;
  background: #fcfdff;
  min-height: 44px;
}

.expense-builder-page--v2 .field-shell input:focus,
.expense-builder-page--v2 .field-shell select:focus,
.expense-builder-page--v2 .field-shell textarea:focus {
  border-color: var(--builder-accent);
  box-shadow: 0 0 0 3px rgba(166, 58, 43, 0.14);
  background: #ffffff;
}

.expense-builder-page--v2 .builder-preview {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.expense-builder-page--v2 .builder-preview > div {
  border: 1px solid #e3e9f2;
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9fd 100%);
  display: grid;
  gap: 3px;
}

.expense-builder-page--v2 .builder-preview > div span {
  font-size: 12px;
  color: #6b7789;
  font-weight: 560;
}

.expense-builder-page--v2 .builder-preview > div strong {
  /* font-size: clamp(20px, 1.8vw, 24px); */
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #131d2d;
  font-weight: 600;
}

.expense-builder-page--v2 .builder-feedback,
.expense-builder-page--v2 .builder-error {
  margin: 7px 0 0;
  min-height: 18px;
  font-size: 13px;
}

.expense-builder-page--v2 .builder-feedback {
  color: #0f766e;
}

.expense-builder-page--v2 .builder-error {
  color: #b91c1c;
}

.expense-builder-page--v2 .builder-feedback:not(:empty) {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #9de9dc;
  background: #ecfeff;
}

.expense-builder-page--v2 .builder-error:not(:empty) {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fff1f2;
}

.expense-builder-page--v2 .expense-builder-card--aside {
  display: none !important;
}

.expense-builder-page--v2 .expense-builder-card--list {
  margin-top: 0;
}

.expense-builder-page--v2 .expense-builder-table-wrap {
  border: 1px solid #e7ecf4;
  border-radius: 14px;
  overflow: auto;
  background: #ffffff;
}

.expense-builder-page--v2 .summary-table {
  min-width: 960px;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 16px;
  overflow: hidden;
}

.expense-builder-page--v2 .summary-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7fafe;
  color: #818c9e;
  font-size: 11px;
  font-weight: 560;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 12px 14px;
  border-bottom: 1px solid #e8edf4;
}

.expense-builder-page--v2 .summary-table td {
  font-size: 13px;
  line-height: 1.42;
  color: #1f2b3d;
  padding: 12px 14px;
  border-bottom: 1px solid #f0f4f8;
}

.expense-builder-page--v2 .summary-table tbody tr:hover td {
  background: #fbfdff;
}

.expense-builder-page--v2 .summary-table tbody tr:last-child td {
  border-bottom: 0;
}

.expense-builder-page--v2 .summary-table tbody td[colspan] {
  /* text-align: center; */
  color: #5d6b7f;
  padding: 14px 12px;
}

.expense-builder-page--v2 .builder-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.expense-builder-page--v2 .builder-row-actions .button-outlined {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 560;
}

.expense-builder-page--v2 .button-group {
  margin-top: 12px;
  align-items: center;
  gap: 10px;
}

.expense-builder-page--v2 .button-group .button-primary {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 14px;
  background: linear-gradient(145deg, #b44131, #9c3124);
  border-color: #9c3124;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.expense-builder-page--v2 .button-group .button-outlined {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 14px;
  border-color: #d5dde8;
  color: #27364a;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.expense-builder-page--v2 .button-group .button-primary:hover {
  filter: brightness(1.03);
}

@media (max-width: 1120px) {
  .expense-builder-page--v2 .expense-builder-card .section-heading h2 {
    font-size: clamp(18px, 2.2vw, 22px);
  }

  /* .expense-builder-page--v2 .builder-kpi strong,
  .expense-builder-page--v2 .builder-preview > div strong {
    font-size: clamp(18px, 3vw, 21px);
  } */
}

@media (max-width: 900px) {
  .expense-builder-page--v2 {
    padding: 8px 10px 12px;
  }

  .expense-builder-page--v2 .expense-builder-hero {
    grid-template-columns: 1fr;
    padding: 13px;
  }

  .expense-builder-page--v2 .expense-builder-hero__actions {
    justify-content: flex-start;
  }

  .expense-builder-page--v2 .builder-kpis,
  .expense-builder-page--v2 .builder-preview {
    grid-template-columns: 1fr;
  }

  .expense-builder-page--v2 .expense-builder-card {
    padding: 14px;
  }

  .expense-builder-page--v2 .expense-builder-card .section-heading h2 {
    font-size: clamp(17px, 4.7vw, 21px);
  }

  .expense-builder-page--v2 .summary-table {
    min-width: 760px;
  }
}
@media (max-width: 767px) {
  .note-page--redesign #section-transport .transport-item {
    padding: 14px 14px 13px !important;
  }
  .note-page--redesign #section-transport .transport-item__head {
    gap: 8px;
  }
  .note-page--redesign #section-transport .transport-item__head span {
    width: 100%;
  }
  .note-page--redesign .expense-summary-card__actions .button-outlined,
  .note-page--redesign .button-group--left .button-primary,
  .note-page--redesign .button-group--left .button-outlined,
  .expense-builder-page--v2 .button-group .button-primary,
  .expense-builder-page--v2 .button-group .button-outlined,
  .km-actions .button-outlined,
  .km-actions .button-outlined-red,
  .total-signature-card .signature-actions .button-outlined {
    width: 100%;
  }
  .km-inline {
    grid-template-columns: 1fr;
  }
  .km-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .note-page--redesign .total-signature-card .total-signature-sign {
    grid-template-columns: 1fr;
  }
  .note-page--redesign .total-signature-card .signature-actions {
    width: auto;
  }
  .expense-builder-page--v2 .button-group,
  .note-page--redesign .button-group--left {
    flex-direction: column;
    align-items: stretch;
  }
  .expense-builder-page--v2 .expense-builder-table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }
  .expense-builder-page--v2 .summary-table {
    min-width: 100%;
    width: 100%;
  }
  .expense-builder-page--v2 .summary-table thead {
    display: none;
  }
  .expense-builder-page--v2 .summary-table tbody,
  .expense-builder-page--v2 .summary-table tr,
  .expense-builder-page--v2 .summary-table td {
    display: block;
    width: 100%;
  }
  .expense-builder-page--v2 .summary-table tbody tr {
    margin-bottom: 12px;
    border: 1px solid #e7ecf4;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  }
  .expense-builder-page--v2 .summary-table td {
    display: grid;
    grid-template-columns: minmax(92px, 108px) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 11px 12px;
    border-bottom: 1px solid #eef2f7;
    white-space: normal;
  }
  .expense-builder-page--v2 .summary-table td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #7b8798;
  }
  .expense-builder-page--v2 .summary-table td:last-child {
    border-bottom: 0;
  }
  .expense-builder-page--v2 .builder-row-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .expense-builder-page--v2 .builder-row-actions .button-outlined {
    width: 100%;
  }
}

/* Submit button motion feedback on shared new-note page (user + admin). */
.note-page--redesign .note-footer--modern .button-group .button-primary {
  transition: none !important;
  box-shadow: none !important;
  background: #d7dde7 !important;
  border-color: #d0d7e2 !important;
  color: #7b8798 !important;
}

.note-page--redesign .note-footer--modern .button-group .button-primary.is-ready {
  background: rgb(192, 57, 43) !important;
  border-color: rgb(192, 57, 43) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

@media (max-width: 767px) {
  body.role-utilisateur .main-content {
    padding-top: 76px !important;
    padding-left: 10px;
    padding-right: 10px;
  }
  body.role-utilisateur .main-content .page-inner {
    padding-top: 10px !important;
  }
  body.role-utilisateur .table-responsive {
    overflow-x: clip;
  }
  body.role-utilisateur .table-responsive .data-table,
  body.role-utilisateur .table-responsive .notes-table,
  body.role-utilisateur .table-responsive .table {
    min-width: 0 !important;
    width: 100% !important;
    table-layout: fixed;
  }
  body.role-utilisateur .data-table td,
  body.role-utilisateur .notes-table td,
  body.role-utilisateur .table td {
    align-items: flex-start;
    gap: 10px;
  }
  body.role-utilisateur .data-table td::before,
  body.role-utilisateur .notes-table td::before,
  body.role-utilisateur .table td::before {
    min-width: 92px;
    max-width: 46%;
  }
  body.role-utilisateur .data-table td > :not(.badge):not(.status-badge),
  body.role-utilisateur .notes-table td > :not(.badge):not(.status-badge),
  body.role-utilisateur .table td > :not(.badge):not(.status-badge) {
    min-width: 0;
    max-width: calc(100% - 102px);
    overflow-wrap: anywhere;
    text-align: right;
  }
  body.role-utilisateur .data-table td[data-label="#ID"],
  body.role-utilisateur .notes-table td[data-label="#ID"],
  body.role-utilisateur .notes-page td[data-label="#ID"],
  body.role-utilisateur .user-home-page td[data-label="#ID"],
  body.role-utilisateur .user-notes-page td[data-label="#ID"] {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
  }
  body.role-utilisateur .data-table td[data-label="#ID"]::before,
  body.role-utilisateur .notes-table td[data-label="#ID"]::before,
  body.role-utilisateur .notes-page td[data-label="#ID"]::before,
  body.role-utilisateur .user-home-page td[data-label="#ID"]::before,
  body.role-utilisateur .user-notes-page td[data-label="#ID"]::before {
    margin-right: 0;
    min-width: 86px;
    max-width: 86px;
  }
  body.role-utilisateur .data-table td[data-label="#ID"] > a,
  body.role-utilisateur .notes-table td[data-label="#ID"] > a,
  body.role-utilisateur .notes-page td[data-label="#ID"] > a,
  body.role-utilisateur .user-home-page td[data-label="#ID"] > a,
  body.role-utilisateur .user-notes-page td[data-label="#ID"] > a {
    max-width: 100% !important;
    white-space: nowrap;
    overflow-wrap: normal !important;
    word-break: normal;
    text-align: left !important;
    margin-left: 0 !important;
    align-self: center;
    font-weight: 700;
    letter-spacing: 0.02em;
  }
  body.role-utilisateur .notes-page td[data-label="STATUT"] .badge,
  body.role-utilisateur .notes-page td[data-label="ETAT"] .badge,
  body.role-utilisateur .notes-page td[data-label="Statut"] .badge,
  body.role-utilisateur .notes-page td[data-label="Etat"] .badge,
  body.role-utilisateur .data-table td[data-label="STATUT"] .badge,
  body.role-utilisateur .data-table td[data-label="ETAT"] .badge,
  body.role-utilisateur .data-table td[data-label="Statut"] .badge,
  body.role-utilisateur .data-table td[data-label="Etat"] .badge,
  body.role-utilisateur .notes-table td[data-label="STATUT"] .badge,
  body.role-utilisateur .notes-table td[data-label="ETAT"] .badge,
  body.role-utilisateur .notes-table td[data-label="Statut"] .badge,
  body.role-utilisateur .notes-table td[data-label="Etat"] .badge,
  body.role-utilisateur .user-home-page .badge,
  body.role-utilisateur .user-notes-page .badge,
  body.role-utilisateur .status-badge {
    width: fit-content !important;
    min-width: 0 !important;
    max-width: fit-content !important;
    display: inline-flex;
    flex: 0 0 auto;
    align-self: center;
    justify-content: flex-start;
    margin-left: auto;
  }
  body.role-utilisateur .notes-page td[data-label="STATUT"],
  body.role-utilisateur .notes-page td[data-label="ETAT"],
  body.role-utilisateur .notes-page td[data-label="Statut"],
  body.role-utilisateur .notes-page td[data-label="Etat"] {
    justify-content: space-between;
    align-items: center;
  }
  body.role-utilisateur .notes-page td[data-label="STATUT"] > .badge,
  body.role-utilisateur .notes-page td[data-label="ETAT"] > .badge,
  body.role-utilisateur .notes-page td[data-label="Statut"] > .badge,
  body.role-utilisateur .notes-page td[data-label="Etat"] > .badge {
    margin-left: auto;
  }
  body.role-utilisateur .notes-page td[data-label="ACTION"] .button,
  body.role-utilisateur .notes-page td[data-label="Action"] .button {
    width: auto;
    min-width: 0;
    max-width: 100%;
  }
  body.role-utilisateur .user-home-page td.actions-cell,
  body.role-utilisateur .user-notes-page td.actions-cell,
  body.role-utilisateur .notes-page td.actions-cell {
    display: flex !important;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    white-space: normal;
  }
  body.role-utilisateur .user-home-page td.actions-cell::before,
  body.role-utilisateur .user-notes-page td.actions-cell::before,
  body.role-utilisateur .notes-page td.actions-cell::before {
    margin-right: auto;
  }
  body.role-utilisateur .user-home-page td.actions-cell > *,
  body.role-utilisateur .user-notes-page td.actions-cell > *,
  body.role-utilisateur .notes-page td.actions-cell > * {
    max-width: none;
    margin-left: 0 !important;
  }
}

@media (max-width: 767px) {
  body.role-utilisateur .user-home-page .data-table td,
  body.role-utilisateur .user-notes-page .data-table td,
  body.role-utilisateur .user-notes-page .notes-table td,
  body.role-utilisateur .notes-page.user-notes-page .notes-table td {
    display: grid !important;
    grid-template-columns: 112px minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
    justify-content: initial;
  }
  body.role-utilisateur .user-home-page .data-table td::before,
  body.role-utilisateur .user-notes-page .data-table td::before,
  body.role-utilisateur .user-notes-page .notes-table td::before,
  body.role-utilisateur .notes-page.user-notes-page .notes-table td::before {
    grid-column: 1;
    margin-right: 0;
    min-width: 0;
    max-width: none;
  }
  body.role-utilisateur .user-home-page .data-table td > :not(script),
  body.role-utilisateur .user-notes-page .data-table td > :not(script),
  body.role-utilisateur .user-notes-page .notes-table td > :not(script),
  body.role-utilisateur .notes-page.user-notes-page .notes-table td > :not(script) {
    grid-column: 2;
    margin-left: 0 !important;
    justify-self: start;
    text-align: left !important;
    max-width: 100% !important;
  }
  body.role-utilisateur .user-home-page .data-table td[data-label="STATUT"] .badge,
  body.role-utilisateur .user-home-page .data-table td[data-label="Statut"] .badge,
  body.role-utilisateur .user-notes-page .notes-table td[data-label="STATUT"] .badge,
  body.role-utilisateur .user-notes-page .notes-table td[data-label="Statut"] .badge,
  body.role-utilisateur .user-notes-page .notes-table td[data-label="ETAT"] .badge,
  body.role-utilisateur .user-notes-page .notes-table td[data-label="Etat"] .badge {
    width: fit-content !important;
    max-width: fit-content !important;
    justify-self: start;
  }
  body.role-utilisateur .user-home-page td.actions-cell,
  body.role-utilisateur .user-notes-page td.actions-cell {
    align-items: start;
  }
  body.role-utilisateur .user-home-page td.actions-cell > .user-home-action,
  body.role-utilisateur .user-home-page td.actions-cell > .org-icon-btn,
  body.role-utilisateur .user-notes-page td.actions-cell > .user-home-action,
  body.role-utilisateur .user-notes-page td.actions-cell > .org-icon-btn,
  body.role-utilisateur .user-notes-page td.actions-cell > .notes-action-btn {
    justify-self: start;
  }
}

@media (max-width: 767px) {
  body.role-utilisateur .user-home-page .data-table td,
  body.role-utilisateur .user-notes-page .data-table td,
  body.role-utilisateur .user-notes-page .notes-table td,
  body.role-utilisateur .notes-page.user-notes-page .notes-table td {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
  }
  body.role-utilisateur .user-home-page .data-table td::before,
  body.role-utilisateur .user-notes-page .data-table td::before,
  body.role-utilisateur .user-notes-page .notes-table td::before,
  body.role-utilisateur .notes-page.user-notes-page .notes-table td::before {
    flex: 0 0 112px;
    min-width: 112px;
    max-width: 112px;
    margin-right: 0;
    white-space: nowrap;
  }
  body.role-utilisateur .user-home-page .data-table td > :not(script),
  body.role-utilisateur .user-notes-page .data-table td > :not(script),
  body.role-utilisateur .user-notes-page .notes-table td > :not(script),
  body.role-utilisateur .notes-page.user-notes-page .notes-table td > :not(script) {
    margin-left: 0 !important;
    text-align: left !important;
    align-self: center;
  }
  body.role-utilisateur .user-home-page td.actions-cell,
  body.role-utilisateur .user-notes-page td.actions-cell {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  body.role-utilisateur .user-home-page td[data-label="STATUT"] .badge,
  body.role-utilisateur .user-home-page td[data-label="Statut"] .badge,
  body.role-utilisateur .user-notes-page td[data-label="STATUT"] .badge,
  body.role-utilisateur .user-notes-page td[data-label="Statut"] .badge,
  body.role-utilisateur .user-notes-page td[data-label="ETAT"] .badge,
  body.role-utilisateur .user-notes-page td[data-label="Etat"] .badge {
    width: fit-content !important;
    max-width: fit-content !important;
    margin-left: 0 !important;
  }
}

@media (max-width: 767px) {
  body.role-utilisateur .user-home-page .data-table td,
  body.role-utilisateur .user-notes-page .data-table td,
  body.role-utilisateur .user-notes-page .notes-table td,
  body.role-utilisateur .notes-page.user-notes-page .notes-table td {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    /* gap: 0 !important; */
  }
  body.role-utilisateur .user-home-page .data-table td::before,
  body.role-utilisateur .user-notes-page .data-table td::before,
  body.role-utilisateur .user-notes-page .notes-table td::before,
  body.role-utilisateur .notes-page.user-notes-page .notes-table td::before {
    flex: 0 0 124px !important;
    min-width: 124px !important;
    max-width: 124px !important;
    margin-right: 12px !important;
    white-space: nowrap;
    text-align: left;
  }
  body.role-utilisateur .user-home-page .data-table td > :not(script),
  body.role-utilisateur .user-notes-page .data-table td > :not(script),
  body.role-utilisateur .user-notes-page .notes-table td > :not(script),
  body.role-utilisateur .notes-page.user-notes-page .notes-table td > :not(script) {
    margin-left: 0 !important;
    text-align: left !important;
    align-self: center;
    max-width: calc(100% - 136px) !important;
  }
  body.role-utilisateur .user-home-page td[data-label="#ID"] > a,
  body.role-utilisateur .user-notes-page td[data-label="#ID"] > a,
  body.role-utilisateur .notes-page.user-notes-page td[data-label="#ID"] > a {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal !important;
    margin-left: 0 !important;
    font-weight: 700;
    letter-spacing: 0.01em;
  }
  body.role-utilisateur .user-home-page td[data-label="STATUT"] .badge,
  body.role-utilisateur .user-home-page td[data-label="Statut"] .badge,
  body.role-utilisateur .user-notes-page td[data-label="STATUT"] .badge,
  body.role-utilisateur .user-notes-page td[data-label="Statut"] .badge,
  body.role-utilisateur .user-notes-page td[data-label="ETAT"] .badge,
  body.role-utilisateur .user-notes-page td[data-label="Etat"] .badge,
  body.role-utilisateur .notes-page.user-notes-page td[data-label="STATUT"] .badge,
  body.role-utilisateur .notes-page.user-notes-page td[data-label="ETAT"] .badge {
    width: fit-content !important;
    max-width: fit-content !important;
    margin-left: 0 !important;
    justify-content: flex-start;
  }
  body.role-utilisateur .user-home-page td.actions-cell,
  body.role-utilisateur .user-notes-page td.actions-cell,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell {
    flex-wrap: nowrap !important;
    column-gap: 10px;
  }
  body.role-utilisateur .user-home-page td.actions-cell > *,
  body.role-utilisateur .user-notes-page td.actions-cell > *,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell > * {
    margin-left: 0 !important;
  }
}

@media (max-width: 767px) {
  body.role-administrateur .main-content {
    padding-top: 76px !important;
    padding-left: 10px;
    padding-right: 10px;
  }
  body.role-administrateur .main-content .page-inner {
    padding-top: 10px !important;
  }
  body.role-administrateur .notes-page .table-responsive,
  body.role-administrateur .admin-table-card .table-responsive,
  body.role-administrateur .users-table-card,
  body.role-administrateur .org-card {
    overflow-x: clip;
  }
  body.role-administrateur .notes-page .notes-table,
  body.role-administrateur .admin-dashboard-page .data-table,
  body.role-administrateur .users-table,
  body.role-administrateur .org-table {
    min-width: 0 !important;
    width: 100% !important;
    table-layout: fixed;
  }
  body.role-administrateur .notes-page.admin-notes-page .notes-table td,
  body.role-administrateur .admin-dashboard-page .data-table td,
  body.role-administrateur .users-table td,
  body.role-administrateur .org-table td {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
  }
  body.role-administrateur .notes-page.admin-notes-page .notes-table td::before,
  body.role-administrateur .admin-dashboard-page .data-table td::before,
  body.role-administrateur .users-table td::before,
  body.role-administrateur .org-table td::before {
    flex: 0 0 128px;
    min-width: 128px;
    max-width: 128px;
    margin-right: 12px;
    white-space: nowrap;
    text-align: left;
  }
  body.role-administrateur .notes-page.admin-notes-page .notes-table td > :not(script),
  body.role-administrateur .admin-dashboard-page .data-table td > :not(script),
  body.role-administrateur .users-table td > :not(script),
  body.role-administrateur .org-table td > :not(script) {
    margin-left: 0 !important;
    text-align: left !important;
    align-self: center;
    max-width: calc(100% - 140px) !important;
    overflow-wrap: anywhere;
  }
  body.role-administrateur .notes-page.admin-notes-page td[data-label="#ID"] > a,
  body.role-administrateur .admin-dashboard-page td[data-label="#ID"] > a {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal !important;
    font-weight: 700;
    letter-spacing: 0.01em;
  }
  body.role-administrateur .notes-page.admin-notes-page td[data-label="STATUT"] .badge,
  body.role-administrateur .notes-page.admin-notes-page td[data-label="ETAT"] .badge,
  body.role-administrateur .notes-page.admin-notes-page td[data-label="Statut"] .badge,
  body.role-administrateur .notes-page.admin-notes-page td[data-label="Etat"] .badge,
  body.role-administrateur .admin-dashboard-page td[data-label="STATUT"] .badge,
  body.role-administrateur .admin-dashboard-page td[data-label="Statut"] .badge {
    width: fit-content !important;
    max-width: fit-content !important;
    margin-left: 0 !important;
    justify-content: flex-start;
  }
  body.role-administrateur .notes-page.admin-notes-page td.actions-cell,
  body.role-administrateur .notes-page.admin-notes-page td[data-label="ACTIONS"],
  body.role-administrateur .users-table td[data-label="Actions"],
  body.role-administrateur .org-table td[data-label="ACTIONS"] {
    flex-wrap: wrap;
    row-gap: 8px;
    column-gap: 10px;
  }
  body.role-administrateur .notes-page.admin-notes-page td.actions-cell > *,
  body.role-administrateur .notes-page.admin-notes-page td[data-label="ACTIONS"] > *,
  body.role-administrateur .users-table td[data-label="Actions"] > *,
  body.role-administrateur .org-table td[data-label="ACTIONS"] > * {
    margin-left: 0 !important;
  }
}

@media (max-width: 767px) {
  body.role-administrateur .notes-page.admin-notes-page .notes-table td::before,
  body.role-administrateur .admin-dashboard-page .data-table td::before,
  body.role-administrateur .users-table td::before,
  body.role-administrateur .org-table td::before {
    color: #6b7280;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  body.role-administrateur .notes-page.admin-notes-page .table-card,
  body.role-administrateur .admin-table-card,
  body.role-administrateur .users-table-card,
  body.role-administrateur .org-card {
    border-radius: 20px;
    border-color: #e2e8f0;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  }
  body.role-administrateur .users-table td[data-label="Utilisateur"] .user-cell {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  body.role-administrateur .users-table td[data-label="Utilisateur"] .user-avatar {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }
  body.role-administrateur .users-table td[data-label="Statut"] .status-control {
    flex-wrap: nowrap;
    gap: 10px;
  }
  body.role-administrateur .notes-page.admin-notes-page td.actions-cell,
  body.role-administrateur .notes-page.admin-notes-page td[data-label="ACTIONS"],
  body.role-administrateur .users-table td[data-label="Actions"],
  body.role-administrateur .org-table td[data-label="ACTIONS"] {
    flex-wrap: nowrap !important;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  body.role-administrateur .notes-page.admin-notes-page td.actions-cell::-webkit-scrollbar,
  body.role-administrateur .notes-page.admin-notes-page td[data-label="ACTIONS"]::-webkit-scrollbar,
  body.role-administrateur .users-table td[data-label="Actions"]::-webkit-scrollbar,
  body.role-administrateur .org-table td[data-label="ACTIONS"]::-webkit-scrollbar {
    display: none;
  }
  body.role-administrateur .notes-page.admin-notes-page td.actions-cell > *,
  body.role-administrateur .notes-page.admin-notes-page td[data-label="ACTIONS"] > *,
  body.role-administrateur .users-table td[data-label="Actions"] > *,
  body.role-administrateur .org-table td[data-label="ACTIONS"] > * {
    flex: 0 0 auto;
  }
}

@media (max-width: 767px) {
  body.role-administrateur .notes-page.admin-notes-page td[data-label="ACTIONS"]::before,
  body.role-administrateur .users-table td[data-label="Actions"]::before,
  body.role-administrateur .org-table td[data-label="ACTIONS"]::before {
    flex: 0 0 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    margin-right: 8px !important;
  }
  body.role-administrateur .notes-page.admin-notes-page td[data-label="ACTIONS"] > *,
  body.role-administrateur .users-table td[data-label="Actions"] > *,
  body.role-administrateur .org-table td[data-label="ACTIONS"] > * {
    margin-left: 0 !important;
  }
}

@media (max-width: 767px) {
  body.role-utilisateur .notes-page.user-notes-page .table-responsive {
    overflow-x: visible;
  }
  body.role-utilisateur .notes-page.user-notes-page .note-detail-totals-table,
  body.role-utilisateur .notes-page.user-notes-page .note-detail-totals-table tbody,
  body.role-utilisateur .notes-page.user-notes-page .note-detail-totals-table tr,
  body.role-utilisateur .notes-page.user-notes-page .note-detail-totals-table td {
    display: block;
    width: 100%;
  }
  body.role-utilisateur .notes-page.user-notes-page .note-detail-totals-table thead {
    display: none;
  }
  body.role-utilisateur .notes-page.user-notes-page .note-detail-totals-table tr {
    border: 1px solid #e6ecf3;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    background: #ffffff;
  }
  body.role-utilisateur .notes-page.user-notes-page .note-detail-totals-table td {
    padding: 10px 12px;
  }
  body.role-utilisateur .notes-page.user-notes-page .note-detail-totals-table td[data-label="Montant"] {
    font-weight: 700;
    border-top: 1px solid #edf2f7;
  }
  body.role-utilisateur .notes-page.user-notes-page .note-detail-file-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    white-space: normal;
  }
  body.role-utilisateur .notes-page.user-notes-page .note-detail-signature {
    max-height: none;
  }
  body.role-utilisateur .user-home-page td.actions-cell,
  body.role-utilisateur .user-notes-page td.actions-cell,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell {
    column-gap: 12px !important;
    row-gap: 10px !important;
    align-items: center;
  }
  body.role-utilisateur .user-notes-page td.actions-cell > .notes-action-btn,
  body.role-utilisateur .user-notes-page td.actions-cell > .org-icon-btn,
  body.role-utilisateur .user-home-page td.actions-cell > .org-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    flex: 0 0 auto;
  }
  body.role-utilisateur .user-notes-page td.actions-cell::before,
  body.role-utilisateur .user-home-page td.actions-cell::before,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell::before {
    margin-right: 14px !important;
  }
  body.role-utilisateur .user-notes-page td.actions-cell > * + *,
  body.role-utilisateur .user-home-page td.actions-cell > * + *,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell > * + * {
    margin-left: 12px !important;
  }
  body.role-administrateur #user-modal-overlay.modal-overlay {
    align-items: flex-start;
    overflow-y: auto;
    padding: 12px 10px 24px;
  }
  body.role-administrateur #user-modal-overlay .modal-card {
    width: min(100%, 560px);
    margin: 0 auto;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
  }
  body.role-administrateur #user-modal-overlay .users-modal-grid {
    grid-template-columns: 1fr;
  }
  body.role-administrateur #user-modal-overlay .modal-actions {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    padding-top: 10px;
  }
  body.role-utilisateur .profile-doc-page .profile-doc-stack,
  body.role-utilisateur .profile-doc-page .profile-doc-stack--carte-grise {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  body.role-utilisateur .profile-doc-page .profile-doc-card {
    padding: 14px;
  }
  body.role-utilisateur .profile-doc-page .profile-doc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  body.role-utilisateur .profile-doc-page .profile-doc-upload-field input[type="file"] {
    width: 100%;
  }
  body.role-utilisateur .profile-doc-page .profile-doc-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    background: #ffffff;
    padding-top: 10px;
    display: grid;
    gap: 8px;
  }
  body.role-utilisateur .profile-doc-page .profile-doc-actions .button,
  body.role-utilisateur .profile-doc-page .profile-doc-actions .button-primary,
  body.role-utilisateur .profile-doc-page .profile-doc-actions .button-secondary {
    width: 100%;
  }
  body.role-utilisateur .profile-doc-page .profile-doc-preview-wrap {
    max-height: 48dvh;
    overflow: auto;
  }
  body.role-utilisateur .profile-doc-page .profile-doc-preview-image {
    width: 100%;
    max-height: none;
    height: auto;
    object-fit: contain;
  }
}

@media (max-width: 767px) {
  body.role-utilisateur .user-home-page td.actions-cell,
  body.role-utilisateur .user-notes-page td.actions-cell,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 8px !important;
    overflow-x: hidden;
  }
  body.role-utilisateur .user-home-page td.actions-cell::before,
  body.role-utilisateur .user-notes-page td.actions-cell::before,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell::before {
    flex: 0 0 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
    margin-right: 6px !important;
  }
  body.role-utilisateur .user-home-page td.actions-cell > *,
  body.role-utilisateur .user-notes-page td.actions-cell > *,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell > * {
    flex: 0 0 34px !important;
    width: 34px !important;
    height: 34px !important;
    margin-left: 0 !important;
  }
  body.role-utilisateur .user-home-page td.actions-cell > * + *,
  body.role-utilisateur .user-notes-page td.actions-cell > * + *,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell > * + * {
    margin-left: 0 !important;
  }
}

@media (max-width: 767px) {
  body.role-utilisateur .user-notes-page td.actions-cell,
  body.role-utilisateur .user-home-page td.actions-cell,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell {
    align-items: flex-start !important;
    gap: 0 !important;
    overflow: hidden;
  }
  body.role-utilisateur .user-notes-page td.actions-cell::before,
  body.role-utilisateur .user-home-page td.actions-cell::before,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell::before {
    flex: 0 0 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
    margin-right: 8px !important;
  }
  body.role-utilisateur .user-notes-page .notes-actions-group,
  body.role-utilisateur .user-home-page .notes-actions-group,
  body.role-utilisateur .notes-page.user-notes-page .notes-actions-group {
    display: grid;
    grid-template-columns: repeat(3, 34px);
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    justify-items: center;
    margin-left: auto;
    margin-right: auto;
  }
  body.role-utilisateur .user-notes-page td.actions-cell > .notes-actions-group,
  body.role-utilisateur .user-home-page td.actions-cell > .notes-actions-group,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell > .notes-actions-group {
    flex: 0 1 auto !important;
    width: auto !important;
    height: auto !important;
    max-width: calc(100% - 104px);
    margin: 0 !important;
  }
  body.role-utilisateur .user-notes-page .notes-actions-group--count-4,
  body.role-utilisateur .user-home-page .notes-actions-group--count-4,
  body.role-utilisateur .notes-page.user-notes-page .notes-actions-group--count-4 {
    grid-template-columns: repeat(2, 34px);
    justify-content: center;
  }
  body.role-utilisateur .user-notes-page .notes-actions-group--count-3,
  body.role-utilisateur .user-home-page .notes-actions-group--count-3,
  body.role-utilisateur .notes-page.user-notes-page .notes-actions-group--count-3 {
    grid-template-columns: repeat(3, 34px);
    justify-content: center;
  }
  body.role-utilisateur .user-notes-page .notes-actions-group--count-2,
  body.role-utilisateur .user-home-page .notes-actions-group--count-2,
  body.role-utilisateur .notes-page.user-notes-page .notes-actions-group--count-2 {
    grid-template-columns: repeat(2, 34px);
  }
  body.role-utilisateur .user-notes-page .notes-actions-group > .org-icon-btn,
  body.role-utilisateur .user-notes-page .notes-actions-group > .notes-action-btn,
  body.role-utilisateur .user-home-page .notes-actions-group > .org-icon-btn,
  body.role-utilisateur .notes-page.user-notes-page .notes-actions-group > .org-icon-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 11px;
  }
}

@media (max-width: 767px) {
  body.role-utilisateur .user-notes-page td.actions-cell,
  body.role-utilisateur .user-home-page td.actions-cell,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell {
    display: grid !important;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center !important;
    column-gap: 8px !important;
    row-gap: 0 !important;
    overflow: hidden;
  }
  body.role-utilisateur .user-notes-page td.actions-cell::before,
  body.role-utilisateur .user-home-page td.actions-cell::before,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell::before {
    grid-column: 1;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
  }
  body.role-utilisateur .user-notes-page td.actions-cell > .notes-actions-group,
  body.role-utilisateur .user-home-page td.actions-cell > .notes-actions-group,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell > .notes-actions-group {
    grid-column: 2;
    justify-self: center;
    align-self: center;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  body.role-utilisateur .user-notes-page .notes-actions-group--count-3,
  body.role-utilisateur .user-home-page .notes-actions-group--count-3,
  body.role-utilisateur .notes-page.user-notes-page .notes-actions-group--count-3 {
    grid-template-columns: repeat(3, 34px) !important;
    gap: 10px !important;
    justify-content: center;
  }
  body.role-utilisateur .user-notes-page .notes-actions-group--count-4,
  body.role-utilisateur .user-home-page .notes-actions-group--count-4,
  body.role-utilisateur .notes-page.user-notes-page .notes-actions-group--count-4 {
    grid-template-columns: repeat(2, 34px) !important;
    gap: 10px !important;
    justify-content: center;
  }
}

@media (max-width: 767px) {
  body.role-administrateur #user-modal-overlay.modal-overlay {
    align-items: flex-start !important;
    overflow-y: auto !important;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding: max(10px, env(safe-area-inset-top)) 10px max(18px, env(safe-area-inset-bottom));
  }
  body.role-administrateur #user-modal-overlay .modal-card {
    width: min(100%, 560px) !important;
    margin: 0 auto !important;
    max-height: calc(100dvh - 20px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 14px 14px 12px !important;
  }
  body.role-administrateur #user-modal-overlay #user-form {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  body.role-administrateur #user-modal-overlay .users-modal-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  body.role-administrateur #user-modal-overlay .users-temp-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  body.role-administrateur #user-modal-overlay .modal-actions {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    border-top: 1px solid #eef2f7;
    padding-top: 10px;
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  body.role-administrateur #user-modal-overlay .modal-actions > .button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  body.role-administrateur #user-modal-overlay .modal-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  body.role-utilisateur .user-home-page td.actions-cell,
  body.role-utilisateur .user-notes-page td.actions-cell,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    column-gap: 10px !important;
    row-gap: 0 !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  body.role-utilisateur .user-home-page td.actions-cell::-webkit-scrollbar,
  body.role-utilisateur .user-notes-page td.actions-cell::-webkit-scrollbar,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell::-webkit-scrollbar {
    display: none;
  }
  body.role-utilisateur .user-home-page td.actions-cell::before,
  body.role-utilisateur .user-notes-page td.actions-cell::before,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell::before {
    flex: 0 0 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    margin-right: 8px !important;
  }
  body.role-utilisateur .user-notes-page td.actions-cell > .notes-actions-group,
  body.role-utilisateur .user-home-page td.actions-cell > .notes-actions-group,
  body.role-utilisateur .notes-page.user-notes-page td.actions-cell > .notes-actions-group {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-start;
    gap: 10px !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
  }
  body.role-utilisateur .user-notes-page .notes-actions-group > .org-icon-btn,
  body.role-utilisateur .user-notes-page .notes-actions-group > .notes-action-btn,
  body.role-utilisateur .user-home-page .notes-actions-group > .org-icon-btn,
  body.role-utilisateur .notes-page.user-notes-page .notes-actions-group > .org-icon-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body.role-utilisateur .profile-doc-page .profile-doc-actions {
    position: static !important;
    bottom: auto !important;
    z-index: auto !important;
    background: transparent !important;
    padding-top: 0 !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
  }
  body.role-utilisateur .profile-doc-page .profile-doc-actions .button,
  body.role-utilisateur .profile-doc-page .profile-doc-actions .button-primary,
  body.role-utilisateur .profile-doc-page .profile-doc-actions .button-secondary {
    width: auto !important;
    min-width: 160px;
    flex: 0 1 auto;
  }
}

/* 2026-09-06 - Compactage transport : consigne sur la même ligne que le titre */
@media (min-width: 768px) {
  .note-page--redesign #section-transport .transport-item__head {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
  }
}
.note-page--redesign #expense-repas-card .section-heading { margin-bottom: 8px !important; }
.note-page--redesign #expense-repas-card .section-heading p { margin-bottom: 0 !important; }
.note-page--redesign #expense-repas-card .summary-table th,
.note-page--redesign #expense-repas-card .summary-table td { padding-top: 8px !important; padding-bottom: 8px !important; }
.note-page--redesign #expense-repas-card .expense-summary-card__actions { padding-top: 8px !important; }

/* 2026-09-06 - Transport compact : titre + règle sur une seule ligne */
@media (min-width: 768px) {
  .note-page--redesign #section-transport .transport-item__head {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
  }
  .note-page--redesign #section-transport .transport-item__head h3 {
    flex: 0 0 auto !important;
    margin: 0 !important;
  }
  .note-page--redesign #section-transport .transport-item__head span {
    display: inline-flex !important;
    width: auto !important;
    max-width: calc(100% - 120px);
    margin: 0 !important;
    padding: 3px 7px !important;
    line-height: 1.25 !important;
  }
}

/* 2026-09-06 - Saisie détaillée des transports */
.note-page--redesign .transport-expense-summary {
  display: grid;
  grid-template-columns: auto auto auto 1fr;
  align-items: center;
  gap: 10px;
  padding-top: 2px;
}
.note-page--redesign .transport-expense-summary strong {
  font-size: 1rem;
  white-space: nowrap;
}
.note-page--redesign .transport-expense-summary > span {
  color: #667085;
  font-size: .86rem;
  white-space: nowrap;
}
.note-page--redesign .transport-expense-summary .button-outlined {
  justify-self: end;
}
@media (max-width: 767px) {
  .note-page--redesign .transport-expense-summary {
    grid-template-columns: 1fr 1fr;
  }
  .note-page--redesign .transport-expense-summary .button-outlined {
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
  }
}
/* Fonctions / mandats */
.settings-mandates{grid-column:1/-1;margin-top:6px;padding:14px;border:1px solid #e1e6ee;border-radius:10px;background:#fafbfc}.settings-mandates__head{display:flex;gap:10px;align-items:baseline;margin-bottom:10px}.settings-mandates__head span,.settings-mandates__help{font-size:12px;color:#687386}.settings-mandate-row{display:grid;grid-template-columns:minmax(260px,1fr) auto auto;gap:10px;align-items:center;margin-bottom:8px}.settings-mandate-default{display:flex!important;align-items:center;gap:6px;white-space:nowrap}.settings-mandate-default input{width:auto!important}.settings-mandates__help{margin:8px 0 0}.note-mandate-picker{display:flex;flex-wrap:wrap;gap:8px;padding:8px 10px;border:1px solid #dbe1e9;border-radius:8px;min-height:42px;background:#fff}.note-mandate-picker label{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:7px;background:#f4f6f9;font-weight:500}.note-mandate-picker input{width:auto!important}.field-shell--mandates small{display:block;margin-top:5px;color:#748095}.note-mandate-empty{color:#748095;padding:4px}
@media(max-width:700px){.settings-mandate-row{grid-template-columns:1fr}.settings-mandates__head{display:block}.settings-mandates__head span{display:block;margin-top:4px}}

/* Nouvelle note : repérage clair des champs obligatoires */
.note-page--redesign .required-fields-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid rgba(26, 86, 153, .18);
  border-radius: 12px;
  background: rgba(26, 86, 153, .055);
  color: var(--color-text, #273444);
}
.note-page--redesign .required-fields-notice__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-primary, #1a5699);
  color: #fff;
  font-weight: 800;
  font-family: Georgia, serif;
}
.note-page--redesign .required-fields-notice > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  line-height: 1.35;
}
.note-page--redesign .required-fields-notice strong { font-weight: 800; }
.note-page--redesign .required-fields-notice span:not(.required-fields-notice__icon) { color: #5d6773; }
.note-page--redesign .required-star {
  color: #c0392b;
  font-weight: 900;
  text-decoration: none;
}
.note-page--redesign .field-shell--invalid input,
.note-page--redesign .field-shell--invalid select,
.note-page--redesign .field-shell--invalid textarea {
  border-color: #c0392b !important;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, .10) !important;
}
.note-page--redesign .certification-card.field-shell--invalid {
  border-color: #c0392b !important;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, .08);
}
.note-page--redesign .required-field-error {
  display: block;
  width: 100%;
  margin-top: 5px;
  color: #b02a20;
  font-size: .78rem;
  font-weight: 700;
}
@media (max-width: 720px) {
  .note-page--redesign .required-fields-notice { align-items: flex-start; }
  .note-page--redesign .required-fields-notice > div { display: block; }
  .note-page--redesign .required-fields-notice strong { display: block; margin-bottom: 2px; }
}

/* Sauvegarde automatique des notes de frais */
.note-page--redesign .header-chip--autosave[data-state="saving"] strong,
.note-page--redesign .header-chip--autosave[data-state="dirty"] strong {
  opacity: .78;
}
.note-page--redesign .header-chip--autosave[data-state="saved"] {
  border-color: rgba(46, 125, 50, .28);
}
.note-page--redesign .header-chip--autosave[data-state="error"] {
  border-color: rgba(192, 57, 43, .55);
  background: rgba(192, 57, 43, .06);
}
.note-page--redesign .header-chip--autosave[data-state="error"] strong {
  color: var(--color-primary, #c0392b);
}

/* 2026-09-06 — Refonte compacte des écrans de dépenses détaillées */
.expense-builder-page--v2 {
  max-width: 1280px;
  padding: 10px 16px 14px;
}
.expense-builder-page--v2::before { border-radius: 18px; }
.expense-builder-page--v2 .expense-builder-hero {
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px 14px;
  margin-bottom: 10px;
  padding: 13px 16px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(15,23,42,.05);
}
.expense-builder-page--v2 .expense-builder-hero h1 {
  margin: 3px 0 2px;
  font-size: 20px;
}
.expense-builder-page--v2 .expense-builder-hero p {
  font-size: 12.5px;
  line-height: 1.35;
}
.expense-builder-page--v2 .expense-builder-hero .header-band__eyebrow {
  padding: 1px 7px;
  font-size: 9.5px;
}
.expense-builder-page--v2 .expense-builder-hero__actions .button-outlined {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
}
.expense-builder-page--v2 .builder-kpis {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 5px;
  padding-top: 7px;
  border-top: 1px solid #efe6e3;
}
.expense-builder-page--v2 .builder-kpi {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 0 14px 0 0;
  margin-right: 14px;
  border: 0;
  border-right: 1px solid #e7e2df;
  border-radius: 0;
  background: transparent;
}
.expense-builder-page--v2 .builder-kpi:last-child { border-right: 0; }
.expense-builder-page--v2 .builder-kpi span,
.expense-builder-page--v2 .builder-kpi strong {
  font-size: 12px;
  line-height: 1.2;
}
.expense-builder-page--v2 .builder-kpi strong { font-weight: 700; }
.expense-builder-page--v2 .expense-builder-shell { margin-bottom: 8px; }
.expense-builder-page--v2 .expense-builder-card {
  padding: 14px 16px;
  border-radius: 13px;
  box-shadow: 0 6px 16px rgba(15,23,42,.045);
}
.expense-builder-page--v2 .expense-builder-card .section-heading { margin-bottom: 8px; }
.expense-builder-page--v2 .expense-builder-card .section-heading h2 {
  margin: 0;
  font-size: 17px;
}
.expense-builder-page--v2 .expense-builder-card .section-heading h2::after {
  width: 34px;
  height: 2px;
  margin-top: 5px;
}
.expense-builder-page--v2 .expense-builder-card .section-heading p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
}
.expense-builder-page--v2 .expense-builder-form .form-grid { gap: 8px 10px; }
.expense-builder-page--v2 .field-shell { gap: 3px; }
.expense-builder-page--v2 .field-shell > span { font-size: 11.5px; }
.expense-builder-page--v2 .field-shell input,
.expense-builder-page--v2 .field-shell select,
.expense-builder-page--v2 .field-shell textarea {
  min-height: 36px;
  padding-top: 7px;
  padding-bottom: 7px;
  font-size: 12px;
  border-radius: 8px;
}
.expense-builder-page--v2 .field-shell small {
  margin-top: 1px;
  font-size: 10.5px;
  line-height: 1.25;
}
.expense-builder-page--v2 .builder-preview {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 8px 10px;
  border: 1px solid #e5eaf1;
  border-radius: 9px;
  background: #f8fafd;
}
.expense-builder-page--v2 .builder-preview > div {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid #dde4ed;
  border-radius: 0;
  background: transparent;
}
.expense-builder-page--v2 .builder-preview > div:first-child { padding-left: 0; }
.expense-builder-page--v2 .builder-preview > div:last-child { border-right: 0; }
.expense-builder-page--v2 .builder-preview > div span,
.expense-builder-page--v2 .builder-preview > div strong { font-size: 11.5px; }
.expense-builder-page--v2 .button-group { margin-top: 8px; gap: 7px; }
.expense-builder-page--v2 .button-group .button-primary,
.expense-builder-page--v2 .button-group .button-outlined {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 11.5px;
  box-shadow: none;
}
.expense-builder-page--v2 .expense-builder-card--list { margin-top: 0; }
.expense-builder-page--v2 .expense-builder-table-wrap { border-radius: 10px; }
.expense-builder-page--v2 .summary-table thead th {
  padding: 8px 10px;
  font-size: 9.5px;
}
.expense-builder-page--v2 .summary-table td {
  padding: 8px 10px;
  font-size: 11.5px;
}
.expense-builder-page--v2 .summary-table tbody td[colspan] { padding: 9px 10px; }
.expense-builder-page--v2 .builder-row-actions .button-outlined {
  min-height: 29px;
  padding: 0 8px;
  font-size: 10.5px;
  border-radius: 8px;
}

/* Import de fichier harmonisé avec le design de l'application */
.expense-builder-page--v2 .builder-file-field { position: relative; }
.expense-builder-page--v2 .builder-file-upload {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 38px;
  border: 1px dashed #cfd8e5;
  border-radius: 9px;
  background: #fbfcfe;
  overflow: hidden;
}
.expense-builder-page--v2 .builder-file-input {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.expense-builder-page--v2 .builder-file-button {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  padding: 0 11px;
  background: #fff4f1;
  border-right: 1px solid #ead8d3;
  color: #8f3023;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}
.expense-builder-page--v2 .builder-file-name {
  min-width: 0;
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #6b7789;
  font-size: 11px;
}
.expense-builder-page--v2 .builder-file-upload:focus-within,
.expense-builder-page--v2 .builder-file-upload:hover {
  border-color: #b85748;
  background: #fff;
}

@media (min-width: 901px) {
  .expense-builder-page--v2 .expense-builder-card--form .form-grid--2 {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
  .expense-builder-page--v2 .expense-builder-card--form .field-shell--full {
    grid-column: 1 / -1;
  }
}
@media (max-width: 900px) {
  .expense-builder-page--v2 { padding: 6px 8px 10px; }
  .expense-builder-page--v2 .expense-builder-hero { padding: 11px 12px; }
  .expense-builder-page--v2 .builder-kpis { gap: 6px 0; }
  .expense-builder-page--v2 .builder-kpi { margin-right: 9px; padding-right: 9px; }
  .expense-builder-page--v2 .builder-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .expense-builder-page--v2 .builder-preview > div,
  .expense-builder-page--v2 .builder-preview > div:first-child {
    display: grid;
    gap: 2px;
    padding: 0;
    border: 0;
  }
}
@media (max-width: 520px) {
  .expense-builder-page--v2 .builder-file-upload { align-items: stretch; flex-direction: column; }
  .expense-builder-page--v2 .builder-file-button { min-height: 34px; justify-content: center; border-right: 0; border-bottom: 1px solid #ead8d3; }
  .expense-builder-page--v2 .builder-file-name { padding: 7px 9px; }
}

/* UX brouillons automatiques */
.draft-choice{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:20px}.draft-choice__backdrop{position:absolute;inset:0;background:rgba(15,23,42,.52);backdrop-filter:blur(2px)}.draft-choice__panel{position:relative;width:min(620px,100%);background:#fff;border-radius:18px;padding:28px;box-shadow:0 24px 70px rgba(15,23,42,.25);text-align:center}.draft-choice__icon{width:52px;height:52px;border-radius:50%;display:grid;place-items:center;margin:0 auto 12px;background:#eef4ff;color:#2457a6;font-size:24px}.draft-choice__panel h2{margin:0 0 8px}.draft-choice__panel p{color:#64748b}.draft-choice__actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:22px}.draft-choice__more{font-size:13px;margin:16px 0 0}.draft-created-toast{position:fixed;right:24px;top:88px;z-index:9999;max-width:430px;background:#fff;border:1px solid #b9dfc8;border-left:5px solid #23905a;border-radius:12px;padding:14px 16px;box-shadow:0 12px 35px rgba(15,23,42,.16);opacity:0;transform:translateY(-8px);transition:.22s ease}.draft-created-toast.is-visible{opacity:1;transform:none}.draft-created-toast strong,.draft-created-toast span{display:block}.draft-created-toast span{font-size:13px;color:#64748b;margin-top:3px}.drafts-home-card{background:#fff;border:1px solid #dbe3ee;border-radius:14px;padding:18px 20px;margin:0 0 20px;box-shadow:0 3px 12px rgba(15,23,42,.04)}.drafts-home-card__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.drafts-home-card__head h2{margin:0;font-size:18px}.drafts-home-card__head p{margin:3px 0 0;color:#64748b;font-size:13px}.drafts-home-card__count{display:grid;place-items:center;min-width:30px;height:30px;border-radius:999px;background:#eef4ff;color:#2457a6;font-weight:700}.drafts-home-list{display:grid;gap:8px}.drafts-home-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:11px 12px;border:1px solid #e7edf4;border-radius:10px;background:#fbfdff}.drafts-home-row>div:first-child{display:grid;gap:2px}.drafts-home-row span{font-size:12px;color:#64748b}.drafts-home-row__actions{display:flex;gap:8px;flex-shrink:0}@media(max-width:680px){.drafts-home-row{align-items:flex-start;flex-direction:column}.drafts-home-row__actions{width:100%}.drafts-home-row__actions .button{flex:1}.draft-created-toast{left:14px;right:14px;top:72px}.draft-choice__panel{padding:22px 16px}}


/* =========================================================
   NDF FSPBA - V2.5 - Saisie automatique des justificatifs
   Ajout isolé : n'altère pas les autres écrans de l'application.
   ========================================================= */
.receipt-start-card{
  display:grid;
  grid-template-columns:64px minmax(0,1fr);
  gap:20px;
  margin:22px 0 18px;
  padding:24px;
  border:1px solid #e2e7ed;
  border-radius:18px;
  background:#fff;
  box-shadow:0 8px 28px rgba(28,39,54,.06);
}
.receipt-start-card__icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:56px;
  height:56px;
  border-radius:16px;
  background:#f8efed;
  font-size:25px;
}
.receipt-start-card__content{min-width:0}
.receipt-start-card__eyebrow{
  display:block;
  margin:0 0 6px;
  color:#b7352a;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
}
.receipt-start-card h2{
  margin:0 0 7px;
  color:#172033;
  font-size:24px;
  line-height:1.2;
}
.receipt-start-card__lead{
  max-width:880px;
  margin:0;
  color:#5e6a7c;
  font-size:14px;
  line-height:1.6;
}
.receipt-start-card__actions--stacked{
  display:block;
  margin-top:18px;
}
.receipt-smart-input{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
.receipt-dropzone{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:210px;
  padding:26px 22px;
  border:2px dashed #cbd3dd;
  border-radius:16px;
  background:#fafbfc;
  cursor:pointer;
  text-align:center;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease;
}
.receipt-dropzone:hover,
.receipt-dropzone:focus,
.receipt-dropzone.is-dragover{
  border-color:#bd3b30;
  background:#fff8f7;
  box-shadow:0 0 0 4px rgba(189,59,48,.08);
  outline:none;
}
.receipt-dropzone.is-dragover{transform:translateY(-1px)}
.receipt-dropzone__icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:52px;
  height:52px;
  margin-bottom:12px;
  border-radius:50%;
  background:#f5e8e6;
  color:#a83227;
  font-size:28px;
  font-weight:800;
}
.receipt-dropzone__title{
  color:#1d2939;
  font-size:16px;
  font-weight:750;
}
.receipt-dropzone__or{
  margin:7px 0;
  color:#8a95a5;
  font-size:12px;
}
.receipt-dropzone__button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:0 20px;
  border-radius:10px;
  background:#b7352a;
  color:#fff;
  font-size:14px;
  font-weight:750;
  box-shadow:0 3px 10px rgba(183,53,42,.18);
}
.receipt-dropzone__formats{
  margin-top:10px;
  color:#7b8796;
  font-size:11px;
}
.receipt-manual-choice{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin-top:12px;
  color:#697587;
  font-size:13px;
}
.receipt-classic-link{
  color:#a83227!important;
  font-weight:750!important;
  text-decoration:none!important;
}
.receipt-classic-link:hover{text-decoration:underline!important}
.receipt-start-card__selection{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:14px;
  padding:12px 14px;
  border:1px solid #dfe5eb;
  border-radius:12px;
  background:#f8fafc;
}
.receipt-start-card__selection[hidden]{display:none!important}
.receipt-file-status{display:flex;align-items:center;gap:10px;min-width:0}
.receipt-file-status__ok{
  display:flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  flex:0 0 30px;
  border-radius:50%;
  background:#e9f6ed;
  color:#24743a;
  font-weight:800;
}
.receipt-file-status div{min-width:0}
.receipt-file-status strong,.receipt-file-status span{display:block}
.receipt-file-status strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#1d2a3c;font-size:13px}
.receipt-file-status span{margin-top:2px;color:#718096;font-size:11px}
.receipt-remove-button{
  border:0;
  background:transparent;
  color:#9d342a;
  font-weight:700;
  cursor:pointer;
}
.receipt-start-card__hint{
  margin-top:14px;
  padding:12px 14px;
  border-radius:10px;
  background:#f6f8fb;
  color:#657188;
  font-size:12px;
  line-height:1.5;
}
.receipt-start-card__hint strong{color:#344256}
.receipt-analysis-status{margin-top:12px;min-height:1.3em;color:#4b5563;font-size:.94rem;font-weight:600}
.receipt-analysis-status--loading{color:#1d4ed8}
.receipt-analysis-status--success{color:#166534}
.receipt-analysis-status--error{color:#b91c1c}
.receipt-review-card{
  margin-top:16px;
  border:1px solid #dfe5ec;
  border-radius:16px;
  background:#fff;
  box-shadow:0 8px 24px rgba(20,35,55,.07);
  overflow:hidden;
}
.receipt-review-card__top{display:flex;justify-content:space-between;gap:24px;padding:20px 22px;background:linear-gradient(180deg,#fff,#fafbfd);border-bottom:1px solid #edf0f3}
.receipt-review-card__identity{min-width:0;flex:1}
.receipt-review-card__title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:4px}
.receipt-review-card__title-row strong{font-size:1.18rem;color:#1d2a38}
.receipt-review-pill{display:inline-flex;align-items:center;border-radius:999px;padding:4px 10px;background:#f5e9e7;color:#9f3026;font-size:.78rem;font-weight:700}
.receipt-review-card__meta{display:flex;gap:12px;flex-wrap:wrap;margin-top:7px;color:#66717e;font-size:.9rem}
.receipt-review-card__amount-wrap{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.receipt-review-card__amount{font-size:2rem;line-height:1;color:#a83227}
.receipt-confidence{font-size:.78rem;background:#edf7ef;color:#2e7040;border-radius:999px;padding:4px 9px}
.receipt-review-payment{padding:16px 22px;display:grid;grid-template-columns:180px minmax(260px,1fr);align-items:center;gap:14px;border-bottom:1px solid #edf0f3}
.receipt-review-payment label{font-weight:700;color:#263442}
.receipt-review-payment select{width:100%;min-height:44px}
.receipt-review-details{padding:0 22px;border-bottom:1px solid #edf0f3}
.receipt-review-details summary{cursor:pointer;padding:14px 0;font-weight:650;color:#4c5966}
.receipt-review-details[open] summary{margin-bottom:4px}
.receipt-analysis-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.receipt-analysis-grid label{display:flex;flex-direction:column;gap:6px;font-size:.85rem;font-weight:700;color:#374151}
.receipt-analysis-grid input,.receipt-analysis-grid select{width:100%;min-height:42px;border:1px solid #cfd5dd;border-radius:8px;padding:8px 10px;background:#fff;color:#111827}
.receipt-review-details .receipt-analysis-grid{padding:4px 0 18px}
.receipt-review-card__footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 22px;background:#fafbfd}
.receipt-review-usage{font-size:.82rem;color:#73808d}
.receipt-review-add{min-height:44px;padding-left:22px!important;padding-right:22px!important}
.receipt-comment-divider{height:1px;margin:24px 0 18px;background:#e7ebf0}
.receipt-comment-heading{margin-bottom:10px}
.receipt-comment-heading h2{margin:0 0 6px!important;font-size:18px!important}
.receipt-comment-heading p{font-size:13px!important}
.receipt-start-card .note-comment-field textarea{min-height:72px}
@media(max-width:760px){
  .receipt-start-card{grid-template-columns:1fr;padding:18px}
  .receipt-start-card__icon{width:48px;height:48px}
  .receipt-start-card h2{font-size:21px}
  .receipt-dropzone{min-height:190px;padding:22px 14px}
  .receipt-manual-choice{flex-direction:column;gap:3px;text-align:center}
  .receipt-review-card__top{flex-direction:column;gap:12px}
  .receipt-review-card__amount-wrap{align-items:flex-start;text-align:left}
  .receipt-review-payment{grid-template-columns:1fr}
  .receipt-analysis-grid{grid-template-columns:1fr}
  .receipt-review-card__footer{align-items:stretch;flex-direction:column}
  .receipt-review-add{width:100%}
}


/* ===== NDF V2.6 - finition saisie automatique ===== */
.receipt-start-card{padding:18px 20px;gap:14px}
.receipt-start-card__icon{width:46px;height:46px;border-radius:13px;font-size:21px}
.receipt-start-card__mode{display:flex;align-items:center;gap:8px;margin:0 0 5px}
.receipt-new-badge{display:inline-flex;align-items:center;min-height:22px;padding:0 8px;border-radius:999px;background:#b7352a;color:#fff;font-size:10px;font-weight:800;letter-spacing:.06em}
.receipt-mode-label{color:#9f3026;font-size:12px;font-weight:800}
.receipt-start-card h2{font-size:22px;margin-bottom:5px}
.receipt-start-card__lead{line-height:1.45}
.receipt-start-card__actions--stacked{margin-top:13px}
.receipt-dropzone{min-height:150px;padding:17px 18px;border-radius:14px}
.receipt-dropzone__icon{width:42px;height:42px;margin-bottom:8px;font-size:23px}
.receipt-dropzone__or{margin:4px 0}
.receipt-dropzone__button{min-height:38px;padding:0 18px}
.receipt-dropzone__formats{margin-top:7px}
.receipt-manual-choice{margin-top:9px}
.receipt-help-card{display:flex;align-items:flex-start;gap:10px;margin-top:10px;padding:10px 12px;background:#f5f7fa;border:1px solid #e7ebf0}
.receipt-help-card__icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 24px;width:24px;height:24px;border-radius:50%;background:#e8eef6;color:#35516f;font-weight:800}
.receipt-help-card div{display:flex;gap:5px;flex-wrap:wrap;line-height:1.45}
.receipt-help-card strong{color:#2f3d4d}
.receipt-help-card span{color:#667387}
.receipt-analysis-status{display:flex;align-items:center;gap:9px;margin-top:10px;padding:0;min-height:20px}
.receipt-analysis-status--loading:before{content:"";width:16px;height:16px;border:2px solid #bfd0ee;border-top-color:#1d4ed8;border-radius:50%;animation:receipt-spin .75s linear infinite}
.receipt-analysis-status--success:before{content:"✓";display:inline-flex;align-items:center;justify-content:center;width:19px;height:19px;border-radius:50%;background:#e4f5e8;color:#166534;font-size:12px;font-weight:900}
.receipt-analysis-status--error:before{content:"!";display:inline-flex;align-items:center;justify-content:center;width:19px;height:19px;border-radius:50%;background:#feeceb;color:#b91c1c;font-size:12px;font-weight:900}
@keyframes receipt-spin{to{transform:rotate(360deg)}}
.receipt-preview{margin-top:12px;border:1px solid #dce3ea;border-radius:14px;overflow:hidden;background:#fff}
.receipt-preview[hidden]{display:none!important}
.receipt-preview__header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 13px;background:#f8fafc;border-bottom:1px solid #e8edf2}
.receipt-preview__header>div{display:flex;align-items:center;gap:8px}
.receipt-preview__eyebrow{font-size:9px;font-weight:850;letter-spacing:.08em;color:#a83227;background:#f7e9e7;border-radius:999px;padding:3px 7px}
.receipt-preview__header strong{font-size:13px;color:#263445}
.receipt-preview__hint{font-size:11px;color:#758194}
.receipt-preview__canvas{display:flex;align-items:center;justify-content:center;min-height:220px;max-height:440px;padding:12px;background:#eef1f4;overflow:auto}
.receipt-preview__canvas img{display:block;max-width:100%;max-height:410px;width:auto;height:auto;object-fit:contain;border-radius:6px;box-shadow:0 4px 14px rgba(20,35,55,.12);background:#fff}
.receipt-preview__canvas iframe{display:block;width:100%;height:390px;border:0;border-radius:6px;background:#fff}
.receipt-personal-payment{display:flex;align-items:center;gap:10px;margin:0;padding:12px 22px;border-bottom:1px solid #edf0f3;background:#f8fbf8}
.receipt-personal-payment>span{display:inline-flex;align-items:center;justify-content:center;width:27px;height:27px;border-radius:50%;background:#e4f5e8;color:#24743a;font-weight:900}
.receipt-personal-payment div{display:flex;flex-direction:column;gap:1px}
.receipt-personal-payment strong{font-size:13px;color:#263445}
.receipt-personal-payment small{font-size:11px;color:#687587}
.receipt-review-card{margin-top:12px}
.receipt-review-card__top{padding:16px 18px}
.receipt-review-details{padding:0 18px}
.receipt-review-card__footer{padding:13px 18px}
.receipt-comment-divider{margin:16px 0 10px}
.receipt-comment-details{border:1px solid #e1e6ec;border-radius:12px;background:#fff;overflow:hidden}
.receipt-comment-details summary{display:flex;align-items:center;gap:9px;padding:11px 13px;cursor:pointer;list-style:none;color:#263445;font-weight:750}
.receipt-comment-details summary::-webkit-details-marker{display:none}
.receipt-comment-plus{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:#f7e9e7;color:#a83227;font-size:18px;line-height:1}
.receipt-comment-details summary small{margin-left:auto;color:#7a8594;font-size:10px;font-weight:650;text-transform:uppercase;letter-spacing:.05em}
.receipt-comment-details[open] .receipt-comment-plus{transform:rotate(45deg)}
.receipt-comment-details__body{padding:0 13px 12px;border-top:1px solid #edf0f3}
.receipt-comment-details__body>p{margin:10px 0 8px;color:#697587;font-size:12px}
.receipt-comment-details .note-comment-field textarea{min-height:68px}
.policy-alert{margin-top:12px!important;padding-top:12px!important;padding-bottom:12px!important}
@media(max-width:760px){
 .receipt-dropzone{min-height:140px;padding:15px 12px}
 .receipt-preview__header{align-items:flex-start;flex-direction:column}
 .receipt-preview__canvas{min-height:180px;max-height:360px;padding:8px}
 .receipt-preview__canvas iframe{height:330px}
 .receipt-personal-payment{padding:11px 14px}
}


/* ===== NDF V2.6.1 - correctif aperçu justificatif ===== */
.receipt-preview__canvas{min-height:180px;max-height:360px;padding:10px}
.receipt-preview__canvas img{max-height:330px}
.receipt-preview__canvas iframe{height:330px}
.receipt-preview__fallback{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:170px;padding:22px;text-align:center;color:#5f6d7d}
.receipt-preview__fallback[hidden]{display:none!important}
.receipt-preview__fileicon{display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:14px;background:#f5e8e6;font-size:24px}
.receipt-preview__fallback strong{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#273547;font-size:13px}
.receipt-preview__fallback span:not(.receipt-preview__fileicon){font-size:11px;color:#728094}
.receipt-preview__fallback small{max-width:520px;font-size:11px;line-height:1.45;color:#7b8796}
@media(max-width:760px){.receipt-preview__canvas{min-height:150px;max-height:300px}.receipt-preview__canvas img{max-height:275px}.receipt-preview__canvas iframe{height:275px}.receipt-preview__fallback{min-height:145px;padding:16px}}
