.file-upload-wrapper {
  width: 100%;
  min-height: 132px;

  display: flex;
  align-items: center;
  justify-content: center;

  position: relative;
  cursor: pointer;

  border: 2px dashed rgb(203 213 225);
  border-radius: 1.5rem;

  padding: 1.5rem;
  margin-bottom: 0;

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.95));

  text-align: center;

  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.file-upload-wrapper:hover {
  border-color: var(--primary-color);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(248, 250, 252, 1));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.file-upload-wrapper.dragging {
  border-color: var(--primary-color);
  background: color-mix(in srgb, var(--primary-color) 8%, white);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-color) 12%, transparent);
}

.file-upload-wrapper.is-disabled {
  cursor: not-allowed;
  opacity: 0.75;
  background: rgb(241 245 249);
  border-color: rgb(203 213 225);
  transform: none;
  box-shadow: none;
}

.file-upload-wrapper .file-upload-input {
  display: none;
}

/* Botão/label principal */
.file-upload-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;

  min-height: 46px;

  border-radius: 1rem;

  padding: 0.85rem 1.2rem;

  background: var(--primary-color);
  color: #ffffff;

  font-size: 0.875rem;
  font-weight: 700;

  cursor: pointer;

  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);

  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.file-upload-label:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

.file-upload-label i {
  font-size: 1.25rem;
  line-height: 1;
}

.upload-add-btn {
  border: none;
  outline: none;
}

.file-upload-label--disabled {
  background: rgb(226 232 240);
  color: rgb(100 116 139);
  cursor: not-allowed;
  box-shadow: none;
}

.file-upload-label--disabled:hover {
  transform: none;
  opacity: 1;
}

/* Estado de erro */
.file-upload-wrapper.has-error {
  border-color: rgb(239 68 68);
  background: rgb(254 242 242);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.file-upload-wrapper.has-error .file-upload-label {
  background: rgb(239 68 68);
  color: #ffffff;
}

/* Lista de arquivos */
.file-upload-list {
  width: 100%;
  margin-top: 0.85rem;

  text-align: left;
}

/* Arquivos novos, caso seu upload.js crie divs simples */
.file-upload-list > div {
  min-height: 44px;

  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;

  border: 1px solid rgb(226 232 240);
  border-radius: 1rem;

  padding: 0.75rem 0.9rem;

  background: #ffffff;

  color: rgb(51 65 85);
  font-size: 0.875rem;
  font-weight: 500;

  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* Arquivos já existentes */
.file-upload-list div.existing-file {
  width: 100%;
  min-height: 44px;

  margin-bottom: 10px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  gap: 0.75rem;

  border: 1px solid rgb(226 232 240);
  border-radius: 1rem;

  padding: 0.75rem 0.9rem;

  background: #ffffff;

  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.file-upload-list div.existing-file:hover,
.file-upload-list > div:hover {
  border-color: color-mix(in srgb, var(--primary-color) 30%, rgb(226 232 240));
  background: rgb(248 250 252);
}

/* Link do arquivo */
.file-upload-list a {
  min-width: 0;

  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  color: rgb(30 64 175);
  text-decoration: none;

  font-weight: 700;
}

.file-upload-list a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.file-upload-list a::before {
  content: "📎";
  flex-shrink: 0;
}

.file-upload-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Botão visualizar, caso usado em outras telas */
.view-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;

  border: none;
  border-radius: 0.75rem;

  padding: 0.5rem 0.75rem;

  background: var(--primary-color);
  color: #ffffff;

  font-size: 0.75rem;
  font-weight: 700;

  cursor: pointer;

  transition: opacity 0.2s ease, transform 0.2s ease;
}

.view-file-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Botão remover */
.remove-file-button {
  width: 34px;
  height: 34px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  border: none;
  border-radius: 0.85rem;

  background: rgb(254 242 242);
  color: rgb(220 38 38);

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.remove-file-button:hover {
  background: rgb(220 38 38);
  color: #ffffff;
  transform: translateY(-1px);
}

.remove-file-button i {
  font-size: 1rem;
}

/* Responsivo */
@media (max-width: 640px) {
  .file-upload-wrapper {
    min-height: 118px;
    padding: 1rem;
    border-radius: 1.25rem;
  }

  .file-upload-label {
    width: 100%;
    padding: 0.8rem 1rem;
  }

  .file-upload-list > div,
  .file-upload-list div.existing-file {
    align-items: flex-start;
  }
}