/* =========================================================
   DRIVE DEVBLK · RECIENTES
   Dark · Futurista · Cyberpunk · Responsive
   ========================================================= */

.recent-page {
  position: relative;
  isolation: isolate;

  display: flex;
  flex-direction: column;
  gap: 18px;

  width: 100%;
  min-width: 0;
}

/* =========================================================
   AMBIENTE
   ========================================================= */

.recent-page__ambient {
  position: absolute;
  top: -130px;
  right: -30px;
  z-index: -1;

  width: 430px;
  height: 320px;

  border-radius: 50%;

  pointer-events: none;

  background:
    radial-gradient(
      circle,
      rgba(109, 141, 255, 0.075),
      transparent 70%
    );
}

/* =========================================================
   ENCABEZADO
   ========================================================= */

.recent-page__header {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;

  min-width: 0;
  padding: 20px;

  overflow: hidden;

  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);

  background:
    linear-gradient(
      145deg,
      rgba(16, 21, 29, 0.98),
      rgba(7, 10, 14, 0.99)
    );
}

.recent-page__header::before {
  position: absolute;
  top: -1px;
  left: 27px;

  width: 86px;
  height: 1px;

  content: "";

  background: var(--info);
}

.recent-page__header::after {
  position: absolute;
  top: -105px;
  right: 180px;

  width: 220px;
  height: 220px;

  border: 1px solid rgba(109, 141, 255, 0.06);
  border-radius: 50%;

  content: "";
}

.recent-page__heading {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  gap: 14px;

  min-width: 0;
}

.recent-page__heading-icon {
  position: relative;

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

  width: 53px;
  min-width: 53px;
  height: 53px;

  border: 1px solid var(--info-border);
  border-radius: 13px;

  color: var(--info);

  background: var(--info-soft);
}

.recent-page__heading-icon::before {
  position: absolute;
  inset: 5px;

  border: 1px solid rgba(109, 141, 255, 0.09);
  border-radius: 9px;

  content: "";
}

.recent-page__heading-icon > span {
  position: absolute;
  right: -3px;
  bottom: -3px;

  width: 10px;
  height: 10px;

  border: 2px solid #080b10;
  border-radius: 50%;

  background: var(--success);

  animation:
    recent-pulse
    2s
    ease-in-out
    infinite;
}

.recent-page__heading-icon svg {
  width: 23px;
  height: 23px;

  stroke-width: 1.8;
}

.recent-page__heading-copy {
  min-width: 0;
}

.recent-page__eyebrow {
  display: block;

  margin-bottom: 4px;

  color: var(--info);

  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.recent-page__heading h2 {
  margin: 0;

  color: var(--text);

  font-size: 24px;
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.recent-page__heading p {
  margin: 6px 0 0;

  color: var(--text-muted);

  font-size: 12px;
  line-height: 1.5;
}

.recent-page__header-actions {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.recent-page__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  min-height: 34px;
  padding: 0 10px;

  border: 1px solid var(--success-border);
  border-radius: var(--radius-xs);

  color: var(--success);

  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;

  background: var(--success-soft);
}

.recent-page__status > span {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: currentColor;

  animation:
    recent-pulse
    2s
    ease-in-out
    infinite;
}

.recent-page__refresh {
  min-width: 116px;
}

.recent-page__refresh.is-loading svg {
  animation:
    recent-spin
    0.7s
    linear
    infinite;
}

/* =========================================================
   RESUMEN
   ========================================================= */

.recent-page__summary {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.recent-summary-card {
  position: relative;

  display: grid;
  grid-template-columns:
    auto
    auto
    minmax(0, 1fr);
  align-items: center;
  gap: 13px;

  min-width: 0;
  min-height: 110px;
  padding: 17px;

  overflow: hidden;

  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);

  background:
    linear-gradient(
      145deg,
      rgba(16, 21, 29, 0.98),
      rgba(7, 10, 14, 0.99)
    );

  transition:
    border-color var(--transition),
    background-color var(--transition),
    transform var(--transition);
}

.recent-summary-card::before {
  position: absolute;
  top: -58px;
  right: -58px;

  width: 145px;
  height: 145px;

  border: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: 50%;

  content: "";
}

.recent-summary-card:hover {
  border-color: var(--info-border);

  background:
    linear-gradient(
      145deg,
      rgba(109, 141, 255, 0.05),
      rgba(7, 10, 14, 0.99)
    );

  transform: translateY(-3px);
}

.recent-summary-card__index {
  align-self: start;

  color: #46525f;

  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.recent-summary-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 45px;
  min-width: 45px;
  height: 45px;

  border: 1px solid var(--info-border);
  border-radius: 10px;

  color: var(--info);

  background: var(--info-soft);
}

.recent-summary-card__icon--storage {
  border-color: var(--accent-border);

  color: var(--accent);

  background: var(--accent-soft);
}

.recent-summary-card__icon--images {
  border-color: var(--success-border);

  color: var(--success);

  background: var(--success-soft);
}

.recent-summary-card__icon svg {
  width: 20px;
  height: 20px;

  stroke-width: 1.8;
}

.recent-summary-card__copy {
  display: flex;
  flex-direction: column;
  gap: 3px;

  min-width: 0;
}

.recent-summary-card__copy > span {
  color: var(--text-muted);

  font-size: 11px;
  font-weight: 650;
}

.recent-summary-card__copy strong {
  overflow: hidden;

  color: var(--text);

  font-size: 28px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-summary-card__copy small {
  color: var(--text-soft);

  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.recent-summary-card__line {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;

  height: 1px;

  transform: scaleX(0);
  transform-origin: left;

  background:
    linear-gradient(
      90deg,
      var(--info),
      transparent
    );

  transition:
    transform var(--transition-slow);
}

.recent-summary-card:hover
.recent-summary-card__line {
  transform: scaleX(1);
}

/* =========================================================
   PANEL PRINCIPAL
   ========================================================= */

.recent-page__panel {
  position: relative;

  min-width: 0;

  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);

  overflow: hidden;

  background:
    linear-gradient(
      145deg,
      rgba(14, 19, 26, 0.98),
      rgba(7, 10, 14, 0.99)
    );
}

.recent-page__panel::before {
  position: absolute;
  top: -1px;
  left: 28px;
  z-index: 2;

  width: 82px;
  height: 1px;

  content: "";

  background: var(--info);
}

.recent-page__panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  padding: 16px 17px;

  border-bottom: 1px solid var(--line);
}

.recent-page__panel-eyebrow {
  display: block;

  margin-bottom: 3px;

  color: var(--text-soft);

  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.11em;
}

.recent-page__panel-header h3 {
  color: var(--text);

  font-size: 15px;
  font-weight: 700;
}

.recent-page__panel-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  color: var(--success);

  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recent-page__panel-status > span {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: currentColor;
}

/* =========================================================
   CARGA
   ========================================================= */

.recent-page__loading {
  min-height: 400px;
}

.recent-page__loading > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.recent-page__loading strong {
  color: var(--text);

  font-size: 11px;
}

.recent-page__loading span {
  color: var(--text-muted);

  font-size: 9px;
}

/* =========================================================
   ESTADO VACÍO
   ========================================================= */

.recent-page__empty {
  min-height: 400px;
}

.recent-page__empty-icon {
  border-color: var(--info-border);

  color: var(--info);

  background: var(--info-soft);
}

.recent-page__empty-icon > span {
  background: var(--success);
}

.recent-page__empty-code {
  margin-top: 18px;

  color: var(--text-soft);

  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.recent-page__empty h2 {
  margin-top: 8px;

  color: var(--text);

  font-size: 21px;
  letter-spacing: -0.03em;
}

.recent-page__empty p {
  max-width: 430px;
  margin: 7px 0 19px;

  color: var(--text-muted);

  font-size: 11px;
  line-height: 1.55;
}

/* =========================================================
   CONTENIDO Y TABLA
   ========================================================= */

.recent-page__content {
  width: 100%;
  min-width: 0;

  overflow-x: auto;
}

.recent-page__table-head,
.recent-page .drive-item {
  display: grid;
  grid-template-columns:
    minmax(330px, 1fr)
    110px
    180px
    210px
    110px;
  align-items: center;

  min-width: 980px;
}

.recent-page__table-head {
  min-height: 45px;
  padding: 0 14px;

  border-bottom: 1px solid var(--line-strong);

  color: #65717e;

  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;

  background: rgba(255, 255, 255, 0.018);
}

.recent-page__table-head span:last-child {
  text-align: right;
}

.recent-page .drive-item {
  min-height: 76px;
  padding: 0 14px;

  border-bottom: 1px solid var(--line);

  background: rgba(7, 10, 14, 0.78);

  transition:
    background-color var(--transition),
    transform var(--transition),
    opacity var(--transition);
}

.recent-page .drive-item:last-child {
  border-bottom: 0;
}

.recent-page .drive-item:hover {
  background: rgba(109, 141, 255, 0.032);
}

.recent-page .drive-item__main {
  display: flex;
  align-items: center;
  gap: 11px;

  min-width: 0;
  padding: 0;

  color: inherit;

  text-align: left;

  background: transparent;
}

.recent-page .drive-item__icon {
  border-color: var(--line-strong);

  background: var(--surface-soft);
}

.recent-page .drive-item__main:hover
.drive-item__icon {
  border-color: var(--info-border);
}

.recent-page .drive-item__name strong {
  color: var(--text);

  font-size: 12px;
  font-weight: 700;
}

.recent-page .drive-item__name small {
  color: var(--text-soft);

  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.recent-page .drive-item__size {
  color: var(--text-muted);

  font-family: var(--font-mono);
  font-size: 9px;
}

.recent-page .drive-item__date {
  color: var(--text-muted);

  font-size: 10px;
}

.recent-item__location {
  display: flex;
  align-items: center;
  gap: 7px;

  min-width: 0;
  padding: 0;

  color: var(--text-muted);

  font-size: 10px;
  text-align: left;

  background: transparent;

  transition:
    color var(--transition);
}

.recent-item__location:hover {
  color: var(--info);
}

.recent-item__location svg {
  width: 15px;
  min-width: 15px;
  height: 15px;

  stroke-width: 1.8;
}

.recent-item__location span {
  overflow: hidden;

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

.recent-page .drive-item__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.recent-page .drive-item__actions .icon-button {
  width: 35px;
  min-width: 35px;
  height: 35px;

  border-radius: 8px;
}

.recent-page .drive-item__actions
.icon-button:first-child:hover:not(:disabled) {
  border-color: var(--info-border);

  color: var(--info);

  background: var(--info-soft);
}

.recent-page .drive-item__actions
.icon-button:last-child:hover:not(:disabled) {
  border-color: var(--success-border);

  color: var(--success);

  background: var(--success-soft);
}

/* =========================================================
   MINIATURAS
   ========================================================= */

.recent-page .drive-item__preview {
  position: relative;

  display: inline-flex;
  flex: 0 0 62px;
  align-items: center;
  justify-content: center;

  width: 62px;
  min-width: 62px;
  height: 50px;

  overflow: hidden;

  border: 1px solid var(--line-strong);
  border-radius: 10px;

  background:
    linear-gradient(
      145deg,
      var(--surface-soft),
      var(--surface)
    );

  transition:
    border-color var(--transition),
    transform var(--transition);
}

.recent-page .drive-item__main:hover
.drive-item__preview {
  border-color: var(--info-border);

  transform: translateY(-2px);
}

.recent-page .drive-item__preview-image {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  border: 0;

  opacity: 0;

  transform: scale(1.08);

  transition:
    opacity 220ms ease,
    transform 300ms ease;
}

.recent-page .drive-item__preview.is-loaded
.drive-item__preview-image {
  opacity: 1;

  transform: scale(1);
}

.recent-page .drive-item__main:hover
.drive-item__preview-image {
  transform: scale(1.06);
}

.recent-page .drive-item__preview-loading {
  position: absolute;
  inset: 0;

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

  color: var(--text-soft);

  background:
    linear-gradient(
      145deg,
      var(--surface-soft),
      var(--surface)
    );
}

.recent-page .drive-item__preview-loading svg {
  width: 20px;
  height: 20px;

  stroke-width: 1.8;
}

.recent-page .drive-item__preview.is-loading
.drive-item__preview-loading svg {
  animation:
    recent-preview-pulse
    1s
    ease-in-out
    infinite;
}

.recent-page .drive-item__preview.is-loaded
.drive-item__preview-loading {
  display: none;
}

.recent-page .drive-item__preview.has-error {
  border-color: var(--danger-border);

  background: var(--danger-soft);
}

.recent-page .drive-item__preview.has-error
.drive-item__preview-loading {
  display: flex;

  color: var(--danger);

  background: var(--danger-soft);
}

.recent-page .drive-item__preview.has-error
.drive-item__preview-loading::after {
  position: absolute;

  width: 25px;
  height: 1px;

  content: "";

  background: currentColor;

  transform: rotate(-45deg);
}

/* =========================================================
   TIPOS DE ARCHIVO
   ========================================================= */

.recent-page .drive-item__icon--pdf {
  border-color: var(--danger-border);

  color: var(--danger);

  background: var(--danger-soft);
}

.recent-page .drive-item__icon--imagen {
  border-color: var(--success-border);

  color: var(--success);

  background: var(--success-soft);
}

.recent-page .drive-item__icon--video {
  border-color: var(--info-border);

  color: var(--info);

  background: var(--info-soft);
}

.recent-page .drive-item__icon--audio {
  border-color: var(--warning-border);

  color: var(--warning);

  background: var(--warning-soft);
}

.recent-page .drive-item__icon--texto,
.recent-page .drive-item__icon--txt,
.recent-page .drive-item__icon--documento,
.recent-page .drive-item__icon--planilla {
  border-color: var(--accent-border);

  color: var(--accent);

  background: var(--accent-soft);
}

.recent-page .drive-item__icon--comprimido {
  border-color: var(--warning-border);

  color: var(--warning);

  background: var(--warning-soft);
}

/* =========================================================
   FOOTER
   ========================================================= */

.recent-page__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  padding: 12px 15px;

  border-top: 1px solid var(--line-strong);

  color: var(--text-muted);

  background: rgba(255, 255, 255, 0.012);
}

.recent-page__footer-info {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.recent-page__footer-info > span {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: var(--info);
}

.recent-page__footer-info strong {
  font-size: 9px;
  font-weight: 600;
}

.recent-page__footer-code {
  color: var(--text-soft);

  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

/* =========================================================
   LOADING DE ACCIONES
   ========================================================= */

.recent-page .icon-button.is-loading svg {
  animation:
    recent-spin
    0.7s
    linear
    infinite;
}

/* =========================================================
   ANIMACIONES
   ========================================================= */

@keyframes recent-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes recent-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.35;
    transform: scale(0.7);
  }
}

@keyframes recent-preview-pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* =========================================================
   RESPONSIVE · 1100 PX
   ========================================================= */

@media (max-width: 1100px) {
  .recent-page__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .recent-page__header-actions {
    width: 100%;
  }

  .recent-page__status {
    margin-right: auto;
  }
}

/* =========================================================
   RESPONSIVE · 900 PX
   ========================================================= */

@media (max-width: 900px) {
  .recent-page__summary {
    grid-template-columns: 1fr;
  }

  .recent-summary-card {
    min-height: 100px;
  }
}

/* =========================================================
   RESPONSIVE · 680 PX
   ========================================================= */

@media (max-width: 680px) {
  .recent-page__header {
    padding: 16px;
  }

  .recent-page__heading {
    align-items: flex-start;
  }

  .recent-page__header-actions {
    display: grid;
    grid-template-columns:
      minmax(0, 1fr)
      auto;
  }

  .recent-page__status {
    width: 100%;
    margin: 0;
  }

  .recent-page__panel-header {
    padding: 15px;
  }

  .recent-page__panel-status {
    display: none;
  }

  .recent-page__footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* =========================================================
   RESPONSIVE · 520 PX
   ========================================================= */

@media (max-width: 520px) {
  .recent-page {
    gap: 14px;
  }

  .recent-page__heading-icon {
    width: 46px;
    min-width: 46px;
    height: 46px;
  }

  .recent-page__heading h2 {
    font-size: 21px;
  }

  .recent-page__heading p {
    font-size: 10px;
  }

  .recent-page__header-actions {
    grid-template-columns: 1fr;
  }

  .recent-page__refresh {
    width: 100%;
  }

  .recent-summary-card {
    padding: 15px;
  }

  .recent-summary-card__icon {
    width: 42px;
    min-width: 42px;
    height: 42px;
  }

  .recent-summary-card__copy strong {
    font-size: 25px;
  }

  .recent-page .drive-item__preview {
    flex-basis: 54px;

    width: 54px;
    min-width: 54px;
    height: 46px;
  }

  .recent-page__footer-code {
    display: none;
  }
}

/* =========================================================
   MOVIMIENTO REDUCIDO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .recent-page__heading-icon > span,
  .recent-page__status > span,
  .recent-page__refresh.is-loading svg,
  .recent-page .icon-button.is-loading svg,
  .recent-page .drive-item__preview.is-loading
  .drive-item__preview-loading svg {
    animation: none;
  }

  .recent-summary-card,
  .recent-summary-card__line,
  .recent-page .drive-item,
  .recent-page .drive-item__preview,
  .recent-page .drive-item__preview-image {
    transition: none;
  }
}