: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);
}

.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;
}

@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;
}

.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;
}

.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 {
  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;
}

.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);
}

.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);
}

.billets-dialog,
.ship-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));
}

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

.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);
}

.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-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-prepared {
  background: rgb(254 240 138);
  color: rgb(113 63 18);
}

.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;
}

.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;
}

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

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

.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;
}

.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-meta {
  color: rgb(82 82 91);
  font-size: 0.75rem;
}

.postes-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 {
  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-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-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;
}

.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;
}

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