.rf-mode-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 6px;
}

.rf-mode-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1 1 220px;
  padding: 0.9rem 1.3rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  background: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  color: #495057;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.rf-mode-card i {
  font-size: 1.15rem;
  color: #bc4f5e;
}
.rf-mode-card:hover {
  border-color: #bc4f5e;
  background: #f8e8ea;
}
.rf-mode-card.active {
  border-color: #bc4f5e;
  background: #f8e8ea;
  color: #722f37;
}

.recours-page {
  background: #f8f9fa;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.recours-container {
  max-width: 900px;
  margin: 0 auto;
}

.recours-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.recours-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: #722f37;
  color: #fff;
  flex-wrap: wrap;
  gap: 1rem;
}
.recours-header__left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.recours-header__icon {
  font-size: 2rem;
  width: 3rem;
  height: 3rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.recours-header__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.recours-header__subtitle {
  font-size: 0.9rem;
  opacity: 0.8;
  margin: 0;
}
.recours-header__back {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  font-weight: 500;
  transition: background 0.2s;
}
.recours-header__back:hover {
  background: rgba(255, 255, 255, 0.25);
}

.recours-body {
  padding: 2rem;
}

.recours-stepper {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}
.recours-stepper__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #999;
}
.recours-stepper__item.is-active {
  color: #bc4f5e;
}
.recours-stepper__item.is-done {
  color: #722f37;
}
.recours-stepper__circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.is-active .recours-stepper__circle {
  background: #bc4f5e;
  color: #fff;
}
.is-done .recours-stepper__circle {
  background: #722f37;
  color: #fff;
}
.recours-stepper__line {
  flex: 1;
  height: 2px;
  background: #e9ecef;
  margin: 0 0.8rem;
}
.recours-stepper__line.is-done {
  background: #722f37;
}
.recours-stepper__label {
  font-size: 0.85rem;
  font-weight: 500;
  display: none;
}
@media (min-width: 600px) {
  .recours-stepper__label {
    display: inline;
  }
}

.rf-section {
  margin-bottom: 2rem;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 1.5rem;
}
.rf-section:last-child {
  border-bottom: none;
}
.rf-section__header {
  margin-bottom: 0.8rem;
}
.rf-section__title {
  font-weight: 600;
  font-size: 1.05rem;
  color: #212529;
}
.rf-section__hint {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.rf-required {
  color: #dc3545;
  margin-left: 0.2rem;
  font-weight: 700;
}

.rf-optional {
  color: #6c757d;
  font-size: 0.8rem;
  font-weight: 400;
  margin-left: 0.5rem;
}

.rf-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
@media (max-width: 600px) {
  .rf-grid-2 {
    grid-template-columns: 1fr;
  }
}

.rf-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.rf-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
}

.rf-input, .rf-select, .rf-textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.rf-input:focus, .rf-select:focus, .rf-textarea:focus {
  border-color: #bc4f5e;
  outline: none;
  box-shadow: 0 0 0 3px rgba(188, 79, 94, 0.15);
}

.rf-textarea {
  resize: vertical;
  min-height: 80px;
}

.rf-input-group {
  display: flex;
  gap: 0.5rem;
}
.rf-input-group .rf-input {
  flex: 1;
}

.rf-btn-verify {
  background: #bc4f5e;
  color: #fff;
  border: none;
  padding: 0 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s;
}
.rf-btn-verify:hover {
  background: #722f37;
}
.rf-btn-verify:disabled {
  opacity: 0.6;
}

.rf-success-text {
  color: #28a745;
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.rf-error-text {
  color: #dc3545;
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.rf-field-error {
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.rf-text-muted {
  color: #6c757d;
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

.rf-badge-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: #bc4f5e;
  background: #f8e8ea;
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
}

.rf-parties-container {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 1rem;
}
@media (max-width: 700px) {
  .rf-parties-container {
    flex-direction: column;
  }
}

.rf-parties-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e9e9ec;
  border-top: 4px solid #8a8f98;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}
.rf-parties-col--appelant {
  border-top-color: #bc4f5e;
}
.rf-parties-col--intime {
  border-top-color: #51708c;
}
.rf-parties-col__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  background: #fafafa;
  border-bottom: 1px solid #eee;
  font-weight: 600;
  font-size: 0.9rem;
  color: #495057;
}
.rf-parties-col__header i {
  margin-right: 0.35rem;
  color: inherit;
}
.rf-parties-col--appelant .rf-parties-col__header i {
  color: #bc4f5e;
}
.rf-parties-col--intime .rf-parties-col__header i {
  color: #51708c;
}
.rf-parties-col__count {
  font-size: 0.72rem;
  font-weight: 700;
  color: #6c757d;
  background: #eee;
  padding: 0.1rem 0.55rem;
  border-radius: 20px;
  flex-shrink: 0;
}
.rf-parties-col > .rf-field-error {
  padding: 0 0.9rem 0.75rem;
}

.rf-dropzone {
  transition: background-color 0.15s ease;
}
.rf-dropzone--active {
  background: #f8e8ea;
}

.rf-party-list {
  min-height: 70px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
}
.rf-party-list__empty {
  color: #adb5bd;
  font-size: 0.85rem;
  font-style: italic;
  margin: 0;
}

.rf-party-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  cursor: grab;
  user-select: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rf-party-card i {
  color: #adb5bd;
}
.rf-party-card:hover {
  border-color: #bc4f5e;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}
.rf-party-card:active {
  cursor: grabbing;
}

.rf-file-upload-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.4rem;
  border: 2px dashed #ced4da;
  border-radius: 14px;
  background: #fafbfc;
  padding: 2.2rem 1.5rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.rf-file-upload-area:hover {
  border-color: #bc4f5e;
  background: #f8e8ea;
}
.rf-file-upload-area.is-dragging {
  border-color: #bc4f5e;
  background: #f8e8ea;
}
.rf-file-upload-area__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #f8e8ea;
  color: #bc4f5e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.rf-file-upload-text {
  font-weight: 700;
  font-size: 1rem;
  color: #212529;
}

.rf-file-upload-hint {
  font-size: 0.85rem;
  color: #6c757d;
}

.rf-file-input-hidden {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.rf-file-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.rf-file-list-header {
  font-size: 0.85rem;
  font-weight: 600;
  color: #495057;
}

.rf-file-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: #f8f9fa;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}
.rf-file-item__name {
  flex: 1;
  font-weight: 500;
}
.rf-file-item__size {
  color: #6c757d;
  font-size: 0.85rem;
}
.rf-file-item__remove {
  background: none;
  border: none;
  color: #dc3545;
  font-size: 1.2rem;
  cursor: pointer;
}

.rf-recap-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #f8f9fa;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}
.rf-recap-banner__icon {
  font-size: 2rem;
  color: #bc4f5e;
}
.rf-recap-banner__label {
  font-size: 0.8rem;
  color: #6c757d;
}
.rf-recap-banner__value {
  font-weight: 700;
  font-size: 1.1rem;
}

.rf-recap-table {
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.rf-recap-row {
  display: flex;
  padding: 0.7rem 1.2rem;
  border-bottom: 1px solid #f0f0f0;
}
.rf-recap-row:last-child {
  border-bottom: none;
}
.rf-recap-row__key {
  width: 140px;
  font-weight: 600;
  color: #495057;
  flex-shrink: 0;
}
.rf-recap-row__val {
  flex: 1;
  color: #212529;
}

.rf-recap-row--pieces {
  align-items: flex-start;
}

.rf-recap-pieces {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rf-recap-piece {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  background: #f8f9fa;
  border-radius: 8px;
}
.rf-recap-piece i.bi-file-earmark-text {
  color: #bc4f5e;
  font-size: 1.1rem;
}
.rf-recap-piece__info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.rf-recap-piece__type {
  font-weight: 600;
  font-size: 0.85rem;
  color: #212529;
}
.rf-recap-piece__name {
  font-size: 0.8rem;
  color: #6c757d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rf-recap-piece__view {
  background: none;
  border: 1px solid #bc4f5e;
  color: #bc4f5e;
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.rf-recap-piece__view:hover {
  background: #bc4f5e;
  color: #fff;
}

.rf-alert--danger {
  background: #f8d7da;
  color: #721c24;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rf-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn-recours-primary {
  background: #bc4f5e;
  color: #fff;
  border: none;
  padding: 0.6rem 1.8rem;
  border-radius: 30px;
  font-weight: 600;
  transition: background 0.2s;
}
.btn-recours-primary:hover {
  background: #722f37;
}
.btn-recours-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-recours-secondary {
  background: #e9ecef;
  color: #333;
  border: none;
  padding: 0.6rem 1.8rem;
  border-radius: 30px;
  font-weight: 600;
  transition: background 0.2s;
}
.btn-recours-secondary:hover {
  background: #dee2e6;
}

.recours-success {
  text-align: center;
  padding: 2rem 0;
}
.recours-success__icon {
  font-size: 4rem;
  color: #28a745;
}
.recours-success__title {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 1rem 0 0.5rem;
}
.recours-success__text {
  font-size: 1.1rem;
  color: #6c757d;
}
.recours-success__ref {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  display: inline-block;
}
.recours-success__ref-label {
  font-size: 0.85rem;
  color: #6c757d;
  display: block;
}
.recours-success__ref-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #722f37;
}
.recours-success__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.btn-spinner-sm {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  padding: 2rem;
}

.preview-modal {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.preview-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: #722f37;
  color: #fff;
  flex-shrink: 0;
}
.preview-modal__title {
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-modal__close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.2s;
}
.preview-modal__close:hover {
  background: rgba(255, 255, 255, 0.3);
}
.preview-modal__body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f3f5;
}
.preview-modal__body iframe {
  width: 100%;
  height: 75vh;
  border: none;
}
.preview-modal__body img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
}
.preview-modal__unsupported {
  text-align: center;
  color: #6c757d;
  padding: 3rem;
}
.preview-modal__unsupported i {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.upload-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.upload-spinner-container {
  text-align: center;
  color: #fff;
}

.upload-logo-spinner .spinning-logo {
  width: 100px;
  height: 100px;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

.recepisse-print-host {
  position: fixed;
  left: -5000px;
  top: 0;
  width: 210mm;
  height: auto;
  pointer-events: none;
  z-index: -9999;
  background: white;
}

.rf-file-upload-wrapper {
  width: 100%;
}

.rf-file-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 2.5rem 1rem;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  background: #fafbfc;
  transition: all 0.3s ease;
  cursor: pointer;
}
.rf-file-upload-area:hover {
  border-color: #bc4f5e;
  background: #f8e8ea;
}
.rf-file-upload-area:active {
  transform: scale(0.98);
}
.rf-file-upload-area i {
  font-size: 3rem;
  color: #bc4f5e;
  margin-bottom: 0.75rem;
}

.rf-file-upload-text {
  font-weight: 600;
  font-size: 1rem;
  color: #1e293b;
}

.rf-file-upload-hint {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.rf-file-input-hidden {
  display: none !important;
}

.rf-file-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0.75rem;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
}

.rf-file-list-header {
  padding: 0.6rem 0.75rem;
  background: #f8f9fa;
  font-weight: 600;
  font-size: 0.9rem;
  color: #495057;
  border-bottom: 1px solid #e9ecef;
}
.rf-file-list-header i {
  margin-right: 0.5rem;
  color: #bc4f5e;
}

.rf-file-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 1rem;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
.rf-file-item:last-child {
  border-bottom: none;
}
.rf-file-item:hover {
  background: #f8f9fa;
}
.rf-file-item__name {
  flex: 1;
  font-weight: 500;
  font-size: 0.9rem;
  color: #212529;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rf-file-item__name i {
  margin-right: 0.5rem;
  color: #bc4f5e;
}
.rf-file-item__size {
  color: #6c757d;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.rf-file-item__remove {
  background: none;
  border: none;
  color: #dc3545;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 50%;
  transition: all 0.2s;
  flex-shrink: 0;
}
.rf-file-item__remove:hover {
  background: #f8d7da;
  color: #a71d2a;
}
