  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f4f6fa;
    color: #1f2937;
    line-height: 1.5;
    padding: 24px;
  }
  .container { max-width: 1500px; margin: 0 auto; }
  header {
    background: linear-gradient(135deg, #2d004b, #520a8a);
    color: white;
    padding: 24px 28px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(45, 0, 75, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
  }
  header .titles h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
  header .titles p { opacity: 0.9; font-size: 14px; }
  header .header-actions { display: flex; gap: 10px; }

  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
  }
  .stat-card {
    background: white;
    padding: 18px 20px;
    border-radius: 10px;
    border-left: 4px solid #6b7280;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }
  .stat-card.total { border-left-color: #2d004b; }
  .stat-card.open { border-left-color: #f59e0b; }
  .stat-card.progress { border-left-color: #8b5cf6; }
  .stat-card.resolved { border-left-color: #10b981; }
  .stat-card.urgent { border-left-color: #ef4444; }
  .stat-label { font-size: 12px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
  .stat-value { font-size: 28px; font-weight: 700; margin-top: 4px; }
  .stat-pct {
    font-size: 14px;
    font-weight: 600;
    color: #10b981;
    background: #d1fae5;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
  }

  .panel {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }
  .panel h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
  }
  .form-field { display: flex; flex-direction: column; }
  .form-field.full { grid-column: 1 / -1; }
  label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
  }
  label .required { color: #ef4444; }
  input, select, textarea {
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: border-color 0.15s, box-shadow 0.15s;
  }
  input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #2d004b;
    box-shadow: 0 0 0 3px rgba(45, 0, 75, 0.15);
  }
  textarea { resize: vertical; min-height: 80px; }

  .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    justify-content: flex-end;
  }
  button {
    padding: 9px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
  }
  .btn-primary { background: #2d004b; color: white; }
  .btn-primary:hover { background: #1f0033; }
  .btn-secondary { background: #e5e7eb; color: #374151; }
  .btn-secondary:hover { background: #d1d5db; }
  .btn-danger { background: #fee2e2; color: #b91c1c; }
  .btn-danger:hover { background: #fecaca; }
  .btn-success { background: #10b981; color: white; }
  .btn-success:hover { background: #059669; }
  .btn-white { background: white; color: #2d004b; }
  .btn-white:hover { background: #f3f4f6; }

  .filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
  }
  .filters input, .filters select {
    padding: 7px 10px;
    font-size: 13px;
  }
  .filters .search { flex: 1; min-width: 220px; }

  .date-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #faf7fd;
    border: 1px solid #ede9fe;
    border-radius: 10px;
  }
  .date-filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .date-filter-group label {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }
  .date-filters input[type="date"], .date-filters select {
    padding: 6px 8px;
    font-size: 13px;
  }
  .filter-count {
    margin-left: auto;
    font-size: 12px;
    color: #6b7280;
    background: white;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
  }
  .filter-count strong { color: #2d004b; }

  .table-wrapper { overflow-x: auto; }
  table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  th {
    background: #f9fafb;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
  }
  th:hover { background: #f3f4f6; }
  td {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
  }
  tr:hover td { background: #fafbfc; }

  .badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }
  .badge-priority-Critique { background: #fee2e2; color: #b91c1c; }
  .badge-priority-Haute { background: #fed7aa; color: #c2410c; }
  .badge-priority-Moyenne { background: #fef3c7; color: #b45309; }
  .badge-priority-Basse { background: #ede9fe; color: #5b21b6; }
  .badge-status-Nouveau { background: #fef3c7; color: #b45309; }
  .badge-status-EnCours { background: #ede9fe; color: #6d28d9; }
  .badge-status-EnAttente { background: #ede9fe; color: #5b21b6; }
  .badge-status-Resolu { background: #d1fae5; color: #065f46; }
  .badge-status-Ferme { background: #f3f4f6; color: #374151; }
  .badge-type-Bug { background: #fee2e2; color: #b91c1c; }
  .badge-type-Support { background: #ede9fe; color: #2d004b; }
  .badge-type-Demande { background: #ede9fe; color: #6d28d9; }

  .row-actions { display: flex; gap: 6px; }
  .icon-btn {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 5px 9px;
    font-size: 12px;
    cursor: pointer;
    color: #4b5563;
  }
  .icon-btn:hover { background: #f3f4f6; }
  .icon-btn.delete { color: #b91c1c; }
  .icon-btn.delete:hover { background: #fee2e2; }

  .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
  }
  .empty-state h3 { font-size: 16px; margin-bottom: 6px; color: #6b7280; }

  .toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
  }
  .toolbar .spacer { flex: 1; }

  .modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 100;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
  }
  .modal-backdrop.active { display: flex; }
  .modal {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    overflow: hidden;
    animation: modal-in 0.18s ease-out;
  }
  @keyframes modal-in {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
  .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  .modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
  }
  .modal-close {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
  }
  .modal-close:hover { background: #f3f4f6; color: #1f2937; }
  .modal-body {
    padding: 24px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
  }
  .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f9fafb;
  }

  .toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1f2937;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 200;
  }
  .toast.show { transform: translateY(0); opacity: 1; }
  .toast.success { background: #10b981; }
  .toast.error { background: #ef4444; }

  .hidden { display: none !important; }

  .reporter-cell {
    font-size: 12px;
    line-height: 1.3;
  }
  .reporter-cell .reporter-name { font-weight: 500; }
  .reporter-cell .reporter-email { color: #6b7280; font-size: 11px; }

  .info-banner {
    background: #f5edff;
    border: 1px solid #d8b4fe;
    color: #2d004b;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
  }
  .info-banner code {
    background: white;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
  }

  .attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: #374151;
    text-decoration: none;
    margin: 2px 4px 2px 0;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .attachment-chip:hover { background: #ede9fe; color: #2d004b; border-color: #d8b4fe; }
  .attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 220px;
  }
  .att-count {
    display: inline-block;
    background: #2d004b;
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
  }
  .att-count:hover { background: #1f0033; }

  .drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    background: #f8fafc;
    transition: all 0.15s;
  }
  .drop-zone.dragover {
    border-color: #2d004b;
    background: #eff6ff;
  }
  .drop-zone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .uploaded-files {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
  }
  .uploaded-file {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 10px;
  }
  .uploaded-file .uf-icon { font-size: 18px; }
  .uploaded-file .uf-info { flex: 1; min-width: 0; }
  .uploaded-file .uf-name {
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .uploaded-file .uf-meta {
    font-size: 11px;
    color: #6b7280;
  }
  .uploaded-file .uf-actions { display: flex; gap: 4px; }
  .uploaded-file img.uf-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
  }
  .uf-source {
    display: inline-block;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    background: #ecfdf5;
    color: #065f46;
    margin-left: 6px;
  }
  .uf-source.external { background: #f3f4f6; color: #6b7280; }

  .warning-item {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #fde68a;
    background: #fffbeb;
    border-radius: 8px;
    margin-bottom: 8px;
  }
  .warning-item .w-icon { font-size: 20px; line-height: 1.2; }
  .warning-item .w-content { flex: 1; }
  .warning-item .w-title { font-weight: 600; font-size: 14px; color: #92400e; margin-bottom: 2px; }
  .warning-item .w-detail { font-size: 13px; color: #78350f; line-height: 1.4; }

  .warning-empty {
    padding: 20px;
    text-align: center;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    color: #065f46;
  }
