/* CDSA Tickets – Admin UI */
.cdsa-tickets-wrap { margin-top: 10px; }
.cdsa-hero{
  display:flex; align-items:center; justify-content:space-between;
  background: linear-gradient(135deg, rgba(0,0,0,.75), rgba(0,0,0,.55));
  border-radius:16px; padding:18px 18px; color:#fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  margin: 10px 0 18px;
}
.cdsa-hero__title{ margin:0; padding:0; font-size: 26px; line-height:1.1; color:#fff; }
.cdsa-hero__subtitle{ opacity:.9; margin-top:6px; max-width: 70ch; }
.cdsa-btn-primary{ display:inline-flex; gap:8px; align-items:center; border-radius: 999px !important; padding: 6px 14px !important; }
.cdsa-btn{ border-radius: 999px !important; display:inline-flex; gap:8px; align-items:center; }
.cdsa-grid{ display:grid; gap:16px; }
.cdsa-grid--2{ grid-template-columns: 2fr 1fr; }
@media (max-width: 1100px){
  .cdsa-grid--2{ grid-template-columns: 1fr; }
  .cdsa-hero{ flex-direction: column; align-items:flex-start; gap:12px; }
}
.cdsa-card{
  background:#fff; border:1px solid rgba(0,0,0,.08);
  border-radius:16px; padding:16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}
.cdsa-card--side h3{ margin-top: 6px; }
.cdsa-form .cdsa-field{ margin-bottom: 14px; }
.cdsa-form label{ font-weight: 600; display:block; margin-bottom: 6px; }
.cdsa-required{ color:#d63638; }
.cdsa-input, .cdsa-select{
  width:100%; border-radius: 12px !important;
  border:1px solid rgba(0,0,0,.18) !important;
  padding: 10px 12px !important;
}
.cdsa-choice{ display:flex; gap:10px; flex-wrap: wrap; }
.cdsa-radio{
  display:flex; align-items:center; gap:8px;
  padding:10px 12px; border:1px solid rgba(0,0,0,.12);
  border-radius: 12px; cursor:pointer; background:#fafafa;
}
.cdsa-radio input{ margin-top:0; }
.cdsa-actions{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top: 10px; }
.cdsa-hint{ font-size: 12px; opacity:.8; margin-top: 8px; }
.cdsa-list{ margin: 10px 0 0 16px; }
.cdsa-note{ margin-top: 12px; padding: 10px 12px; background: #f6f7f7; border-radius: 12px; border:1px dashed rgba(0,0,0,.15); }

.cdsa-toolbar{ display:flex; justify-content:space-between; align-items:center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cdsa-chips{ display:flex; gap:8px; flex-wrap: wrap; }
.cdsa-chip{
  text-decoration:none;
  padding: 7px 12px;
  border-radius: 999px;
  border:1px solid rgba(0,0,0,.14);
  background:#fff;
  display:inline-flex; align-items:center;
}
.cdsa-chip--active{
  border-color: rgba(0,0,0,.35);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  font-weight: 700;
}
.cdsa-search{ display:flex; gap:8px; align-items:center; }
.cdsa-search__input{
  border-radius: 999px !important;
  border:1px solid rgba(0,0,0,.18) !important;
  padding: 8px 12px !important;
  min-width: 260px;
}
.cdsa-muted{ color: rgba(0,0,0,.60); }
.cdsa-mini{ font-size: 12px; margin-left: 6px; }

.cdsa-table{ display:flex; flex-direction:column; gap: 6px; }
.cdsa-table__head, .cdsa-row{
  display:grid; grid-template-columns: 120px 1.6fr 160px 140px 150px 150px;
  gap: 10px; align-items:center;
}
.cdsa-table__head{
  padding: 10px 12px;
  font-weight: 700;
  border-bottom: 1px solid rgba(0,0,0,.08);
  color: rgba(0,0,0,.70);
}
.cdsa-row{
  padding: 10px 12px;
  border:1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  background: #fff;
}
.cdsa-row:hover{ box-shadow: 0 10px 24px rgba(0,0,0,.08); }
.cdsa-row__title a{ font-weight: 800; text-decoration:none; }
.cdsa-row__id{ font-size: 12px; opacity:.6; margin-top: 2px; }

.cdsa-pill{
  display:inline-flex; gap:8px; align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: #fafafa;
}
.cdsa-pill--prio{ font-weight: 700; }
.cdsa-pill--low{ opacity:.8; }
.cdsa-pill--high{ border-color: rgba(214, 54, 56, .35); background: rgba(214,54,56,.06); }

.cdsa-badge{
  display:inline-flex; align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .2px;
  border: 1px solid rgba(0,0,0,.10);
}


.cdsa-empty{ text-align:center; padding: 30px 10px; }
.cdsa-empty__title{ font-size: 18px; font-weight: 900; margin-bottom: 6px; }
.cdsa-empty__subtitle{ opacity:.75; margin-bottom: 14px; }

.cdsa-mt{ margin-top: 16px; }
.cdsa-detail-head{ display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.cdsa-detail-title{ font-size: 18px; font-weight: 900; }
.cdsa-detail-id{ font-weight: 700; opacity:.6; }
.cdsa-detail-badges{ display:flex; gap:8px; flex-wrap:wrap; margin-top: 8px; }
.cdsa-section{ margin-top: 16px; }
.cdsa-section h3{ margin: 0 0 8px; }
.cdsa-content{ background:#fafafa; border:1px solid rgba(0,0,0,.06); border-radius: 14px; padding: 12px; }

.cdsa-thread{ display:flex; flex-direction:column; gap:10px; }
.cdsa-bubble{
  padding: 10px 12px;
  border-radius: 16px;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
}
.cdsa-bubble--me{
  background: rgba(0,114,198,.07);
  border-color: rgba(0,114,198,.18);
}
.cdsa-bubble__head{ margin-bottom: 6px; }
.cdsa-divider{ height:1px; background: rgba(0,0,0,.08); margin: 14px 0; }
.cdsa-shortcuts{ display:flex; flex-direction:column; gap:10px; }
.cdsa-shortcut{
  text-decoration:none;
  display:flex; gap:8px; align-items:center;
  padding: 10px 12px;
  border-radius: 14px;
  border:1px solid rgba(0,0,0,.10);
  background:#fafafa;
}
.cdsa-file{
  display:inline-flex; gap:8px; align-items:center;
  padding: 8px 10px; border-radius: 12px;
  border: 1px solid rgba(0,0,0,.10);
  text-decoration:none;
  margin: 6px 6px 0 0;
  background:#fff;
}
.cdsa-files{ display:flex; flex-wrap:wrap; }
.cdsa-toast{ margin-top: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(0,0,0,.12); background: #f6f7f7; }
.cdsa-toast--error{ background: rgba(214,54,56,.08); border-color: rgba(214,54,56,.25); }


/* Private upload chips */
.cdsa-file-chip{display:inline-flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid #dfe6ee;border-radius:12px;background:#fbfcfe;font-weight:600;margin:6px 8px 0 0;}
.cdsa-file-rm{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;border:1px solid #e7eef6;text-decoration:none;line-height:1;color:#1f2937;font-weight:800}
.cdsa-file-rm:hover{background:#fff;color:#b42318;border-color:#ffd0d0}
/* Front tickets */
.cdsa-tickets-wrap {
  max-width: 900px;
  margin: 40px auto;
}

.cdsa-tickets-wrap .cdsa-card {
  padding: 24px;
}

.cdsa-tickets-wrap .cdsa-actions {
  margin-top: 24px;
}
.cdsa-toast--float{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  max-width: 360px;
  transform: translateY(12px);
  opacity: 0;
  transition: all .25s ease;
}

.cdsa-toast--float.is-visible{
  transform: translateY(0);
  opacity: 1;
}
#cdsa-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cdsa-popup {
    background: #fff;
    border-radius: 12px;
    max-width: 520px;
    width: 90%;
    padding: 32px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    animation: cdsaPopIn .25s ease-out;
}

.cdsa-popup h2 {
    margin-top: 0;
    font-size: 24px;
}

.cdsa-popup p {
    font-size: 16px;
    margin: 20px 0;
}

@keyframes cdsaPopIn {
    from { transform: scale(.9); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
/* Badge base */
.cdsa-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  font-weight:700;
  font-size:12px;
  line-height:1;
  border:1px solid rgba(0,0,0,.08);
}

/* =========================================
   BADGES STATUT (fond rempli)
   ========================================= */
.cdsa-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  animation: cdsa-pop 0.35s ease;
}
.cdsa-badge{ background:#f3f4f6 !important; border:1px solid transparent !important; }
.cdsa-badge--new{ background:#e0f2fe !important; color:#075985 !important; border-color:#7dd3fc !important; }
.cdsa-badge--triage{ background:#fef3c7 !important; color:#92400e !important; border-color:#fbbf24 !important; }
.cdsa-badge--doing{ background:#ede9fe !important; color:#5b21b6 !important; border-color:#c4b5fd !important; }
.cdsa-badge--waiting{ background:#ffedd5 !important; color:#9a3412 !important; border-color:#fdba74 !important; }
.cdsa-badge--done{ background:#dcfce7 !important; color:#166534 !important; border-color:#86efac !important; }
.cdsa-badge--rejected{ background:#fee2e2 !important; color:#991b1b !important; border-color:#fca5a5 !important; }
.cdsa-badge--closed{ background:#f3f4f6 !important; color:#374151 !important; border-color:#d1d5db !important; }
@keyframes cdsa-pop {
  from { transform: scale(.85); opacity:0; }
  to   { transform: scale(1);   opacity:1; }
}

/* Priorités (optionnel mais stylé) */
.cdsa-pill--prio.cdsa-pill--low    { background:#f3f4f6; }
.cdsa-pill--prio.cdsa-pill--normal { background:#eef2ff; }
.cdsa-pill--prio.cdsa-pill--high   { background:#fee2e2; }

/* Popup overlay (si pas déjà) */
#cdsa-popup-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:999999;
}

.cdsa-popup{
  background:#fff;
  border-radius:14px;
  padding:18px 18px 14px;
  max-width:520px;
  width:calc(100% - 28px);
  box-shadow:0 18px 60px rgba(0,0,0,.25);
}

.cdsa-popup h2{ margin:0 0 10px; }
.cdsa-popup p{ margin:0 0 14px; }

