:root {
  --tb-red: rgb(201 13 24);
  --tb-red-dark: rgb(151 10 18);
  --tb-red-soft: rgb(254 226 226);
  --tb-ink: rgb(24 24 27);
  --tb-line: rgb(231 229 228);
}

.brand-block {
  min-height: 4.5rem;
}

.brand-mark {
  display: block;
  width: 3.25rem;
  height: 3.25rem;
  flex: 0 0 auto;
}

.brand-text {
  min-width: 0;
  color: var(--tb-red);
  line-height: 1;
}

.brand-name {
  color: var(--tb-red);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.brand-subtitle {
  margin-top: 0.125rem;
  color: var(--tb-red);
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.05;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.login-mark {
  display: block;
  width: 4rem;
  height: 4rem;
  flex: 0 0 auto;
}

.login-brand .brand-name {
  font-size: 1.75rem;
}

.login-brand .brand-subtitle {
  font-size: 1rem;
}

.login-logo {
  display: block;
  width: min(19rem, 100%);
  height: auto;
}

.nav-link {
  display: block;
  min-width: max-content;
  border-radius: 0.25rem;
  padding: 0.625rem 0.75rem;
  color: rgb(63 63 70);
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-link:hover {
  background: var(--tb-red-soft);
  color: var(--tb-red-dark);
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.btn-primary {
  background: var(--tb-red);
  color: white;
}

.btn-primary:hover {
  background: var(--tb-red-dark);
}

.btn-secondary {
  border: 1px solid rgb(209 213 219);
  background: white;
  color: rgb(55 65 81);
}

.btn-secondary:hover {
  border-color: var(--tb-red);
  color: var(--tb-red-dark);
}

.btn-attention {
  gap: 0.35rem;
  border-color: rgb(252 165 165);
  background: rgb(254 242 242);
  color: var(--tb-red-dark);
  box-shadow: 0 0 0 3px rgb(201 13 24 / 0.08);
}

.btn-attention:hover {
  border-color: var(--tb-red);
  background: var(--tb-red);
  color: white;
}

@keyframes mailUrgentBlink {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgb(249 115 22 / 0.55);
    filter: saturate(1);
  }

  50% {
    box-shadow: 0 0 0 0.35rem rgb(249 115 22 / 0.12);
    filter: saturate(1.35);
  }
}

.mail-urgent-blink,
.dashboard-mail-alert {
  animation: mailUrgentBlink 1.05s ease-in-out infinite;
}

.dashboard-mail-alert {
  border-color: rgb(251 146 60);
  background: rgb(255 247 237);
  color: rgb(154 52 18);
}

.dashboard-mail-alert:hover {
  border-color: rgb(234 88 12);
  background: rgb(234 88 12);
  color: white;
}

.dashboard-mail-alert-icon,
.dashboard-mail-alert-count {
  display: inline-flex;
  align-items: center;
}

.dashboard-mail-alert-count {
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgb(234 88 12);
  color: white;
  font-size: 0.75rem;
  font-weight: 900;
}

.dashboard-mail-alert:hover .dashboard-mail-alert-count {
  background: white;
  color: rgb(154 52 18);
}

.mail-urgent-panel {
  border-color: rgb(251 146 60) !important;
  box-shadow: 0 0 0 3px rgb(249 115 22 / 0.08);
}

.mail-urgent-badge,
.mail-urgent-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgb(249 115 22);
  color: white;
  font-weight: 900;
}

.mail-urgent-badge {
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.8125rem;
}

.mail-urgent-dot {
  width: 2rem;
  height: 2rem;
}

@media (prefers-reduced-motion: reduce) {
  .mail-urgent-blink,
  .dashboard-mail-alert {
    animation: none;
  }
}

.btn-compact {
  min-height: 2rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.8125rem;
}

.component-recommended-star {
  color: rgb(217 119 6);
  font-size: 0.95rem;
  line-height: 1;
}

.component-recommended-button {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(252 165 165);
  border-radius: 999px;
  background: white;
  color: rgb(180 83 9);
  font-weight: 800;
  line-height: 1;
}

.component-recommended-button:hover,
.component-recommended-button.is-selected {
  border-color: rgb(217 119 6);
  background: rgb(255 251 235);
  color: rgb(146 64 14);
}

.component-rest-default-badge {
  border: 1px solid rgb(134 239 172);
  border-radius: 999px;
  background: rgb(240 253 244);
  padding: 0.05rem 0.35rem;
  color: rgb(21 128 61);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.1;
}

.component-rest-default-button {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(187 247 208);
  border-radius: 999px;
  background: white;
  color: rgb(21 128 61);
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1;
}

.component-rest-default-button:hover,
.component-rest-default-button.is-selected {
  border-color: rgb(22 163 74);
  background: rgb(240 253 244);
  color: rgb(22 101 52);
}

.app-back-button {
  gap: 0.35rem;
}

.app-back-button span[aria-hidden="true"] {
  font-size: 1.1rem;
  line-height: 1;
}

@media (max-width: 640px) {
  .app-back-button {
    min-height: 2.25rem;
    padding-inline: 0.65rem;
  }

  .app-back-button span:last-child {
    display: none;
  }
}

.input {
  min-height: 2.5rem;
  border-radius: 0.25rem;
  border: 1px solid rgb(209 213 219);
  background: white;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  outline: none;
}

.input:focus {
  border-color: var(--tb-red);
  box-shadow: 0 0 0 3px rgb(201 13 24 / 0.16);
}

.label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(75 85 99);
}

.client-form-grid {
  display: grid;
  gap: 1rem;
}

.client-form-wide {
  grid-column: 1 / -1;
}

.address-suggestions {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.5rem;
}

.address-suggestion {
  display: grid;
  gap: 0.125rem;
  border: 1px solid rgb(209 213 219);
  border-radius: 0.375rem;
  background: rgb(248 250 252);
  padding: 0.625rem 0.75rem;
  text-align: left;
}

.address-suggestion:hover,
.address-suggestion:focus {
  border-color: var(--tb-red);
  background: white;
}

.address-suggestion span,
.address-suggestion-muted {
  font-size: 0.8125rem;
  color: rgb(100 116 139);
}

.hand-delivery-task-grid,
.hand-delivery-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hand-delivery-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgb(209 213 219);
  border-radius: 0.375rem;
  background: rgb(248 250 252);
  padding: 0.5rem 0.625rem;
  font-size: 0.875rem;
  font-weight: 700;
}

.hand-delivery-card {
  border-color: rgb(251 146 60);
  background: rgb(255 247 237);
}

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

.panel {
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: white;
  padding: 1rem;
  box-shadow: 0 1px 2px rgb(17 24 39 / 0.08);
}

.panel-title {
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 700;
}

.search-panel {
  overflow: visible;
}

.header-client-search {
  position: relative;
  display: none;
  flex: 1 1 24rem;
  max-width: 34rem;
  min-width: 18rem;
}

.header-client-search-input {
  width: 100%;
  min-height: 2.25rem;
  padding-block: 0.375rem;
}

@media (min-width: 1024px) {
  .header-client-search {
    display: block;
  }
}

.tools-grid {
  display: grid;
  gap: 1rem;
}

.tools-search-panel {
  margin-bottom: 1rem;
}

.tools-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.tools-search-count {
  min-height: 1.25rem;
  margin-top: 0.35rem;
  color: rgb(82 82 91);
  font-size: 0.8125rem;
  font-weight: 700;
}

.tool-panel {
  overflow: visible;
}

.tool-panel.is-collapsible {
  padding: 0;
}

.tool-panel.is-collapsible > .panel-title {
  display: flex;
  min-height: 3rem;
  cursor: pointer;
  user-select: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0;
  padding: 0.875rem 1rem;
}

.tool-panel.is-collapsible > .panel-title::after {
  color: var(--tb-red);
  content: "\25B8";
  font-size: 0.8125rem;
  font-weight: 900;
}

.tool-panel.is-collapsible.is-open > .panel-title::after {
  content: "\25BE";
}

.tool-panel.is-collapsible > .panel-title:focus-visible {
  outline: 3px solid rgb(201 13 24 / 0.22);
  outline-offset: -3px;
}

.tool-panel-content {
  display: none;
  border-top: 1px solid var(--tb-line);
  padding: 1rem;
}

.tool-panel.is-open > .tool-panel-content {
  display: block;
}

.tool-copy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.tool-copy-column {
  display: grid;
  gap: 0.5rem;
}

.image-base64-tool {
  max-width: 78rem;
}

.image-base64-drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.image-base64-details {
  display: grid;
  grid-template-columns: minmax(14rem, 22rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.image-base64-details[hidden] {
  display: none;
}

.image-base64-preview-wrap {
  display: grid;
  min-height: 14rem;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: rgb(250 250 249);
}

.image-base64-preview {
  max-width: 100%;
  max-height: 22rem;
  object-fit: contain;
}

.image-base64-meta {
  display: grid;
  gap: 0.75rem;
}

.image-base64-output {
  min-height: 18rem;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.image-base64-error {
  color: rgb(153 27 27);
}

.qrcode-tool {
  max-width: 78rem;
}

.qrcode-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
  gap: 1rem;
  align-items: start;
}

.qrcode-input {
  min-height: 12rem;
  resize: vertical;
}

.qrcode-preview-panel {
  position: relative;
  display: grid;
  min-height: 24rem;
  place-items: center;
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: rgb(250 250 249);
  padding: 1rem;
}

.qrcode-canvas {
  width: min(20rem, 100%);
  height: auto;
  border: 1px solid rgb(231 229 228);
  border-radius: 0.375rem;
  background: white;
}

.qrcode-placeholder {
  position: absolute;
  color: rgb(168 162 158);
  font-size: 1rem;
  font-weight: 800;
  pointer-events: none;
}

.qrcode-error {
  color: rgb(153 27 27);
}

.download-list {
  display: grid;
  gap: 0.875rem;
}

.download-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: end;
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: rgb(250 250 249);
  padding: 0.875rem;
}

.copy-feedback {
  display: none;
  margin-top: 0.375rem;
  color: rgb(22 101 52);
  font-size: 0.8125rem;
  font-weight: 800;
}

.copy-feedback.is-visible {
  display: block;
}

@media (max-width: 640px) {
  .tools-search-row {
    grid-template-columns: 1fr;
  }

  .image-base64-details {
    grid-template-columns: 1fr;
  }

  .qrcode-layout {
    grid-template-columns: 1fr;
  }

  .tool-copy-row,
  .download-item {
    grid-template-columns: 1fr;
  }
}

.search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.375rem);
  right: 0;
  left: 0;
  max-height: 22rem;
  overflow: auto;
  border: 1px solid var(--tb-line);
  border-radius: 0.375rem;
  background: white;
  box-shadow: 0 18px 45px rgb(17 24 39 / 0.16);
}

.search-results:empty {
  display: none;
}

.mention-composer {
  position: relative;
}

.mention-composer textarea {
  padding-bottom: 2.75rem;
}

.mention-suggestions {
  position: absolute;
  z-index: 35;
  top: var(--mention-menu-top, 2.2rem);
  right: 0.5rem;
  left: 0.5rem;
  max-height: 7.75rem;
  overflow-y: auto;
  border: 1px solid rgb(214 211 209);
  border-radius: 0.375rem;
  background: rgb(255 255 255 / 0.98);
  box-shadow: 0 14px 30px rgb(17 24 39 / 0.14);
}

.mention-suggestion {
  display: flex;
  width: 100%;
  min-height: 2.15rem;
  align-items: center;
  gap: 0.45rem;
  border-bottom: 1px solid rgb(245 245 244);
  padding: 0.35rem 0.5rem;
  color: rgb(63 63 70);
  text-align: left;
}

.mention-suggestion:last-child {
  border-bottom: 0;
}

.mention-suggestion:hover,
.mention-suggestion.is-active {
  background: rgb(254 242 242);
}

.mention-suggestion span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--tb-red);
  padding: 0.12rem 0.45rem;
  color: white;
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1.25;
}

.mention-suggestion small {
  min-width: 0;
  overflow: hidden;
  color: rgb(63 63 70);
  font-size: 0.8125rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drop-zone {
  display: flex;
  min-height: 12rem;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 2px dashed rgb(252 165 165);
  border-radius: 0.5rem;
  background: rgb(254 242 242);
  padding: 2rem;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.drop-zone.is-dragover {
  border-color: var(--tb-red);
  background: rgb(255 228 230);
}

.drop-zone-title {
  color: var(--tb-red-dark);
  font-size: 1rem;
  font-weight: 800;
}

.drop-zone-text {
  color: rgb(82 82 91);
  font-size: 0.875rem;
}

.search-result {
  display: block;
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid rgb(245 245 244);
}

.search-result:hover {
  background: var(--tb-red-soft);
}

.search-result.is-active {
  background: var(--tb-red);
}

.search-result.is-active span,
.search-result.is-active small,
.search-result.is-active em {
  color: white;
}

.search-result span {
  display: block;
  color: var(--tb-ink);
  font-size: 0.875rem;
  font-weight: 700;
}

.search-result small {
  display: block;
  margin-top: 0.125rem;
  color: rgb(82 82 91);
  font-size: 0.75rem;
}

.search-result-idlieux,
.search-result-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.375rem;
}

.search-result-idlieux em,
.search-result-flags em {
  border: 1px solid rgb(254 202 202);
  border-radius: 999px;
  padding: 0.08rem 0.4rem;
  color: var(--tb-red-dark);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.search-result-flags em {
  border-color: rgb(214 211 209);
  background: rgb(245 245 244);
  color: rgb(63 63 70);
}

.intervention-card,
.delivery-card {
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: rgb(250 250 249);
  padding: 1rem;
}

.delivery-card {
  border-left: 0.25rem solid var(--tb-red);
}

.intervention-card-mentioned {
  border-color: rgb(251 146 60);
  border-left: 0.25rem solid rgb(234 88 12);
  background: rgb(255 247 237);
  box-shadow: 0 12px 26px rgb(154 52 18 / 0.12);
}

.mention-inline-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.55rem;
  border-radius: 999px;
  background: rgb(234 88 12);
  padding: 0.18rem 0.55rem;
  color: white;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.25;
}

.mention-inline-badge::before {
  content: "@";
  font-weight: 900;
}

.mention-inline-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.65rem;
}

.mention-inline-action {
  min-height: 1.75rem;
  border: 1px solid rgb(234 88 12);
  border-radius: 0.25rem;
  background: white;
  padding: 0.18rem 0.55rem;
  color: rgb(154 52 18);
  font-size: 0.75rem;
  font-weight: 800;
}

.mention-inline-action:hover {
  background: rgb(234 88 12);
  color: white;
}

.mention-summary-panel {
  border-color: rgb(251 146 60);
  background: rgb(255 252 248);
}

.mention-summary-subtitle {
  margin-top: 0.2rem;
  color: rgb(113 63 18);
  font-size: 0.8125rem;
  font-weight: 700;
}

.mention-text-token {
  color: rgb(154 52 18);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 0.11em;
  text-underline-offset: 0.14em;
}

.user-pseudo-form {
  display: flex;
  min-width: 12rem;
  align-items: center;
  gap: 0.35rem;
}

.user-pseudo-input {
  min-height: 2rem;
  width: 8.5rem;
  padding: 0.25rem 0.45rem;
  font-size: 0.8125rem;
}

.user-detail-box {
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: rgb(250 250 249);
  padding: 1rem;
}

.user-detail-list {
  display: grid;
  gap: 0.75rem;
}

.user-detail-list div {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: baseline;
}

.user-detail-list dt {
  color: rgb(113 113 122);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.user-detail-list dd {
  min-width: 0;
  overflow-wrap: anywhere;
  color: rgb(39 39 42);
  font-size: 0.9rem;
  font-weight: 700;
}

.return-card {
  border-left-color: rgb(14 116 144);
}

.appointment-dashboard-card {
  border-left-color: rgb(202 138 4);
}

.appointment-dashboard-card.is-today {
  border-color: rgb(252 165 165);
  border-left-color: var(--tb-red);
  background: rgb(254 242 242);
}

.dashboard-attention {
  display: inline-grid;
  width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  border-radius: 999px;
  background: var(--tb-red);
  color: white;
  font-size: 0.75rem;
  font-weight: 900;
}

.dashboard-foldable-layout {
  position: relative;
}

.dashboard-foldable-panel > summary {
  display: flex;
  min-height: 2.5rem;
  cursor: pointer;
  user-select: none;
  align-items: center;
  padding-right: 12rem;
  list-style: none;
}

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

.dashboard-foldable-panel > summary::before {
  content: "\25B8";
  margin-right: 0.5rem;
  color: var(--tb-red);
  font-size: 0.8125rem;
  font-weight: 900;
}

.dashboard-foldable-panel[open] > summary::before {
  content: "\25BE";
}

.dashboard-foldable-link {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
}

.dashboard-foldable-content {
  margin-top: 1rem;
}

.return-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.dashboard-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.dashboard-card-actions > details {
  min-width: 0;
}

.dashboard-card-actions > :last-child {
  justify-self: end;
}

.dashboard-card-actions-end {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.delivery-dashboard-action-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.btn-danger-soft {
  border-color: rgb(252 165 165);
  color: var(--tb-red-dark);
}

.btn-danger-soft:hover {
  border-color: var(--tb-red);
  background: rgb(254 242 242);
  color: var(--tb-red-dark);
}

.return-photo-button {
  cursor: pointer;
}

.return-photo-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.return-photo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.return-photo-thumb {
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid rgb(214 211 209);
  border-radius: 0.375rem;
  object-fit: cover;
}

.delivery-dashboard-details {
  border-top: 1px solid rgb(231 229 228);
  flex: 1 1 auto;
  padding-top: 0.65rem;
}

.dashboard-card-actions .delivery-dashboard-details {
  border-top: 0;
  padding-top: 0;
}

.delivery-dashboard-details summary {
  display: inline-flex;
  cursor: pointer;
  user-select: none;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgb(214 211 209);
  border-radius: 0.375rem;
  background: white;
  padding: 0.28rem 0.6rem;
  color: rgb(63 63 70);
  font-size: 0.8125rem;
  font-weight: 800;
}

.delivery-dashboard-details summary:hover {
  border-color: var(--tb-red);
  background: rgb(254 242 242);
  color: var(--tb-red-dark);
}

.delivery-dashboard-details summary::-webkit-details-marker {
  display: none;
}

.delivery-dashboard-details summary::before {
  content: "▸";
  color: var(--tb-red);
}

.delivery-dashboard-details[open] summary::before {
  content: "▾";
}

.delivery-dashboard-details summary small {
  color: rgb(113 113 122);
  font-size: 0.75rem;
  font-weight: 700;
}

.dashboard-delivery-items-table {
  width: 100%;
  margin-top: 0.75rem;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid rgb(231 229 228);
  border-radius: 0.375rem;
  background: white;
  font-size: 0.8125rem;
}

.dashboard-delivery-items-table th,
.dashboard-delivery-items-table td {
  border-bottom: 1px solid rgb(231 229 228);
  padding: 0.35rem 0.5rem;
  text-align: left;
}

.dashboard-delivery-items-table th {
  background: rgb(245 245 244);
  color: rgb(82 82 91);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-delivery-items-table td:first-child {
  color: rgb(63 63 70);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
}

.dashboard-delivery-items-table td:last-child {
  width: 4rem;
  text-align: right;
  font-weight: 800;
}

@media (max-width: 640px) {
  .dashboard-card-actions {
    grid-template-columns: 1fr;
  }

  .dashboard-card-actions > :last-child {
    justify-self: end;
  }

  .dashboard-foldable-panel > summary {
    padding-right: 0;
  }

  .dashboard-foldable-link {
    position: static;
    display: inline-flex;
    margin-top: 0.75rem;
  }
}

.supremo-alert-panel {
  border: 2px solid rgb(127 29 29);
  border-radius: 0.5rem;
  background: var(--tb-red);
  padding: 1rem;
  color: white;
  box-shadow: 0 18px 40px rgb(127 29 29 / 0.28);
}

.supremo-alert-title {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 900;
}

.supremo-alert-grid {
  display: grid;
  gap: 0.625rem;
}

.supremo-alert-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid rgb(254 202 202 / 0.55);
  border-radius: 0.375rem;
  background: rgb(127 29 29 / 0.34);
  padding: 0.75rem;
}

.supremo-client {
  color: white;
  font-size: 0.95rem;
  font-weight: 900;
}

.supremo-client:hover {
  text-decoration: underline;
}

.supremo-meta {
  margin-top: 0.15rem;
  color: rgb(255 228 230);
  font-size: 0.8125rem;
  font-weight: 700;
}

.supremo-values {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.supremo-copy {
  min-height: 2rem;
  max-width: 18rem;
  overflow: hidden;
  border: 1px solid white;
  border-radius: 0.25rem;
  background: white;
  padding: 0.25rem 0.625rem;
  color: var(--tb-red-dark);
  font-size: 0.8125rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supremo-copy:hover {
  background: rgb(254 242 242);
}

@media (max-width: 640px) {
  .supremo-alert-card {
    grid-template-columns: 1fr;
  }

  .supremo-values {
    justify-content: flex-start;
  }
}

.dashboard-load-more {
  display: flex;
  justify-content: center;
  padding: 1rem 0 0.25rem;
  color: rgb(113 113 122);
  font-size: 0.8125rem;
}

.dashboard-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem 1rem;
}

.dashboard-planning-today {
  margin-right: auto;
  color: rgb(82 82 91);
  font-size: 0.8125rem;
  font-weight: 700;
}

.dashboard-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.dashboard-info-banner {
  position: relative;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
}

.dashboard-info-banner-item {
  display: none;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  border: 1px solid rgb(214 211 209);
  border-radius: 0.5rem;
  background: white;
  padding: 0.875rem 1rem;
  box-shadow: 0 0.65rem 1.25rem rgb(17 24 39 / 0.08);
}

.dashboard-info-banner-item[hidden] {
  display: none !important;
}

.dashboard-info-banner-item.is-active {
  display: grid;
}

.dashboard-info-banner-importante {
  border-color: rgb(248 113 113);
  background: rgb(254 242 242);
  box-shadow: inset 0.28rem 0 0 var(--tb-red), 0 0.65rem 1.25rem rgb(127 29 29 / 0.12);
}

.dashboard-info-banner-normale {
  border-color: rgb(251 191 36);
  background: rgb(255 251 235);
  box-shadow: inset 0.28rem 0 0 rgb(202 138 4), 0 0.65rem 1.25rem rgb(120 113 108 / 0.08);
}

.dashboard-info-banner-basse {
  border-color: rgb(186 230 253);
  background: rgb(240 249 255);
  box-shadow: inset 0.28rem 0 0 rgb(14 116 144), 0 0.65rem 1.25rem rgb(14 116 144 / 0.08);
}

.dashboard-info-banner-badge {
  display: inline-flex;
  min-height: 1.65rem;
  align-items: center;
  border-radius: 999px;
  background: rgb(39 39 42);
  padding: 0.15rem 0.55rem;
  color: white;
  font-size: 0.6875rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-info-banner-content {
  min-width: 0;
  color: rgb(39 39 42);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.dashboard-info-banner-content p,
.dashboard-info-banner-content ul {
  margin: 0;
}

.dashboard-info-banner-content p + p,
.dashboard-info-banner-content p + ul,
.dashboard-info-banner-content ul + p {
  margin-top: 0.35rem;
}

.dashboard-info-banner-content ul {
  padding-left: 1rem;
  list-style: disc;
}

.dashboard-info-banner-content a {
  color: var(--tb-red-dark);
  text-decoration: underline;
}

.dashboard-info-banner-content code {
  border-radius: 0.25rem;
  background: rgb(255 255 255 / 0.8);
  padding: 0.05rem 0.25rem;
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 0.86em;
}

.dashboard-info-banner-dots {
  position: absolute;
  right: 0.75rem;
  bottom: 0.5rem;
  display: flex;
  gap: 0.375rem;
}

.dashboard-info-banner-dots span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: rgb(253 186 116);
}

.dashboard-info-banner-dots span.is-active {
  background: rgb(194 65 12);
}

@media (max-width: 640px) {
  .dashboard-topbar {
    align-items: stretch;
  }

  .dashboard-planning-today {
    width: 100%;
  }

  .dashboard-info-banner {
    padding-bottom: 0.6rem;
  }

  .dashboard-info-banner-item {
    grid-template-columns: 1fr;
  }
}

.scroll-top-button {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgb(254 202 202);
  border-radius: 999px;
  background: var(--tb-red);
  color: white;
  box-shadow: 0 1rem 2rem rgb(127 29 29 / 0.22);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem);
  transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.scroll-top-button:hover {
  background: var(--tb-red-dark);
}

.scroll-top-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.license-tabs {
  display: inline-flex;
  gap: 0.25rem;
  margin-bottom: 0.875rem;
  border: 1px solid rgb(254 202 202);
  border-radius: 999px;
  background: rgb(254 242 242);
  padding: 0.25rem;
}

.license-tab {
  border-radius: 999px;
  padding: 0.375rem 0.75rem;
  color: rgb(127 29 29);
  font-size: 0.8125rem;
  font-weight: 800;
}

.license-tab.is-active {
  background: var(--tb-red);
  color: white;
}

.licenses-list {
  display: grid;
  max-height: min(34rem, calc(100vh - 14rem));
  overflow: auto;
  gap: 0.625rem;
}

.license-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: rgb(250 250 249);
  padding: 0.875rem;
}

.license-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.license-info-table th,
.license-info-table td {
  border: 1px solid rgb(214 211 209);
  padding: 0.8rem;
  text-align: left;
}

.license-info-table th {
  background: rgb(245 245 244);
  color: rgb(68 64 60);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.license-info-table td:first-child {
  width: 30%;
  font-weight: 700;
}

.license-info-table code {
  color: rgb(63 63 70);
  font-family: Consolas, "Liberation Mono", monospace;
}

.admin-access-grid {
  display: grid;
  gap: 1rem;
}

.banner-management {
  display: grid;
  gap: 1rem;
}

.banner-editor-panel {
  border-top: 0.25rem solid var(--tb-red);
}

.banner-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.banner-editor-form {
  display: grid;
  gap: 0.875rem;
}

.banner-editor-message {
  min-width: 0;
}

.banner-markdown-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  border: 1px solid var(--tb-line);
  border-bottom: 0;
  border-radius: 0.375rem 0.375rem 0 0;
  background: rgb(250 250 249);
  padding: 0.4rem;
}

.banner-markdown-toolbar button {
  display: inline-flex;
  min-height: 1.9rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(214 211 209);
  border-radius: 0.25rem;
  background: white;
  padding: 0.2rem 0.55rem;
  color: rgb(63 63 70);
  font-size: 0.8125rem;
  font-weight: 800;
}

.banner-markdown-toolbar button:hover {
  border-color: var(--tb-red);
  color: var(--tb-red-dark);
}

.banner-markdown-input {
  width: 100%;
  min-height: 7rem;
  border-radius: 0 0 0.375rem 0.375rem;
  resize: vertical;
}

.banner-editor-fields {
  display: grid;
  grid-template-columns: minmax(11rem, 14rem) repeat(2, minmax(13rem, 1fr));
  gap: 0.875rem;
  align-items: end;
}

.banner-preview-block {
  display: grid;
  gap: 0.45rem;
}

.banner-markdown-preview {
  min-height: 3rem;
  border: 1px solid var(--tb-line);
  border-radius: 0.375rem;
  background: rgb(250 250 249);
  padding: 0.75rem;
  color: rgb(39 39 42);
  font-size: 0.875rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.banner-markdown-preview:empty::before {
  color: rgb(168 162 158);
  content: "Apercu du message";
}

.banner-markdown-preview p,
.banner-markdown-preview ul {
  margin: 0;
}

.banner-markdown-preview p + p,
.banner-markdown-preview p + ul,
.banner-markdown-preview ul + p {
  margin-top: 0.35rem;
}

.banner-markdown-preview ul {
  padding-left: 1rem;
  list-style: disc;
}

.banner-markdown-preview a {
  color: var(--tb-red-dark);
  text-decoration: underline;
}

.banner-markdown-preview code {
  border-radius: 0.25rem;
  background: white;
  padding: 0.05rem 0.25rem;
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 0.86em;
}

.banner-card-list {
  display: grid;
  gap: 0.875rem;
}

.banner-admin-card {
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: rgb(250 250 249);
  padding: 0.875rem;
}

.banner-admin-card-importante {
  border-color: rgb(252 165 165);
  box-shadow: inset 0.25rem 0 0 var(--tb-red);
}

.banner-admin-card-normale {
  border-color: rgb(253 224 71);
  box-shadow: inset 0.25rem 0 0 rgb(202 138 4);
}

.banner-admin-card-basse {
  border-color: rgb(186 230 253);
  box-shadow: inset 0.25rem 0 0 rgb(14 116 144);
}

.banner-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.banner-priority-pill {
  display: inline-flex;
  min-height: 1.6rem;
  align-items: center;
  border-radius: 999px;
  background: rgb(39 39 42);
  padding: 0.1rem 0.55rem;
  color: white;
  font-size: 0.6875rem;
  font-weight: 900;
  text-transform: uppercase;
}

.banner-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.banner-empty-state {
  border: 1px dashed rgb(214 211 209);
  border-radius: 0.375rem;
  background: rgb(250 250 249);
  padding: 0.875rem;
  color: rgb(113 113 122);
  font-size: 0.875rem;
  font-weight: 700;
}

@media (max-width: 760px) {
  .banner-editor-head {
    display: grid;
  }

  .banner-editor-fields {
    grid-template-columns: 1fr;
  }
}

.admin-access-wide {
  min-width: 0;
}

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

.admin-request-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
}

.admin-request-card {
  display: grid;
  gap: 0.35rem;
  border: 1px solid rgb(231 229 228);
  border-radius: 0.5rem;
  background: rgb(250 250 249);
  padding: 0.85rem;
}

.admin-request-card:hover,
.admin-request-card.is-selected {
  border-color: rgb(185 28 28);
  background: rgb(254 242 242);
}

.admin-request-card code {
  overflow-wrap: anywhere;
}

.admin-request-card span,
.admin-request-card small {
  color: rgb(87 83 78);
  font-size: 0.78rem;
}

.admin-request-card strong {
  color: rgb(28 25 23);
  font-size: 1rem;
}

.admin-access-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.admin-access-table th,
.admin-access-table td {
  border-bottom: 1px solid rgb(231 229 228);
  padding: 0.65rem;
  text-align: left;
  vertical-align: top;
}

.admin-access-table th {
  background: rgb(245 245 244);
  color: rgb(63 63 70);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-access-table code,
.admin-soap-card code {
  color: rgb(63 63 70);
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
}

.admin-status {
  display: inline-flex;
  min-height: 1.45rem;
  align-items: center;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 900;
}

.admin-status-ok {
  background: rgb(220 252 231);
  color: rgb(22 101 52);
}

.admin-status-warn {
  background: rgb(254 249 195);
  color: rgb(133 77 14);
}

.admin-status-error {
  background: rgb(254 226 226);
  color: rgb(153 27 27);
}

.admin-error,
.admin-error-cell {
  color: rgb(153 27 27);
  font-size: 0.78rem;
}

.admin-error-box {
  border: 1px solid rgb(254 202 202);
  border-radius: 0.375rem;
  background: rgb(254 242 242);
  padding: 0.75rem;
  color: rgb(153 27 27);
  font-size: 0.875rem;
  font-weight: 700;
}

.admin-soap-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  border: 1px solid rgb(231 229 228);
  border-radius: 0.5rem;
  background: rgb(250 250 249);
  padding: 0.875rem;
}

.admin-soap-label {
  color: rgb(82 82 91);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-chip {
  border: 1px solid rgb(214 211 209);
  border-radius: 999px;
  background: white;
  padding: 0.16rem 0.55rem;
  color: rgb(63 63 70);
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-filter-chip {
  border: 1px solid rgb(214 211 209);
  border-radius: 999px;
  background: white;
  padding: 0.25rem 0.7rem;
  color: rgb(63 63 70);
  font-size: 0.8125rem;
  font-weight: 800;
}

.admin-filter-chip:hover,
.admin-filter-chip.is-selected {
  border-color: var(--tb-red);
  background: rgb(254 242 242);
  color: var(--tb-red-dark);
}

.planning-page {
  max-width: 100%;
}

.planning-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.planning-title-block {
  min-width: 0;
  text-align: center;
}

.planning-week-title {
  color: var(--tb-ink);
  font-size: 1.25rem;
  font-weight: 900;
}

.planning-week-subtitle {
  margin-top: 0.15rem;
  color: rgb(82 82 91);
  font-size: 0.8125rem;
  font-weight: 700;
}

.planning-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.planning-legend span {
  display: inline-flex;
  min-height: 1.75rem;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgb(231 229 228);
  border-radius: 999px;
  background: white;
  padding: 0.2rem 0.7rem;
  color: rgb(63 63 70);
  font-size: 0.75rem;
  font-weight: 800;
}

.planning-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
}

.planning-dot-bureau {
  background: rgb(37 99 235);
}

.planning-dot-soir {
  background: rgb(22 163 74);
}

.planning-dot-remplacement {
  background: rgb(202 138 4);
}

.planning-dot-rdv {
  background: rgb(220 38 38);
}

.planning-dot-absence {
  background: var(--tb-red);
}

.planning-dot-repos {
  background: rgb(168 162 158);
}

.planning-alerts {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid rgb(252 165 165);
  border-radius: 0.5rem;
  background: rgb(254 242 242);
  padding: 0.875rem;
  color: rgb(127 29 29);
  font-size: 0.875rem;
  font-weight: 800;
}

.planning-board-panel {
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: white;
  box-shadow: 0 1px 2px rgb(17 24 39 / 0.08);
}

.planning-board-scroll {
  overflow-x: auto;
}

.planning-board-table {
  width: 100%;
  min-width: 68rem;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.planning-board-table th,
.planning-board-table td {
  border-right: 1px solid rgb(231 229 228);
  border-bottom: 1px solid rgb(231 229 228);
  vertical-align: top;
}

.planning-board-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgb(245 245 244);
  padding: 0.85rem 0.75rem;
  text-align: left;
}

.planning-person-head,
.planning-person {
  width: 13rem;
}

.planning-person {
  position: sticky;
  left: 0;
  z-index: 1;
  background: white;
  padding: 1rem;
  text-align: left;
}

.planning-person strong,
.planning-person span,
.planning-day-name,
.planning-day-date {
  display: block;
}

.planning-person strong {
  color: var(--tb-ink);
  font-size: 0.95rem;
  font-weight: 900;
}

.planning-person span {
  margin-top: 0.4rem;
  width: fit-content;
  border-radius: 999px;
  background: rgb(254 242 242);
  padding: 0.18rem 0.55rem;
  color: var(--tb-red-dark);
  font-size: 0.72rem;
  font-weight: 900;
}

.planning-day-name {
  color: var(--tb-ink);
  font-size: 0.92rem;
  font-weight: 900;
}

.planning-day-date {
  margin-top: 0.12rem;
  color: rgb(82 82 91);
  font-size: 0.75rem;
  font-weight: 800;
}

.planning-slot {
  height: 9rem;
  padding: 0.55rem;
  background: rgb(250 250 249);
}

.planning-slot-card {
  display: grid;
  min-height: 7.5rem;
  align-content: start;
  gap: 0.35rem;
  border: 1px solid rgb(231 229 228);
  border-radius: 0.5rem;
  background: white;
  padding: 0.75rem;
  box-shadow: inset 0 0 0 0.2rem transparent;
}

.planning-slot-label {
  color: rgb(24 24 27);
  font-size: 0.9rem;
  font-weight: 900;
}

.planning-slot-time {
  color: rgb(39 39 42);
  font-size: 0.82rem;
  font-weight: 800;
}

.planning-slot-comment {
  color: rgb(82 82 91);
  font-size: 0.72rem;
  font-weight: 700;
}

.planning-rdv-list {
  display: grid;
  max-height: 5.25rem;
  gap: 0.3rem;
  margin-top: 0.15rem;
  overflow-y: auto;
  padding-right: 0.1rem;
  scrollbar-width: thin;
}

.planning-rdv-item {
  display: grid;
  min-height: 2.7rem;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 0.15rem 0.35rem;
  align-items: center;
  border: 1px solid rgb(252 165 165);
  border-radius: 999px;
  background: rgb(255 247 247);
  padding: 0.28rem 0.55rem 0.32rem;
  color: rgb(127 29 29);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.85), 0 1px 2px rgb(127 29 29 / 0.08);
}

.planning-rdv-item:hover {
  border-color: var(--tb-red);
  background: white;
}

.planning-rdv-badge {
  display: inline-grid;
  min-width: 2rem;
  height: 1.25rem;
  place-items: center;
  border-radius: 999px;
  background: var(--tb-red);
  color: white;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
}

.planning-rdv-time,
.planning-rdv-client,
.planning-rdv-duration {
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planning-rdv-time {
  color: rgb(127 29 29);
}

.planning-rdv-client {
  color: rgb(24 24 27);
}

.planning-rdv-duration {
  color: rgb(153 27 27);
}

.planning-rdv-comment {
  grid-column: 2 / -1;
  overflow: hidden;
  color: rgb(82 82 91);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planning-calendar {
  display: grid;
  min-width: 58rem;
  grid-template-columns: minmax(10rem, 12rem) repeat(6, minmax(7rem, 1fr));
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: white;
  overflow: hidden;
}

.planning-head,
.planning-user-cell,
.planning-day {
  min-height: 5.25rem;
  border-right: 1px solid var(--tb-line);
  border-bottom: 1px solid var(--tb-line);
  padding: 0.75rem;
}

.planning-head {
  min-height: 3.25rem;
  background: rgb(245 245 244);
  color: rgb(63 63 70);
  font-size: 0.8125rem;
  font-weight: 800;
}

.planning-head span {
  display: block;
  margin-top: 0.15rem;
  color: rgb(113 113 122);
  font-weight: 700;
}

.planning-user-cell {
  background: rgb(250 250 249);
}

.planning-user-cell strong,
.planning-user-cell span {
  display: block;
}

.planning-user-cell span {
  margin-top: 0.35rem;
  color: var(--tb-red-dark);
  font-size: 0.8125rem;
  font-weight: 800;
}

.planning-day {
  display: grid;
  align-content: start;
  gap: 0.25rem;
  background: white;
}

.planning-day-label {
  font-size: 0.875rem;
  font-weight: 900;
}

.planning-day-time,
.planning-day-comment {
  color: rgb(82 82 91);
  font-size: 0.75rem;
  font-weight: 700;
}

.planning-bureau {
  background: rgb(239 246 255);
}

.planning-soir,
.planning-samedi {
  background: rgb(240 253 244);
}

.planning-remplacement {
  border-left: 0.25rem solid rgb(202 138 4);
  background: rgb(254 252 232);
}

.planning-modifie {
  border-left: 0.25rem solid rgb(37 99 235);
  background: rgb(239 246 255);
}

.planning-absence {
  border-left: 0.25rem solid var(--tb-red);
  background: rgb(254 242 242);
  color: rgb(127 29 29);
}

.planning-repos {
  background: rgb(250 250 249);
  color: rgb(113 113 122);
}

.planning-bureau .planning-slot-card {
  border-color: rgb(191 219 254);
  background: rgb(239 246 255);
  box-shadow: inset 0.25rem 0 0 rgb(37 99 235);
}

.planning-soir .planning-slot-card,
.planning-samedi .planning-slot-card {
  border-color: rgb(187 247 208);
  background: rgb(240 253 244);
  box-shadow: inset 0.25rem 0 0 rgb(22 163 74);
}

.planning-remplacement .planning-slot-card {
  border-color: rgb(254 240 138);
  background: rgb(254 252 232);
  box-shadow: inset 0.25rem 0 0 rgb(202 138 4);
}

.planning-modifie .planning-slot-card {
  border-color: rgb(191 219 254);
  background: rgb(239 246 255);
  box-shadow: inset 0.25rem 0 0 rgb(37 99 235);
}

.planning-absence .planning-slot-card {
  border-color: rgb(252 165 165);
  background: rgb(254 242 242);
  box-shadow: inset 0.25rem 0 0 var(--tb-red);
}

.planning-repos .planning-slot-card {
  background: rgb(245 245 244);
  color: rgb(113 113 122);
}

.planning-rdv-empty .planning-slot-card {
  background: rgb(255 255 255);
  color: rgb(113 113 122);
}

.planning-mini-action {
  width: fit-content;
  margin-top: 0.35rem;
  border: 1px solid rgb(191 219 254);
  border-radius: 0.25rem;
  background: white;
  padding: 0.125rem 0.4rem;
  color: rgb(30 64 175);
  font-size: 0.6875rem;
  font-weight: 800;
}

.planning-side,
.planning-form,
.planning-list {
  display: grid;
  gap: 1rem;
}

.planning-layout {
  display: grid;
  margin-top: 1rem;
}

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

.planning-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.planning-form-grid-three {
  grid-template-columns: 1fr 1fr 5.5rem;
}

.planning-bottom {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.planning-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: rgb(250 250 249);
  padding: 0.75rem;
}

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

.planning-list-item span,
.planning-list-item small {
  color: rgb(82 82 91);
  font-size: 0.8125rem;
}

.planning-history-item {
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: rgb(250 250 249);
  padding: 0.75rem;
}

.planning-history-item summary {
  cursor: pointer;
  color: rgb(63 63 70);
  font-size: 0.8125rem;
  font-weight: 700;
}

.planning-history-item summary strong,
.planning-history-item summary span {
  display: block;
}

.planning-history-item pre {
  max-height: 18rem;
  overflow: auto;
  margin-top: 0.75rem;
  border-radius: 0.375rem;
  background: white;
  padding: 0.75rem;
  color: rgb(63 63 70);
  font-size: 0.75rem;
}

@media (max-width: 1100px) {
  .planning-bottom {
    grid-template-columns: 1fr;
  }

  .planning-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .planning-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .planning-title-block {
    text-align: left;
  }

  .planning-form-grid,
  .planning-form-grid-three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .admin-soap-card {
    grid-template-columns: 1fr;
  }
}

.delivery-item-chip {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgb(254 202 202);
  border-radius: 0.375rem;
  background: white;
  padding: 0.25rem 0.55rem;
  color: rgb(63 63 70);
  font-size: 0.8125rem;
  font-weight: 700;
}

.delivery-item-chip:hover {
  border-color: var(--tb-red);
  background: rgb(254 242 242);
  color: var(--tb-red-dark);
}

.delivery-status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.delivery-status-chip {
  display: inline-flex;
  cursor: pointer;
  align-items: center;
}

.delivery-status-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.delivery-status-chip span {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  border: 1px solid rgb(254 202 202);
  border-radius: 999px;
  background: white;
  padding: 0.25rem 0.8rem;
  color: rgb(127 29 29);
  font-size: 0.875rem;
  font-weight: 700;
}

.delivery-status-chip input:checked + span {
  border-color: var(--tb-red);
  background: var(--tb-red);
  color: white;
}

.delivery-status-chip:focus-within span {
  outline: 2px solid rgb(248 113 113);
  outline-offset: 2px;
}

.billets-dialog,
.close-rdv-dialog,
.ship-dialog,
.licenses-dialog,
.stats-dialog {
  width: min(38rem, calc(100vw - 2rem));
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 25px 70px rgb(17 24 39 / 0.22);
}

.ship-dialog {
  width: min(46rem, calc(100vw - 2rem));
}

.close-rdv-dialog {
  width: min(42rem, calc(100vw - 2rem));
  max-height: min(44rem, calc(100vh - 2rem));
  overflow: auto;
}

.close-rdv-textarea {
  min-height: 8rem;
  resize: vertical;
}

.licenses-dialog {
  width: min(58rem, calc(100vw - 2rem));
}

.stats-dialog {
  width: min(72rem, calc(100vw - 2rem));
  max-height: min(48rem, calc(100vh - 2rem));
  overflow: auto;
}

#new-delivery-dialog,
#edit-delivery-dialog {
  width: min(48rem, calc(100vw - 2rem));
  max-height: min(48rem, calc(100vh - 2rem));
  overflow: auto;
}

.billets-dialog::backdrop,
.close-rdv-dialog::backdrop,
.ship-dialog::backdrop,
.licenses-dialog::backdrop,
.stats-dialog::backdrop {
  background: rgb(17 24 39 / 0.42);
}

.delivery-articles {
  max-height: 18rem;
  overflow: auto;
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: white;
}

.delivery-articles-header,
.delivery-article-row {
  display: grid;
  grid-template-columns: minmax(7rem, 0.9fr) minmax(10rem, 1.6fr) 6rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
}

.delivery-articles-header {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--tb-line);
  background: rgb(245 245 244);
  color: rgb(63 63 70);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.delivery-article-row {
  border-bottom: 1px solid rgb(245 245 244);
}

.delivery-article-row.has-quantity {
  border-bottom-color: rgb(254 202 202);
  background: rgb(255 241 242);
}

.delivery-article-row.has-quantity .delivery-article-code,
.delivery-article-row.has-quantity .delivery-article-label {
  color: rgb(127 29 29);
  font-weight: 800;
}

.delivery-article-row.has-quantity .delivery-article-qty {
  border-color: var(--tb-red);
  background: white;
  color: rgb(127 29 29);
  font-weight: 800;
}

.delivery-article-row:last-child {
  border-bottom: 0;
}

.delivery-article-code {
  color: rgb(63 63 70);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
}

.delivery-article-label {
  min-width: 0;
  color: rgb(39 39 42);
  font-size: 0.85rem;
}

.delivery-article-qty {
  min-height: 2.25rem;
  text-align: right;
}

.delivery-quote-checkbox {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  gap: 0.5rem;
  align-self: end;
  border: 1px solid rgb(252 211 77);
  border-radius: 0.375rem;
  background: rgb(255 251 235);
  padding: 0.55rem 0.7rem;
  color: rgb(113 63 18);
  font-size: 0.875rem;
  font-weight: 800;
}

.delivery-comment-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.hand-delivery-disabled {
  opacity: 0.52;
}

.hand-delivery-disabled input,
.hand-delivery-disabled textarea {
  cursor: not-allowed;
}

.latest-ticket-notice {
  margin: 0 0 0.75rem;
  border: 1px solid rgb(219 234 254);
  border-radius: 0.375rem;
  background: rgb(248 250 252);
  padding: 0.45rem 0.6rem;
}

.latest-ticket-title {
  color: rgb(71 85 105);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.latest-ticket-list {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.latest-ticket-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.latest-ticket-date {
  color: rgb(71 85 105);
  font-size: 0.72rem;
  font-weight: 800;
}

.latest-ticket-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ticket-color-chip {
  display: inline-flex;
  min-height: 1.35rem;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid rgb(203 213 225);
  border-radius: 999px;
  background: #fff;
  padding: 0.12rem 0.42rem;
  color: rgb(15 23 42);
  font-size: 0.68rem;
  font-weight: 800;
}

.ticket-color-prune {
  border-color: rgb(126 34 206);
  background: rgb(250 245 255);
  color: rgb(88 28 135);
}

.ticket-color-orange {
  border-color: rgb(251 146 60);
  background: rgb(255 247 237);
  color: rgb(154 52 18);
}

.ticket-color-bleu {
  border-color: rgb(59 130 246);
  background: rgb(239 246 255);
  color: rgb(30 64 175);
}

.ticket-color-gris {
  border-color: rgb(148 163 184);
  background: rgb(248 250 252);
  color: rgb(51 65 85);
}

.ticket-color-rouge {
  border-color: rgb(248 113 113);
  background: rgb(254 242 242);
  color: rgb(153 27 27);
}

.ticket-color-argent {
  border-color: rgb(148 163 184);
  background: linear-gradient(135deg, #fff, #e2e8f0);
  color: rgb(51 65 85);
}

.delivery-state-history {
  display: grid;
  max-height: 11rem;
  overflow: auto;
  gap: 0.5rem;
  border: 1px solid rgb(231 229 228);
  border-radius: 0.375rem;
  background: rgb(250 250 249);
  padding: 0.75rem;
}

.delivery-state-history-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
}

.delivery-state-history-dot {
  width: 0.65rem;
  height: 0.65rem;
  margin-top: 0.25rem;
  border: 2px solid rgb(254 202 202);
  border-radius: 999px;
  background: var(--tb-red);
}

.delivery-state-history-label {
  color: rgb(39 39 42);
  font-size: 0.85rem;
  font-weight: 800;
}

.delivery-state-history-meta {
  margin-top: 0.05rem;
  color: rgb(113 113 122);
  font-size: 0.75rem;
  font-weight: 600;
}

.delivery-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.delivery-table th,
.delivery-table td {
  border-bottom: 1px solid rgb(231 229 228);
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}

.delivery-table th {
  background: rgb(245 245 244);
  color: rgb(63 63 70);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.delivery-table tbody tr:hover {
  background: rgb(255 247 247);
}

.intervention-user-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.intervention-user-chip {
  display: inline-flex;
  cursor: pointer;
  align-items: center;
}

.intervention-user-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.intervention-user-chip span {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgb(254 202 202);
  border-radius: 999px;
  background: white;
  padding: 0.25rem 0.8rem;
  color: rgb(127 29 29);
  font-size: 0.875rem;
  font-weight: 700;
}

.intervention-user-chip small {
  color: inherit;
  font-size: 0.6875rem;
  opacity: 0.72;
}

.intervention-user-chip input:checked + span {
  border-color: var(--tb-red);
  background: var(--tb-red);
  color: white;
}

.intervention-user-chip:focus-within span {
  outline: 2px solid rgb(248 113 113);
  outline-offset: 2px;
}

.intervention-list-card {
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: white;
  padding: 0.875rem;
}

.intervention-list-card.is-current-user,
.interventions-table tr.is-current-user {
  background: rgb(255 247 247);
}

.interventions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.interventions-table th,
.interventions-table td {
  border-bottom: 1px solid rgb(231 229 228);
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}

.interventions-table th {
  background: rgb(245 245 244);
  color: rgb(63 63 70);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.interventions-table tbody tr:hover {
  background: rgb(255 247 247);
}

.stats-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--tb-line);
  padding-bottom: 1rem;
}

.delivery-stats-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--tb-line);
  padding-bottom: 1rem;
}

.delivery-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.delivery-stat-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: white;
  padding: 0.875rem;
}

.delivery-stat-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 999px;
  background: rgb(254 242 242);
  font-size: 1.25rem;
}

.delivery-stat-label {
  color: var(--tb-ink);
  font-weight: 800;
}

.delivery-stat-meta {
  color: rgb(113 113 122);
  font-size: 0.75rem;
}

.delivery-stat-value {
  color: var(--tb-red-dark);
  font-size: 1.5rem;
  font-weight: 900;
}

.delivery-stat-track {
  grid-column: 1 / -1;
  height: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(254 226 226);
}

.delivery-stat-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--tb-red);
}

.stats-grid {
  display: grid;
  gap: 1.25rem;
}

.stats-title {
  margin-bottom: 0.75rem;
  color: rgb(39 39 42);
  font-size: 0.875rem;
  font-weight: 800;
}

.stats-bars {
  display: flex;
  min-height: 14rem;
  align-items: end;
  gap: 0.45rem;
  overflow-x: auto;
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: linear-gradient(to top, rgb(250 250 249), white);
  padding: 1rem 0.75rem 0.75rem;
}

.stats-bars-period {
  min-height: 16rem;
}

.stats-bar-item {
  display: grid;
  min-width: 2.35rem;
  height: 100%;
  min-height: 12rem;
  grid-template-rows: 1.25rem 1fr 2rem;
  align-items: end;
  justify-items: center;
  gap: 0.35rem;
}

.stats-bar {
  width: 1.4rem;
  height: max(0.2rem, var(--bar-height));
  border-radius: 999px 999px 0.25rem 0.25rem;
  background: var(--tb-red);
  box-shadow: 0 0.35rem 0.9rem rgb(201 13 24 / 0.18);
}

.stats-bar-count {
  color: rgb(82 82 91);
  font-size: 0.6875rem;
  font-weight: 800;
}

.stats-bar-label {
  max-width: 4.5rem;
  color: rgb(82 82 91);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

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

  .delivery-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .stats-form,
  .delivery-stats-form {
    grid-template-columns: 1fr;
  }

  .delivery-stats-grid {
    grid-template-columns: 1fr;
  }
}

.client-card-title {
  color: var(--tb-ink);
  font-size: 1rem;
  font-weight: 800;
}

.client-card-title:hover {
  color: var(--tb-red);
}

.pill,
.pill-link,
.pill-alert,
.pill-danger,
.pill-deferred,
.pill-warning,
.pill-prepared {
  display: inline-flex;
  min-height: 1.5rem;
  align-items: center;
  border-radius: 0.25rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.pill {
  background: rgb(245 245 244);
  color: rgb(63 63 70);
}

.pill-alert {
  background: var(--tb-red);
  color: white;
}

.pill-danger {
  border: 1px solid rgb(185 28 28);
  background: rgb(254 226 226);
  color: rgb(127 29 29);
}

.pill-deferred {
  border: 1px solid rgb(251 146 60);
  background: rgb(255 237 213);
  color: rgb(154 52 18);
}

.pill-prepared {
  background: rgb(254 240 138);
  color: rgb(113 63 18);
}

.pill-warning {
  border: 1px solid rgb(252 211 77);
  background: rgb(255 251 235);
  color: rgb(113 63 18);
}

.archive-token-action {
  appearance: none;
  cursor: pointer;
  font-family: inherit;
}

.archive-token-action:hover {
  border-color: rgb(245 158 11);
}

.pill-link {
  border: 1px solid rgb(252 165 165);
  background: rgb(254 242 242);
  color: var(--tb-red-dark);
}

.pill-link:hover {
  border-color: var(--tb-red);
  background: var(--tb-red);
  color: white;
}

.version-age-alert {
  margin-left: 0.25rem;
  color: rgb(180 83 9);
  font-size: 0.75rem;
  line-height: 1;
}

.info-block,
.address-card {
  border: 1px solid var(--tb-line);
  border-radius: 0.375rem;
  background: rgb(250 250 249);
  padding: 0.875rem;
  font-size: 0.875rem;
}

.info-label {
  color: rgb(82 82 91);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.client-block-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgb(252 165 165);
  border-radius: 0.375rem;
  background: rgb(254 242 242);
  padding: 0.75rem;
  color: rgb(127 29 29);
  font-size: 0.875rem;
  font-weight: 800;
}

.client-block-checkbox input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--tb-red);
}

.client-block-alert {
  border: 1px solid rgb(248 113 113);
  border-radius: 0.375rem;
  background: rgb(254 242 242);
  padding: 0.875rem;
  color: rgb(127 29 29);
}

.client-block-alert-title {
  font-size: 0.9rem;
  font-weight: 900;
}

.client-block-alert-text {
  margin-top: 0.2rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.contact-link {
  color: var(--tb-red-dark);
  font-size: 0.875rem;
  font-weight: 700;
}

.contact-link:hover {
  text-decoration: underline;
}

.contact-row {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 0.35rem;
}

.copy-mini-button {
  border: 1px solid rgb(254 202 202);
  border-radius: 999px;
  background: white;
  padding: 0.08rem 0.4rem;
  color: var(--tb-red-dark);
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1.4;
}

.copy-mini-button:hover {
  background: rgb(254 242 242);
}

.quick-contact-form {
  display: flex;
  gap: 0.5rem;
}

.version-badge-group {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.pill-action {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgb(254 202 202);
  border-radius: 999px;
  background: white;
  padding: 0.2rem 0.5rem;
  color: var(--tb-red-dark);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.pill-action:hover {
  background: rgb(254 242 242);
}

.pill-action-preferred {
  border-color: rgb(134 239 172);
  background: rgb(240 253 244);
  color: rgb(21 128 61);
}

.pill-action-preferred:hover {
  background: rgb(220 252 231);
}

.idlieu-context-menu {
  position: fixed;
  z-index: 80;
  min-width: 12rem;
  overflow: hidden;
  border: 1px solid rgb(214 211 209);
  border-radius: 0.375rem;
  background: white;
  box-shadow: 0 18px 45px rgb(17 24 39 / 0.16);
}

.idlieu-context-menu[hidden] {
  display: none;
}

.idlieu-context-menu a {
  display: block;
  padding: 0.625rem 0.75rem;
  color: rgb(63 63 70);
  font-size: 0.8125rem;
  font-weight: 800;
}

.idlieu-context-menu a:hover {
  background: rgb(254 242 242);
  color: var(--tb-red-dark);
}

.client-flag-pill {
  display: inline-flex;
  min-height: 1.45rem;
  align-items: center;
  border: 1px solid rgb(214 211 209);
  border-radius: 999px;
  background: rgb(245 245 244);
  padding: 0.08rem 0.55rem;
  color: rgb(63 63 70);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
}

.client-flag-pill:hover,
.client-flag-pill.is-selected {
  border-color: var(--tb-red);
  background: rgb(254 242 242);
  color: var(--tb-red-dark);
}

.client-flags-picker,
.client-flags-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.client-flags-picker {
  max-height: 14rem;
  overflow: auto;
  border: 1px solid var(--tb-line);
  border-radius: 0.375rem;
  background: rgb(250 250 249);
  padding: 0.625rem;
}

.client-flag-option {
  display: inline-flex;
  cursor: pointer;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgb(214 211 209);
  border-radius: 999px;
  background: white;
  padding: 0.22rem 0.6rem;
  color: rgb(63 63 70);
  font-size: 0.78rem;
  font-weight: 800;
}

.client-flag-option:has(input:checked) {
  border-color: var(--tb-red);
  background: rgb(254 242 242);
  color: var(--tb-red-dark);
}

.search-result-danger {
  border-color: rgb(248 113 113) !important;
  background: rgb(254 226 226) !important;
  color: rgb(127 29 29) !important;
}

.clients-filter-form {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 0.75rem;
}

.client-archive-toggle {
  display: inline-flex;
  min-height: 2.5rem;
  cursor: pointer;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgb(214 211 209);
  border-radius: 0.375rem;
  background: white;
  padding: 0 0.7rem;
  color: rgb(63 63 70);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.client-archive-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.client-archive-toggle-control {
  position: relative;
  width: 1.9rem;
  height: 1.05rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgb(214 211 209);
  transition: background 0.15s ease;
}

.client-archive-toggle-control::after {
  position: absolute;
  top: 0.14rem;
  left: 0.14rem;
  width: 0.77rem;
  height: 0.77rem;
  border-radius: 999px;
  background: white;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.18);
  content: "";
  transition: transform 0.15s ease;
}

.client-archive-toggle input:checked + .client-archive-toggle-control {
  background: var(--tb-red);
}

.client-archive-toggle input:checked + .client-archive-toggle-control::after {
  transform: translateX(0.85rem);
}

.client-archive-toggle:hover {
  border-color: var(--tb-red);
  color: var(--tb-red-dark);
}

.client-flags-filter {
  margin-top: 0.875rem;
}

.client-flag-clear {
  display: inline-flex;
  min-height: 1.45rem;
  align-items: center;
  color: rgb(82 82 91);
  font-size: 0.75rem;
  font-weight: 800;
}

.client-flag-clear:hover {
  color: var(--tb-red-dark);
}

.clients-list {
  display: grid;
  gap: 0.75rem;
}

.client-list-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(8rem, 11rem) auto;
  gap: 1rem;
  align-items: start;
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: rgb(250 250 249);
  padding: 1rem;
}

.client-list-version {
  min-width: 0;
  justify-self: start;
}

.client-list-version::before {
  display: block;
  margin-bottom: 0.2rem;
  color: rgb(113 113 122);
  content: "Version";
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.client-list-version-value {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  color: var(--tb-ink);
  font-size: 0.875rem;
  font-weight: 800;
}

a.client-list-version-value:hover {
  color: var(--tb-red);
}

.client-list-version-date,
.client-list-version-empty {
  margin-top: 0.15rem;
  color: rgb(82 82 91);
  font-size: 0.75rem;
  font-weight: 700;
}

@media (max-width: 640px) {
  .clients-filter-form,
  .client-list-card {
    grid-template-columns: 1fr;
  }

  .client-list-version {
    justify-self: stretch;
  }
}

.specificites-box {
  border: 1px solid rgb(231 229 228);
  border-radius: 0.375rem;
  background: rgb(255 251 235);
  padding: 0.875rem 1rem;
}

.appointment-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 1rem;
  border: 1px solid rgb(254 202 202);
  border-radius: 0.5rem;
  border-color: rgb(254 202 202);
  background: rgb(255 247 247);
  padding: 0.875rem 1rem;
  box-shadow: inset 0.25rem 0 0 rgb(248 113 113);
}

.appointment-alert.info-block {
  display: block;
  padding: 0.875rem;
}

.appointment-alert-today {
  border-color: rgb(248 113 113);
  background: rgb(254 242 242);
  box-shadow: inset 0.25rem 0 0 var(--tb-red), 0 0 0 3px rgb(201 13 24 / 0.08);
}

.appointment-alert-icon {
  display: inline-grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border-radius: 999px;
  background: var(--tb-red);
  color: white;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
}

.appointment-alert-body {
  min-width: 0;
}

.appointment-alert-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.appointment-alert-title {
  margin-top: 0.1rem;
  color: rgb(24 24 27);
  font-size: 1rem;
  font-weight: 900;
}

.appointment-alert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
  color: rgb(82 82 91);
  font-size: 0.8125rem;
  font-weight: 800;
}

.appointment-alert-meta span {
  display: inline-flex;
  max-width: 100%;
  min-height: 1.35rem;
  align-items: center;
  border: 1px solid rgb(231 229 228);
  border-radius: 999px;
  background: white;
  padding: 0.05rem 0.5rem;
  overflow-wrap: anywhere;
}

.appointment-alert-comment {
  margin-top: 0.35rem;
  color: rgb(39 39 42);
  font-size: 0.875rem;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.appointment-alert-action {
  flex: 0 0 auto;
  white-space: nowrap;
}

.postes-dialog.appointment-dialog {
  width: min(62rem, calc(100vw - 2rem));
  max-height: min(44rem, calc(100vh - 2rem));
  overflow: hidden;
  border: 1px solid rgb(214 211 209);
  border-radius: 0.5rem;
  padding: 0;
  box-shadow: 0 25px 70px rgb(17 24 39 / 0.22);
}

.postes-dialog.appointment-dialog::backdrop {
  background: rgb(17 24 39 / 0.46);
}

.appointment-dialog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(19rem, 24rem);
  gap: 0;
  align-items: start;
  background: rgb(250 250 249);
}

.appointment-form-panel {
  min-width: 0;
  background: white;
  padding: 1.25rem;
}

.appointment-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.appointment-dialog-title {
  color: rgb(24 24 27);
  font-size: 1.125rem;
  font-weight: 900;
}

.appointment-dialog-subtitle {
  margin-top: 0.15rem;
  color: rgb(82 82 91);
  font-size: 0.8125rem;
  font-weight: 700;
}

.appointment-close-button {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(214 211 209);
  border-radius: 0.25rem;
  background: white;
  color: rgb(82 82 91);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.appointment-close-button:hover {
  border-color: var(--tb-red);
  color: var(--tb-red-dark);
}

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

.appointment-comment-input {
  min-height: 7rem;
  resize: vertical;
}

.appointment-field-help {
  display: block;
  margin-top: 0.45rem;
  border-left: 0.2rem solid rgb(214 211 209);
  padding-left: 0.625rem;
  color: rgb(82 82 91);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.appointment-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
  border-top: 1px solid var(--tb-line);
  padding-top: 1rem;
}

.appointment-side-panel {
  max-height: calc(100vh - 7rem);
  overflow: auto;
  border-left: 1px solid var(--tb-line);
  background: rgb(245 245 244);
  padding: 1.25rem;
}

.appointment-side-box {
  border: 1px solid rgb(231 229 228);
  border-radius: 0.5rem;
  background: white;
  padding: 0.875rem;
  box-shadow: 0 1px 2px rgb(17 24 39 / 0.05);
}

.appointment-side-title {
  color: rgb(24 24 27);
  font-size: 0.8125rem;
  font-weight: 900;
  text-transform: uppercase;
}

.appointment-side-subtitle {
  margin-top: 0.2rem;
  color: rgb(113 113 122);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
}

.appointment-side-list {
  display: grid;
  gap: 0.625rem;
  margin-top: 0.875rem;
}

.appointment-side-empty {
  border: 1px dashed rgb(214 211 209);
  border-radius: 0.375rem;
  background: rgb(250 250 249);
  padding: 0.875rem;
  color: rgb(113 113 122);
  font-size: 0.8125rem;
  font-weight: 700;
}

.appointment-side-item {
  border: 1px solid var(--tb-line);
  border-radius: 0.375rem;
  background: rgb(255 255 255);
  padding: 0.75rem;
  box-shadow: inset 0.18rem 0 0 rgb(214 211 209);
}

.appointment-side-item.is-today {
  border-color: rgb(252 165 165);
  background: rgb(254 242 242);
  box-shadow: inset 0.18rem 0 0 var(--tb-red);
}

.appointment-side-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.appointment-side-time {
  color: var(--tb-red-dark);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.2;
}

.appointment-side-badge {
  border: 1px solid rgb(252 165 165);
  border-radius: 999px;
  background: white;
  padding: 0.08rem 0.45rem;
  color: var(--tb-red-dark);
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

.appointment-side-client a,
.appointment-side-client {
  margin-top: 0.35rem;
  color: var(--tb-ink);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.25;
}

.appointment-side-client a:hover {
  color: var(--tb-red);
}

.appointment-side-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
  color: rgb(82 82 91);
  font-size: 0.75rem;
  font-weight: 700;
}

.appointment-side-meta span {
  display: inline-flex;
  min-height: 1.35rem;
  align-items: center;
  border: 1px solid rgb(231 229 228);
  border-radius: 999px;
  background: rgb(250 250 249);
  padding: 0.05rem 0.5rem;
}

.appointment-side-comment {
  margin-top: 0.5rem;
  border-top: 1px solid rgb(231 229 228);
  padding-top: 0.5rem;
  color: rgb(82 82 91);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: pre-line;
}

@media (max-width: 760px) {
  .appointment-dialog-grid,
  .appointment-form-grid {
    grid-template-columns: 1fr;
  }

  .appointment-alert-head {
    display: grid;
    gap: 0.75rem;
  }

  .appointment-alert-action {
    justify-self: start;
  }

  .postes-dialog.appointment-dialog {
    width: calc(100vw - 1rem);
  }

  .appointment-side-panel {
    max-height: 18rem;
    border-top: 1px solid var(--tb-line);
    border-left: 0;
    padding: 1rem;
  }
}

.specificites-title {
  margin-bottom: 0.5rem;
  color: rgb(24 24 27);
  font-size: 0.9375rem;
  font-weight: 800;
}

.specificites-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.specificites-title-row .specificites-title {
  margin-bottom: 0;
}

.specificites-list {
  list-style: disc;
  padding-left: 1.15rem;
  color: rgb(24 24 27);
  font-size: 0.875rem;
}

.specificites-list li + li {
  margin-top: 0.25rem;
}

.specificites-list span {
  margin-left: 0.25rem;
}

.specificites-table-wrap {
  max-height: 28rem;
  overflow: auto;
  border: 1px solid rgb(231 229 228);
  border-radius: 0.375rem;
  background: white;
}

.specificites-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.specificites-table th,
.specificites-table td {
  border-bottom: 1px solid rgb(231 229 228);
  padding: 0.35rem 0.5rem;
  text-align: left;
  vertical-align: middle;
}

.specificites-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgb(255 251 235);
  color: rgb(82 82 91);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.specificites-table td:first-child {
  width: 14rem;
  color: rgb(39 39 42);
  font-weight: 700;
}

.specificite-row-filled {
  background: rgb(254 242 242);
  box-shadow: inset 3px 0 0 var(--tb-red);
}

.specificite-row-filled td:first-child {
  color: rgb(127 29 29);
}

.specificite-row-empty td:first-child {
  color: rgb(82 82 91);
}

.specificite-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.specificite-filled-pill {
  flex: 0 0 auto;
  border: 1px solid rgb(252 165 165);
  border-radius: 999px;
  background: white;
  padding: 0.1rem 0.35rem;
  color: var(--tb-red);
  font-size: 0.6875rem;
  font-weight: 800;
}

.specificite-comment-input {
  min-height: 2.35rem;
  resize: vertical;
}

.specificite-row-filled .specificite-comment-input {
  border-color: rgb(248 113 113);
  background: white;
}

.intervention-timeline {
  position: relative;
  margin-top: 0.75rem;
}

.intervention-timeline::before {
  position: absolute;
  top: 0.35rem;
  bottom: 0.35rem;
  left: 0.45rem;
  width: 0.125rem;
  border-radius: 999px;
  background: linear-gradient(to bottom, var(--tb-red), rgb(251 191 36), rgb(214 211 209));
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.75rem;
  padding: 0.15rem 0 1rem;
}

.timeline-item + .timeline-item {
  border-top: 1px solid rgb(245 245 244);
  padding-top: 1rem;
}

.timeline-marker {
  position: relative;
  z-index: 1;
  margin-top: 0.2rem;
  width: 1rem;
  height: 1rem;
  border: 0.2rem solid white;
  border-radius: 999px;
  background: rgb(168 162 158);
  box-shadow: 0 0 0 1px rgb(214 211 209);
}

.timeline-fresh .timeline-marker {
  background: var(--tb-red);
  box-shadow: 0 0 0 2px rgb(254 202 202);
}

.timeline-recent .timeline-marker {
  background: rgb(251 191 36);
  box-shadow: 0 0 0 1px rgb(253 230 138);
}

.timeline-old {
  color: rgb(87 83 78);
}

.timeline-old .timeline-content {
  opacity: 0.82;
}

.timeline-mentioned {
  border-radius: 0.5rem;
  background: rgb(255 247 237);
  padding: 0.75rem 0.75rem 1rem 0;
}

.timeline-mentioned + .timeline-item {
  margin-top: 0.5rem;
}

.timeline-mentioned .timeline-marker {
  background: rgb(234 88 12);
  box-shadow: 0 0 0 2px rgb(254 215 170);
}

.timeline-mentioned .timeline-content {
  opacity: 1;
}

.timeline-meta {
  color: rgb(82 82 91);
  font-size: 0.75rem;
}

.timeline-description-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.timeline-description-row p {
  min-width: 0;
  margin: 0;
}

.timeline-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  place-items: center;
  border: 1px solid rgb(231 229 228);
  border-radius: 0.375rem;
  background: white;
  font-size: 0.95rem;
  line-height: 1;
}

.timeline-tbsupport-change .timeline-description-row {
  gap: 0.35rem;
}

.timeline-tbsupport-change .timeline-icon {
  width: 1.05rem;
  height: 1.05rem;
  border-color: transparent;
  background: transparent;
  color: rgb(120 113 108);
  font-size: 0.75rem;
}

.timeline-tbsupport-change .timeline-description-row p {
  color: rgb(82 82 91);
  font-size: 0.75rem;
}

.timeline-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.timeline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.client-mail-panel {
  padding: 0;
}

.client-mail-panel-alert {
  border-color: rgb(248 113 113);
  box-shadow: inset 0.25rem 0 0 var(--tb-red), 0 0 0 3px rgb(201 13 24 / 0.08);
}

.client-mail-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  min-height: 3.25rem;
  cursor: pointer;
  list-style: none;
  padding: 1rem;
}

.client-mail-summary::-webkit-details-marker {
  display: none;
}

.client-mail-alert-icon {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 999px;
  background: rgb(231 229 228);
  color: rgb(82 82 91);
  font-size: 0.875rem;
  font-weight: 900;
}

.client-mail-panel-alert .client-mail-alert-icon {
  background: var(--tb-red);
  color: white;
}

.client-mail-summary-meta {
  display: block;
  margin-top: 0.15rem;
  color: rgb(82 82 91);
  font-size: 0.8125rem;
  font-weight: 700;
}

.client-mail-summary-action {
  border: 1px solid rgb(214 211 209);
  border-radius: 999px;
  background: white;
  padding: 0.15rem 0.55rem;
  color: rgb(82 82 91);
  font-size: 0.6875rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.client-mail-panel-alert .client-mail-summary-action {
  border-color: rgb(252 165 165);
  background: rgb(254 242 242);
  color: var(--tb-red-dark);
}

.client-mail-archive-panel {
  opacity: 0.92;
}

.client-mail-archive-panel .client-mail-summary {
  min-height: 2.75rem;
  padding-block: 0.75rem;
}

.client-mail-list {
  display: grid;
  gap: 0.75rem;
  border-top: 1px solid var(--tb-line);
  padding: 1rem;
}

.client-mail-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.875rem;
  align-items: start;
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: rgb(250 250 249);
  padding: 0.875rem;
}

.client-mail-card.is-urgent {
  border-color: rgb(252 165 165);
  background: rgb(254 242 242);
  box-shadow: inset 0.2rem 0 0 var(--tb-red);
}

.client-mail-card-archived {
  background: white;
}

.client-mail-card-main {
  min-width: 0;
}

.client-mail-date {
  color: rgb(113 113 122);
  font-size: 0.75rem;
  font-weight: 800;
}

.client-mail-subject {
  margin-top: 0.15rem;
  color: rgb(24 24 27);
  font-size: 0.9375rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.client-mail-sender,
.client-mail-preview {
  margin-top: 0.25rem;
  color: rgb(82 82 91);
  font-size: 0.8125rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.client-mail-preview {
  max-height: 2.8rem;
  overflow: hidden;
}

.client-mail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.mail-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.45rem;
  background: white;
  padding: 0.45rem 0.8rem;
  color: rgb(51 65 85);
  font-size: 0.875rem;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.mail-action-button:hover {
  border-color: rgb(148 163 184);
  background: rgb(248 250 252);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
}

.mail-action-open {
  border-color: rgb(14 116 144);
  background: rgb(236 254 255);
  color: rgb(21 94 117);
}

.mail-action-open:hover {
  border-color: rgb(8 145 178);
  background: rgb(207 250 254);
}

.mail-action-attach {
  border-color: rgb(202 138 4);
  background: rgb(254 252 232);
  color: rgb(133 77 14);
}

.mail-action-attach:hover {
  border-color: rgb(234 179 8);
  background: rgb(254 249 195);
}

.mail-action-archive {
  border-color: rgb(203 213 225);
  background: rgb(248 250 252);
  color: rgb(71 85 105);
}

.mail-action-archive:hover {
  border-color: rgb(148 163 184);
  background: rgb(241 245 249);
}

.mail-action-supremo {
  width: 2.35rem;
  min-width: 2.35rem;
  padding: 0.25rem;
}

.mail-action-supremo-img {
  display: block;
  width: 1.55rem;
  height: 1.55rem;
  object-fit: contain;
}

.mail-action-compact {
  min-height: 2rem;
  padding: 0.38rem 0.65rem;
  font-size: 0.8125rem;
}

.mail-action-compact.mail-action-supremo {
  width: 2.1rem;
  min-width: 2.1rem;
  padding: 0.2rem;
}

.supremo-clipboard-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 9999;
  max-width: min(22rem, calc(100vw - 2rem));
  transform: translateY(0.5rem);
  border: 1px solid rgb(187 247 208);
  border-radius: 0.375rem;
  background: rgb(240 253 244);
  box-shadow: 0 12px 30px rgb(15 23 42 / 0.18);
  color: rgb(22 101 52);
  opacity: 0;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 800;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

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

.mail-token-editor {
  display: flex;
  min-height: 2.5rem;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.375rem;
  background: white;
  padding: 0.3rem;
}

.mail-token-editor:focus-within {
  border-color: rgb(14 116 144);
  box-shadow: 0 0 0 3px rgb(14 116 144 / 0.12);
}

.mail-token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mail-token {
  display: inline-flex;
  max-width: 100%;
  min-height: 1.75rem;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid rgb(186 230 253);
  border-radius: 999px;
  background: rgb(240 249 255);
  padding: 0.2rem 0.35rem 0.2rem 0.65rem;
  color: rgb(12 74 110);
  font-size: 0.8125rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.mail-token-remove {
  display: inline-grid;
  width: 1.15rem;
  height: 1.15rem;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgb(186 230 253);
  color: rgb(12 74 110);
  font-size: 0.875rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.mail-token-remove:hover {
  background: rgb(125 211 252);
}

.mail-token-input {
  min-width: 9rem;
  flex: 1 1 9rem;
  border: 0;
  outline: 0;
  padding: 0.25rem 0.2rem;
  color: rgb(39 39 42);
  font: inherit;
}

.client-mail-urgent-pill {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  border-radius: 999px;
  background: var(--tb-red);
  padding: 0.2rem 0.6rem;
  color: white;
  font-size: 0.75rem;
  font-weight: 900;
}

.client-mail-dialog {
  width: min(88rem, calc(100vw - 2rem));
}

.client-mail-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.client-mail-dialog-body {
  display: grid;
  gap: 0.875rem;
  min-width: 0;
}

.client-mail-dialog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(28rem, 0.85fr);
  gap: 1rem;
  min-height: 0;
}

.client-mail-reply-panel {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  min-width: 0;
  border-left: 1px solid var(--tb-line);
  padding-left: 1rem;
}

.client-mail-compose {
  display: grid;
  gap: 0.75rem;
}

.client-mail-compose.hidden,
.client-mail-sent-reply.hidden {
  display: none;
}

.client-mail-sent-reply {
  display: grid;
  gap: 0.45rem;
  border: 1px solid rgb(187 247 208);
  border-radius: 0.5rem;
  background: rgb(240 253 244);
  padding: 0.875rem;
}

.client-mail-sent-reply-meta,
.client-mail-sent-reply-recipients {
  color: rgb(82 82 91);
  font-size: 0.8125rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.client-mail-sent-reply-subject {
  color: rgb(22 101 52);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.client-mail-sent-reply-body {
  max-height: 24rem;
  overflow: auto;
  white-space: pre-wrap;
  color: rgb(39 39 42);
  font-size: 0.875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.client-mail-dialog-content,
.client-mail-voicemail-text {
  max-height: 28rem;
  overflow: auto;
  border: 1px solid var(--tb-line);
  border-radius: 0.375rem;
  background: rgb(250 250 249);
  padding: 0.875rem;
  color: rgb(39 39 42);
  font-size: 0.875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.client-mail-voicemail-text {
  white-space: pre-wrap;
}

.mail-rendered-body {
  color: rgb(24 24 27);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.mail-rendered-body p,
.mail-rendered-body div {
  margin: 0 0 0.75rem;
}

.mail-rendered-body p:last-child,
.mail-rendered-body div:last-child {
  margin-bottom: 0;
}

.mail-rendered-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.5rem 0;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.375rem;
  background: white;
}

.mail-rendered-body table {
  max-width: 100%;
  border-collapse: collapse;
}

.mail-rendered-body td,
.mail-rendered-body th {
  border: 1px solid rgb(226 232 240);
  padding: 0.25rem 0.4rem;
  vertical-align: top;
}

.mail-rendered-body blockquote,
.mail-quoted-history {
  margin-top: 0.75rem;
  border-left: 0.25rem solid rgb(203 213 225);
  background: rgb(248 250 252);
  color: rgb(71 85 105);
}

.mail-rendered-body blockquote {
  margin-left: 0;
  padding: 0.625rem 0.75rem;
}

.mail-quoted-history {
  border-radius: 0.375rem;
  padding: 0.625rem 0.75rem;
}

.mail-quoted-history.hidden,
.mail-attachments.hidden {
  display: none;
}

.mail-quoted-title,
.mail-attachments-title {
  margin-bottom: 0.4rem;
  color: rgb(100 116 139);
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mail-attachments {
  margin-top: 0.75rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 0.375rem;
  background: white;
  padding: 0.625rem;
}

.mail-attachments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mail-attachment-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.375rem;
  background: rgb(248 250 252);
  padding: 0.35rem 0.55rem;
  color: rgb(30 64 175);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
}

.mail-attachment-link:hover {
  border-color: rgb(37 99 235);
  background: rgb(239 246 255);
}

.mail-attachment-image {
  display: grid;
  gap: 0.35rem;
  width: min(12rem, 100%);
  border: 1px solid rgb(203 213 225);
  border-radius: 0.375rem;
  background: rgb(248 250 252);
  padding: 0.4rem;
  color: rgb(30 64 175);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.mail-attachment-image img {
  display: block;
  width: 100%;
  max-height: 8rem;
  object-fit: contain;
  border-radius: 0.25rem;
  background: white;
}

.mail-attachment-image span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-attachment-image:hover {
  border-color: rgb(37 99 235);
  background: rgb(239 246 255);
}

.client-mail-voicemail {
  display: grid;
  gap: 0.5rem;
}

.client-mail-voicemail.hidden {
  display: none;
}

.client-mail-voicemail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.client-mail-voicemail-text {
  max-height: 12rem;
  background: rgb(236 254 255);
  color: rgb(22 78 99);
}

.client-mail-reply-body {
  min-height: 16rem;
  resize: vertical;
}

.client-mail-suggestions {
  display: grid;
  gap: 0.5rem;
}

.client-mail-suggestion-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.client-mail-ai-box {
  display: grid;
  gap: 0.5rem;
  border: 1px solid var(--tb-line);
  border-radius: 0.375rem;
  background: rgb(250 250 249);
  padding: 0.625rem;
}

.client-mail-ai-box textarea {
  min-height: 5rem;
  background: white;
}

.client-mail-ai-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.client-mail-send-status {
  border: 1px solid var(--tb-line);
  border-radius: 0.375rem;
  background: rgb(250 250 249);
  padding: 0.625rem 0.75rem;
  color: rgb(82 82 91);
  font-size: 0.875rem;
  font-weight: 700;
}

.client-mail-send-status-error {
  border-color: rgb(254 202 202);
  background: rgb(254 242 242);
  color: rgb(153 27 27);
}

.client-mail-send-status-success {
  border-color: rgb(167 243 208);
  background: rgb(236 253 245);
  color: rgb(6 95 70);
}

@media (max-width: 760px) {
  .client-mail-summary,
  .client-mail-card {
    grid-template-columns: 1fr;
  }

  .client-mail-actions {
    justify-content: flex-start;
  }

  .client-mail-dialog-grid {
    grid-template-columns: 1fr;
  }

  .client-mail-reply-panel {
    border-top: 1px solid var(--tb-line);
    border-left: 0;
    padding-top: 1rem;
    padding-left: 0;
  }
}

.timeline-delete-button {
  min-height: 1.5rem;
  border: 1px solid rgb(254 202 202);
  border-radius: 0.25rem;
  background: rgb(254 242 242);
  padding: 0.125rem 0.45rem;
  color: var(--tb-red-dark);
  font-size: 0.75rem;
  font-weight: 700;
}

.timeline-delete-button:hover {
  border-color: var(--tb-red);
  background: var(--tb-red);
  color: white;
}

.postes-dialog,
.specificites-dialog {
  width: min(72rem, calc(100vw - 2rem));
  max-height: min(44rem, calc(100vh - 2rem));
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 25px 70px rgb(17 24 39 / 0.22);
}

.postes-dialog::backdrop,
.specificites-dialog::backdrop {
  background: rgb(17 24 39 / 0.42);
}

.postes-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.postes-table-wrap {
  max-height: 34rem;
  overflow: auto;
  border: 1px solid var(--tb-line);
  border-radius: 0.375rem;
}

.postes-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 0.875rem;
}

.postes-table th,
.postes-table td {
  border-bottom: 1px solid rgb(231 229 228);
  padding: 0.625rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.postes-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgb(245 245 244);
  color: rgb(63 63 70);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.poste-row-old {
  background: rgb(244 244 245);
  color: rgb(113 113 122);
}

.poste-version-late {
  color: var(--tb-red);
  font-weight: 800;
}

.poste-history {
  position: relative;
}

.poste-history summary {
  min-height: 1.75rem;
  cursor: pointer;
  border: 1px solid rgb(252 165 165);
  border-radius: 999px;
  background: white;
  padding: 0.25rem 0.75rem;
  color: var(--tb-red-dark);
  font-size: 0.75rem;
  font-weight: 800;
  list-style: none;
}

.poste-history summary::-webkit-details-marker {
  display: none;
}

.poste-history-list {
  position: absolute;
  z-index: 10;
  top: calc(100% + 0.4rem);
  left: 0;
  display: grid;
  width: max-content;
  min-width: 13rem;
  max-height: 18rem;
  overflow: auto;
  border: 1px solid var(--tb-line);
  border-radius: 0.5rem;
  background: white;
  padding: 0.375rem;
  box-shadow: 0 16px 40px rgb(17 24 39 / 0.16);
}

.poste-history-link {
  border-radius: 0.375rem;
  padding: 0.45rem 0.625rem;
  color: rgb(63 63 70);
  font-size: 0.8125rem;
  font-weight: 700;
}

.poste-history-link:hover,
.poste-history-link.is-current {
  background: rgb(254 242 242);
  color: var(--tb-red-dark);
}

.poste-details summary {
  cursor: pointer;
  color: var(--tb-red-dark);
  font-weight: 700;
}

.poste-details dl {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.625rem;
  max-width: 32rem;
}

.poste-details dt {
  color: rgb(82 82 91);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.poste-details dd {
  max-height: 11rem;
  overflow: auto;
  border: 1px solid rgb(231 229 228);
  border-radius: 0.25rem;
  background: rgb(250 250 249);
  padding: 0.5rem;
}

.poste-detail-block {
  border: 1px solid var(--tb-line);
  border-radius: 0.375rem;
  background: rgb(250 250 249);
  padding: 0.875rem;
}

.poste-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.poste-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.copy-button {
  border: 1px solid rgb(252 165 165);
  border-radius: 999px;
  background: white;
  padding: 0.25rem 0.625rem;
  color: var(--tb-red-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.copy-button:hover {
  border-color: var(--tb-red);
  background: rgb(254 242 242);
}

.poste-detail-block pre {
  margin-top: 0.5rem;
  max-height: 26rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgb(39 39 42);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.ini-highlight {
  background: rgb(255 255 255);
}

.ini-section {
  color: var(--tb-red-dark);
  font-weight: 800;
}

.ini-comment {
  color: rgb(113 113 122);
  font-style: italic;
}

.ini-key {
  color: rgb(30 64 175);
  font-weight: 700;
}

.ini-separator {
  color: rgb(82 82 91);
  font-weight: 700;
}

.ini-value {
  color: rgb(39 39 42);
}

.report-billet-view {
  margin-top: 0.5rem;
}

.report-table-wrap {
  max-height: 30rem;
  overflow: auto;
  border: 1px solid rgb(231 229 228);
  border-radius: 0.375rem;
  background: white;
}

.report-table {
  width: 100%;
  min-width: 60rem;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.report-table th,
.report-table td {
  border-bottom: 1px solid rgb(231 229 228);
  padding: 0.5rem 0.625rem;
  text-align: right;
  white-space: nowrap;
}

.report-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgb(254 242 242);
  color: rgb(63 63 70);
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
}

.report-table th:first-child,
.report-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  text-align: left;
}

.report-table th:first-child {
  z-index: 3;
  background: rgb(254 226 226);
}

.report-table td:first-child {
  background: white;
}

.report-period {
  color: var(--tb-red-dark);
  font-weight: 800;
}

.report-leftovers {
  margin-top: 0.75rem;
  border-left: 0.25rem solid rgb(252 165 165);
  padding-left: 0.75rem;
  color: rgb(63 63 70);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.8125rem;
  white-space: pre-wrap;
}

.report-error-view {
  margin-top: 0.5rem;
}

.error-report-list {
  display: grid;
  gap: 0.625rem;
}

.error-report-item {
  display: grid;
  grid-template-columns: minmax(8.5rem, 11rem) 1fr;
  overflow: hidden;
  border: 1px solid rgb(231 229 228);
  border-radius: 0.375rem;
  background: white;
}

.error-report-date {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border-right: 1px solid rgb(254 202 202);
  background: rgb(254 242 242);
  padding: 0.625rem 0.75rem;
  color: rgb(82 82 91);
  font-size: 0.75rem;
  font-weight: 700;
}

.error-report-date strong {
  color: var(--tb-red-dark);
  font-size: 0.9375rem;
}

.error-report-message {
  padding: 0.625rem 0.75rem;
  color: rgb(24 24 27);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.error-report-message div + div {
  margin-top: 0.35rem;
}

.help-content {
  max-width: 72rem;
  overflow: auto;
  color: rgb(39 39 42);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.help-content img {
  max-width: 100%;
  height: auto;
}

.help-editor-form {
  max-width: 72rem;
}

.help-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
  border: 1px solid var(--tb-line);
  border-bottom: 0;
  border-radius: 0.5rem 0.5rem 0 0;
  background: rgb(250 250 249);
  padding: 0.5rem;
}

.help-editor-toolbar button,
.help-editor-image-button {
  display: inline-flex;
  min-height: 2rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(214 211 209);
  border-radius: 0.375rem;
  background: white;
  padding: 0.25rem 0.65rem;
  color: rgb(41 37 36);
  font-size: 0.875rem;
  font-weight: 700;
}

.help-editor-toolbar button:hover,
.help-editor-image-button:hover {
  border-color: var(--tb-red);
  color: var(--tb-red-dark);
}

.help-editor-image-button input {
  display: none;
}

.help-editor {
  min-height: 28rem;
  border: 1px solid var(--tb-line);
  border-radius: 0 0 0.5rem 0.5rem;
  background: white;
  padding: 1rem;
  line-height: 1.55;
  outline: none;
}

.help-editor:focus {
  border-color: var(--tb-red);
  box-shadow: 0 0 0 3px rgb(201 13 24 / 0.12);
}

.help-editor img {
  max-width: 100%;
  height: auto;
}

.login-card {
  border-top: 0.25rem solid var(--tb-red);
}
