/* Tabs más minimalistas en Mi cuenta */
#accountTabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: .5rem .75rem;
  font-size: .9rem;
}
#accountTabs .nav-link.active {
  background: transparent;
  color: #fff;
  border-bottom-color: #ffc107;
}
#accountTabs {
  border-bottom: 1px solid rgba(255,255,255,.08);
}
/* Tabla de usuarios más limpia */
#table-users-admin td,
#table-users-admin th {
  vertical-align: middle;
}
.user-type-badge {
  font-size: .75rem;
  padding: .15rem .45rem;
}
.user-row-actions button {
  min-width: 80px;
}
.form-control-sm-compact {
  padding: .15rem .4rem;
  font-size: .8rem;
  border-radius: .2rem;
}

.panel-app-tabs {
  gap: 0.5rem;
}

.panel-app-tabs .nav-link {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 6, 23, 0.48);
  color: var(--text-muted);
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

.panel-app-tabs .nav-link.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--text-main);
}

.panel-app-tab-content {
  min-height: 18rem;
}

.image-app-shell,
.image-app-panel {
  overflow: hidden;
}

.image-app-copy {
  max-width: 44rem;
}

.image-app-step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.image-app-step-card,
.image-app-selected-activity,
.image-app-advanced {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.28);
}

.image-app-step-card {
  display: grid;
  gap: 0.3rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
}

.image-app-step-card span {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.image-app-step-card strong {
  font-size: 0.96rem;
}

.image-app-step-card small {
  color: var(--text-muted);
}

.image-app-step-card[data-state="active"] {
  border-color: rgba(56, 189, 248, 0.34);
  background: rgba(56, 189, 248, 0.12);
}

.image-app-step-card[data-state="active"] span {
  background: rgba(56, 189, 248, 0.24);
  color: #e0f2fe;
}

.image-app-step-card[data-state="done"] {
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(34, 197, 94, 0.12);
}

.image-app-step-card[data-state="done"] span {
  background: rgba(34, 197, 94, 0.24);
  color: #dcfce7;
}

.image-app-selected-activity {
  display: grid;
  gap: 0.55rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
}

.image-app-selected-activity.is-empty {
  color: var(--text-muted);
}

.image-app-selected-top,
.image-app-selected-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  justify-content: space-between;
  align-items: center;
}

.image-app-selected-top strong {
  font-size: 1rem;
}

.image-app-selected-top span,
.image-app-selected-meta span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.image-app-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.48);
  color: var(--text-main);
  font-size: 0.84rem;
  white-space: nowrap;
}

.image-app-status-chip[data-state="success"] {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.16);
}

.image-app-status-chip[data-state="warning"] {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.16);
}

.image-app-status-chip[data-state="danger"] {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.16);
}

.image-app-stage {
  display: grid;
}

.image-app-video-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.14), transparent 45%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.72));
  aspect-ratio: 4 / 3;
  min-height: 20rem;
}

.image-app-video,
.image-app-source-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-app-source-image {
  position: absolute;
  inset: 0;
}

.image-app-empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.45rem;
  padding: 1.5rem;
  text-align: center;
  color: rgba(226, 232, 240, 0.9);
  background: rgba(2, 6, 23, 0.28);
}

.image-app-empty-state strong {
  font-size: 1.05rem;
}

.image-app-overlay-preview {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.image-app-overlay-top,
.image-app-overlay-bottom {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
}

.image-app-overlay-top {
  align-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0));
  font-size: 0.92rem;
}

.image-app-overlay-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.96);
  color: #020617;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.image-app-overlay-top #image-app-overlay-call {
  font-weight: 700;
  text-shadow: 0 4px 14px rgba(2, 6, 23, 0.75);
}

.image-app-overlay-bottom {
  flex-direction: column;
  align-items: flex-start;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.12));
}

.image-app-overlay-bottom strong {
  font-size: 1.08rem;
}

.image-app-overlay-bottom span {
  font-size: 0.83rem;
  color: rgba(226, 232, 240, 0.9);
}

.image-app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.image-app-actions .btn {
  flex: 1 1 11rem;
  min-height: 2.8rem;
}

.image-app-actions-primary .btn-primary,
.image-app-actions-primary .btn-success {
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.28);
}

.image-app-advanced {
  padding: 0.85rem 1rem 1rem;
  border-radius: 1rem;
}

.image-app-advanced summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.image-app-advanced summary::-webkit-details-marker {
  display: none;
}

.image-app-advanced summary::after {
  content: "+";
  float: right;
  color: var(--text-muted);
}

.image-app-advanced[open] summary::after {
  content: "-";
}

.image-app-status-list {
  display: grid;
  gap: 0.75rem;
}

.image-app-status-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.7rem 0.85rem;
  border-radius: 0.9rem;
  background: rgba(2, 6, 23, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.image-app-status-row span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.image-app-status-row strong {
  text-align: right;
  font-size: 0.88rem;
}

.image-app-status-row strong[data-state="success"] {
  color: #86efac;
}

.image-app-status-row strong[data-state="warning"] {
  color: #fcd34d;
}

.image-app-status-row strong[data-state="danger"] {
  color: #fca5a5;
}

.image-app-result-wrap {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.4);
  min-height: 16rem;
  display: grid;
  place-items: center;
}

.image-app-result {
  display: block;
  width: 100%;
  height: auto;
}

.image-app-result-placeholder {
  padding: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.image-app-result-state {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.36);
  color: var(--text-main);
  font-size: 0.8rem;
}

.image-app-result-state[data-state="success"] {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.16);
}

.image-app-result-state[data-state="warning"] {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.16);
}

html[data-bs-theme="light"] .panel-app-tabs .nav-link {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(15, 23, 42, 0.12);
}

html[data-bs-theme="light"] .panel-app-tabs .nav-link.active {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.28);
}

html[data-bs-theme="light"] .image-app-status-chip {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.12);
}

html[data-bs-theme="light"] .image-app-step-card,
html[data-bs-theme="light"] .image-app-selected-activity,
html[data-bs-theme="light"] .image-app-advanced,
html[data-bs-theme="light"] .image-app-video-wrap,
html[data-bs-theme="light"] .image-app-result-wrap,
html[data-bs-theme="light"] .image-app-status-row {
  border-color: rgba(15, 23, 42, 0.12);
}

html[data-bs-theme="light"] .image-app-step-card,
html[data-bs-theme="light"] .image-app-selected-activity,
html[data-bs-theme="light"] .image-app-advanced {
  background: rgba(255, 255, 255, 0.82);
}

html[data-bs-theme="light"] .image-app-empty-state {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.18);
}

html[data-bs-theme="light"] .image-app-status-row {
  background: rgba(255, 255, 255, 0.82);
}

html[data-bs-theme="light"] .image-app-status-row strong[data-state="success"] {
  color: #15803d;
}

html[data-bs-theme="light"] .image-app-status-row strong[data-state="warning"] {
  color: #b45309;
}

html[data-bs-theme="light"] .image-app-status-row strong[data-state="danger"] {
  color: #b91c1c;
}

html[data-bs-theme="light"] .image-app-result-wrap {
  background: rgba(255, 255, 255, 0.82);
}

html[data-bs-theme="light"] .image-app-result-state {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.12);
}

@media (max-width: 991.98px) {
  .image-app-status-chip {
    white-space: normal;
  }

  .image-app-step-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .panel-app-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.1rem;
  }

  .panel-app-tabs .nav-link {
    white-space: nowrap;
  }

  .image-app-video-wrap {
    min-height: 16rem;
  }

  .image-app-overlay-top,
  .image-app-overlay-bottom {
    padding: 0.85rem;
  }

  .image-app-selected-top,
  .image-app-selected-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .image-app-actions .btn {
    flex-basis: calc(50% - 0.4rem);
  }

  .image-app-status-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .image-app-status-row strong {
    text-align: left;
  }
}

@media (max-width: 575.98px) {
  .image-app-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .image-app-actions .btn {
    width: 100%;
  }
}
