/* ============================================================================ */
/* RESET */
/* ============================================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: "Segoe UI", Verdana, sans-serif;
}

.gestion-archivos-tooltip {
  position: fixed;
  z-index: 10000;
  max-width: min(28rem, calc(100vw - 1.5rem));
  padding: 0.65rem 1rem;
  border-radius: 0.45rem;
  background: rgba(17, 24, 39, 0.94);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 0.75rem 1.75rem rgba(15, 23, 42, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.35rem);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.gestion-archivos-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================================ */
/* CONTENEDOR GENERAL */
/* ============================================================================ */
.GestionForma1 {
  display: grid;
  grid-template-columns: 7fr 13fr;
  gap: clamp(0.75rem, 2vw, 1.5rem);

  height: clamp(32rem, calc(16rem + 25vw), 46rem);
  margin-inline: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(0.4rem, 1vw, 0.75rem);

  background-color: #ffffff;
}

/* ============================================================================ */
/* BLOQUES PRINCIPALES */
/* ============================================================================ */
.box_directorio,
.box_archivos {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;

  padding: clamp(0.75rem, 2vw, 1.25rem);
  border-radius: clamp(0.45rem, 0.8vw, 0.75rem);
  background-color: #ffffff;
  overflow: auto;

  box-shadow:
    0 clamp(2px, 0.4vw, 4px) clamp(6px, 1vw, 8px) rgba(0, 0, 0, 0.2),
    0 clamp(4px, 0.6vw, 6px) clamp(14px, 2vw, 20px) rgba(0, 0, 0, 0.19);

  gap: clamp(0.5rem, 1.2vw, 0.75rem);
}



/* ============================================================================ */
/* TREE (DIRECTORIO) */
/* ============================================================================ */
.tree {
  width: 100%;
}

.tree-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;

  padding-block: clamp(0.25rem, 0.6vw, 0.5rem);
  padding-left: calc(var(--nivel) * clamp(0.9rem, 2vw, 1.5rem));
  gap: clamp(0.4rem, 0.8vw, 0.75rem);

  cursor: pointer;
}

.tree-row:hover {
  background-color: rgb(204, 231, 236);
}

.tree-row.clipboard-selected {
  opacity: 0.55;
}

/* Flecha */

.flecha {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.flecha-svg {
  transform: rotate(0deg);
  transition: transform 0.15s ease-in-out;
  transform-origin: center;
  color: rgb(22, 93, 246);
  font-size: clamp(1.2rem, 1.2vw, 2.15rem);
  line-height: 1;
  vertical-align: middle;
}

.flecha.open .flecha-svg {
  transform: rotate(90deg);
}

.flecha:empty {
  visibility: hidden;
}

/* Icono */
.icono_tree img {
  height: clamp(0.75rem, 1.4vw, 1.25rem);
  width: auto;
  flex-shrink: 0;
}

/* Texto carpeta */
.folder_tree {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(0.8rem, 1.1vw, 0.95rem);
}

/* ============================================================================ */
/* ENCABEZADO SEGUNDO BLOQUE */
/* ============================================================================ */
.folder-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(0.5rem, 1vw, 0.9rem);
}

.iconoCAT {
  height: clamp(1.8rem, 3vw, 3.2rem);
  flex-shrink: 0;
}

/* ============================================================================ */
/* TABLA ARCHIVOS – ESTILO EXPLORADOR */
/* ============================================================================ */
.valuebox {
  width: 100%;
  border: 1px solid #cfd3d7;
  border-radius: clamp(0.35rem, 0.6vw, 0.5rem);
  overflow: hidden;
  background-color: #ffffff;
}

.valuebox table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

/* Encabezado */
.valuebox thead {
  background: linear-gradient(#f5f6f7, #e6e8eb);
}

.valuebox th {
  height: clamp(2rem, 3vw, 2.25rem);
  padding-inline: clamp(0.5rem, 1vw, 0.75rem);

  text-align: left;
  font-size: clamp(0.8rem, 1vw, 0.875rem);
  font-weight: 600;
  color: #2b2b2b;

  border-right: 1px solid #cfd3d7;
  border-bottom: 1px solid #cfd3d7;
}

.valuebox th:last-child {
  border-right: none;
}

/* Filas */
.valuebox tbody tr {
  min-height: clamp(2rem, 2.8vw, 2.25rem);
  transition: background-color 0.15s ease;
}

.valuebox tbody tr:nth-child(even) {
  background-color: #f7f9fb;
}

.valuebox tbody tr:hover {
  background-color: #e5f1fb;
}

.valuebox tbody tr.selected {
  background-color: #cfe8ff;
  outline: 1px solid #7ab8f5;
}

.valuebox tbody tr:focus {
  outline: none;
}

/* Celdas */
.valuebox td {
  padding-inline: clamp(0.5rem, 1vw, 0.75rem);
  padding-block: clamp(0.35rem, 0.6vw, 0.5rem);

  font-size: clamp(0.78rem, 0.9vw, 0.85rem);
  color: #1f2937;

  border-right: 1px solid #e1e4e8;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Descripción multilínea */
.valuebox td.c3a {
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
  word-break: break-word;
  line-height: clamp(1.3, 1.6vw, 1.5);
}

.valuebox td:last-child {
  border-right: none;
}

/* Columnas */
.c2a {
  width: 24%;
  font-weight: 500;
}

.gestion-archivo-file-name {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.c3a {
  width: 46%;
}

.c4a {
  width: 15%;
  font-size: clamp(0.75rem, 0.88vw, 0.82rem);
  color: #1f2937;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.c5a {
  width: 15%;
  font-size: clamp(0.72rem, 0.85vw, 0.78rem);
  color: #4b5563;
}

/* Texto */
.TextoDescrip {
  font-size: clamp(0.8rem, 1vw, 0.875rem);
  line-height: clamp(1.25, 1.6vw, 1.4);
}


.tree-row.active {
  background-color: rgb(146, 220, 235);
  font-weight: 600;
}

/* Boton icono (tabs) */
.btn-icon {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* ============================================================================ */
/* BREADCRUMB */
/* ============================================================================ */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  /* Espaciado entre elementos */
  gap: clamp(0.25rem, 0.35vw, 0.45rem);

  /* Padding interno */
  padding: clamp(0.4rem, 0.6vw, 0.7rem) clamp(0.6rem, 0.9vw, 1rem);

  /* Separación inferior */
  margin-bottom: clamp(0.6rem, 0.9vw, 1rem);

  /* Tipografía */
  font-size: clamp(0.85rem, 0.95vw, 1rem);

  /* Apariencia */
  background-color: #ffffff;
  border: 1px solid #cfd3d7;
  border-radius: clamp(0.35rem, 0.6vw, 0.5rem);

  overflow: hidden;
}

.breadcrumb .crumb {
  display: inline-block;
  cursor: pointer;
  color: #1f4fd8;
  font-weight: clamp(500, 0.6vw, 600);
  font-size: clamp(0.85rem, 0.95vw, 1rem);
  border: 1px solid transparent;
  padding: 0.05rem 0.2rem;
  border-radius: 0.2rem;
}

.breadcrumb .crumb:hover {
  text-decoration: none;
  border-color: #3cabcd;
  background-color: transparent;
}

.breadcrumb .crumb.active {
  cursor: default;
  color: #111827;
  font-weight: clamp(600, 0.8vw, 700);
}

.breadcrumb .separator {
  color: #6b7280;
  margin-inline: clamp(0.2rem, 0.35vw, 0.4rem);
  font-size: clamp(0.85rem, 0.95vw, 1rem);
}

.export-progress {
  padding: clamp(0.7rem, 1vw, 0.95rem) clamp(0.85rem, 1.2vw, 1.1rem);
  border: 1px solid #b7d8f4;
  border-radius: clamp(0.45rem, 0.7vw, 0.6rem);
  background: linear-gradient(180deg, #f7fbff 0%, #eef6ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.export-progress__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.export-progress__title,
.export-progress__value {
  font-size: clamp(0.82rem, 0.95vw, 0.92rem);
  font-weight: 700;
  color: #0f3d75;
}

.export-progress__track {
  width: 100%;
  height: 0.85rem;
  border-radius: 999px;
  background: #d8e7f7;
  overflow: hidden;
}

.export-progress__bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0a78c2 0%, #26c281 100%);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  transition: width 0.18s ease-out;
}

.export-progress__message {
  margin-top: 0.45rem;
  font-size: clamp(0.78rem, 0.9vw, 0.84rem);
  color: #34506f;
}

.export-progress.is-complete {
  border-color: #9fd7b7;
  background: linear-gradient(180deg, #f3fff7 0%, #e8f8ee 100%);
}

.export-progress.is-complete .export-progress__title,
.export-progress.is-complete .export-progress__value,
.export-progress.is-complete .export-progress__message {
  color: #166534;
}

.export-progress.is-complete .export-progress__bar {
  background: linear-gradient(90deg, #27ae60 0%, #5ad47f 100%);
}

.import-package-file-input {
  width: min(100%, 28rem);
  font-size: 0.95rem;
  color: #1f2937;
}

.import-package-file-input::file-selector-button {
  margin-right: 0.85rem;
  padding: 0.68rem 1rem;
  border: 1px solid #1580c8;
  border-radius: 999px;
  background: linear-gradient(180deg, #1fa2e0 0%, #0d83cb 100%);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(13, 131, 203, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.import-package-file-input::-webkit-file-upload-button {
  margin-right: 0.85rem;
  padding: 0.68rem 1rem;
  border: 1px solid #1580c8;
  border-radius: 999px;
  background: linear-gradient(180deg, #1fa2e0 0%, #0d83cb 100%);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(13, 131, 203, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.import-package-file-input:hover::file-selector-button,
.import-package-file-input:hover::-webkit-file-upload-button {
  filter: brightness(1.04);
  box-shadow: 0 12px 24px rgba(13, 131, 203, 0.24);
}

.import-package-file-input:focus-visible {
  outline: none;
}

.import-package-file-input:focus-visible::file-selector-button,
.import-package-file-input:focus-visible::-webkit-file-upload-button {
  box-shadow: 0 0 0 3px rgba(34, 197, 246, 0.22), 0 10px 20px rgba(13, 131, 203, 0.18);
}



/* ::::::::::::::::::::::::::::::::::: */
/* input renombrado */
.rename-input {
  width: 100%;
  font-size: 0.9rem;
  padding: 2px 4px;
  border: 1px solid #3b82f6;
  border-radius: 2px;
  outline: none;
}

.error-text {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.8rem;
  color: #b91c1c;
}
