.invoices-page .responsive-page-header #btn-import-facture { margin-left: auto; }
.eys-ticket-entry {
  margin-left: .55rem;
  padding: .5rem .9rem;
  border: 1px solid var(--primary, #00a86b);
  border-radius: 8px;
  background: transparent;
  color: var(--primary, #00a86b);
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.eys-ticket-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, .7);
}
.eys-ticket-panel {
  box-sizing: border-box;
  width: min(100%, 1060px);
  max-height: 94vh;
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--border, #374151);
  border-radius: 14px;
  background: var(--bg-card, #111827);
  color: var(--text-main, #f9fafb);
  box-shadow: 0 20px 70px rgba(0, 0, 0, .5);
}
.eys-ticket-header, .eys-ticket-footer, .eys-ticket-page-head, .eys-ticket-page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.eys-ticket-header, .eys-ticket-page-head { justify-content: space-between; }
.eys-ticket-header h2 { margin: 0; font-size: 1.3rem; }
.eys-ticket-close, .eys-ticket-secondary, .eys-ticket-remove {
  padding: 8px 12px;
  border: 1px solid var(--border, #4b5563);
  border-radius: 8px;
  background: transparent;
  color: var(--text-main, #f9fafb);
  font: inherit;
  cursor: pointer;
}
.eys-ticket-secondary.active { border-color: var(--primary, #00a86b); color: var(--primary, #00a86b); }
.eys-ticket-intro { margin: 12px 0; color: var(--text-muted, #a1a1aa); }
.eys-ticket-file-label {
  display: inline-block;
  margin: 5px 0 4px;
  padding: 10px 14px;
  border: 1px dashed var(--primary, #00a86b);
  border-radius: 8px;
  color: var(--primary, #00a86b);
  font-weight: 700;
  cursor: pointer;
}
.eys-ticket-file-label input { display: block; margin-top: 8px; max-width: 100%; font: inherit; }
.eys-ticket-status { min-height: 20px; margin: 8px 0; color: var(--text-muted, #a1a1aa); font-size: .85rem; }
.eys-ticket-error { padding: 9px 12px; border-radius: 8px; background: rgba(220, 38, 38, .13); color: #ffb0b0; }
.eys-ticket-error[hidden] { display: none; }
.eys-ticket-help { margin: 10px 0; font-size: .85rem; color: var(--text-muted, #a1a1aa); }
.eys-ticket-pages { display: grid; gap: 18px; }
.eys-ticket-page { padding: 14px; border: 1px solid var(--border, #374151); border-radius: 10px; }
.eys-ticket-page-head { flex-wrap: wrap; margin-bottom: 12px; }
.eys-ticket-surface { position: relative; width: min(100%, 720px); margin: 0 auto; touch-action: none; }
.eys-ticket-surface.drawing { cursor: crosshair; }
.eys-ticket-page-image { display: block; width: 100%; height: auto; border-radius: 5px; }
.eys-ticket-box {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 2px 5px;
  border: 2px solid #10b981;
  border-radius: 3px;
  background: rgba(16, 185, 129, .09);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
  text-shadow: 0 1px 2px #000;
}
.eys-ticket-box.temporary { border-style: dashed; border-color: #f59e0b; background: rgba(245, 158, 11, .1); }
.eys-ticket-crops { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.eys-ticket-crop {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(100%, 230px);
  max-width: 100%;
  padding: 8px;
  border: 1px solid var(--border, #374151);
  border-radius: 8px;
}
.eys-ticket-thumbnail { width: 46px; height: 62px; object-fit: contain; background: #fff; }
.eys-ticket-crop-description { display: flex; flex-direction: column; min-width: 0; gap: 2px; font-size: .8rem; }
.eys-ticket-crop-description span { color: var(--text-muted, #a1a1aa); font-size: .72rem; }
.eys-ticket-remove { margin-left: auto; padding: 6px; font-size: .72rem; }
.eys-ticket-footer {
  position: sticky;
  bottom: -20px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin: 18px -20px -20px;
  padding: 15px 20px;
  border-top: 1px solid var(--border, #374151);
  background: var(--bg-card, #111827);
}
.eys-ticket-count { margin-right: auto; font-size: .85rem; color: var(--text-muted, #a1a1aa); }
.eys-ticket-primary {
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--primary, #00a86b);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.eys-ticket-primary:disabled, .eys-ticket-secondary:disabled { opacity: .5; cursor: not-allowed; }
.eys-ticket-footer [hidden] { display: none; }
@media (max-width: 700px) {
  .invoices-page .responsive-page-header { flex-wrap: wrap; gap: 8px; }
  .invoices-page .responsive-page-header h1 { width: 100%; }
  .invoices-page .responsive-page-header #btn-import-facture { margin-left: 0; }
  .eys-ticket-entry { margin-left: 0; }
  .eys-ticket-panel { padding: 14px; }
  .eys-ticket-footer { bottom: -14px; margin: 16px -14px -14px; padding: 12px 14px; }
  .eys-ticket-count { width: 100%; }
}
