/* Layout app — chrome QOVEX (header navy + sidebar + content) */
.app-shell-body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  font-family: var(--theme-font, "Plus Jakarta Sans", system-ui, sans-serif);
  background: var(--theme-body-bg);
  color: var(--theme-body-text);
  display: flex;
  flex-direction: column;
  --topbar-height: 70px;
  --sidebar-width: 70px;
  --sidebar-gap: 24px;
  /* Alineada con el título del strip (ESTADÍSTICAS, etc.), no con el logo */
  --sidebar-top: calc(var(--topbar-height) + 14px);
  --sidebar-rail: calc(var(--sidebar-gap) + var(--sidebar-width) + 20px);
}

.app-shell__main-rail {
  margin-left: var(--sidebar-rail);
}

/* ── Header (topbar + strip) ── */
.app-shell__header {
  flex-shrink: 0;
  z-index: 10;
  background:
    linear-gradient(135deg, var(--theme-topbar-bg-start) 0%, var(--theme-topbar-bg-end) 100%);
  box-shadow: 0 2px 8px rgba(40, 60, 147, 0.28);
  position: relative;
  overflow: visible;
}

.app-shell__header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--theme-topbar-pattern);
  background-size: 320px 180px;
  opacity: 0.35;
  pointer-events: none;
}

.app-shell__topbar,
.app-shell__topbar-strip {
  position: relative;
}

.app-shell__topbar {
  z-index: 5;
}

.app-shell__topbar-strip {
  z-index: 1;
}

.app-shell__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--topbar-height);
  /* Logo en la misma columna que la sidebar; búsqueda a la derecha */
  padding: 0 24px 0 var(--sidebar-gap);
}

.app-shell__topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1;
}

.app-shell__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--sidebar-width);
  height: 40px;
  text-decoration: none;
}

.app-shell__logo:hover {
  opacity: 0.92;
}

.app-shell__logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.app-shell__search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 280px;
  flex: 1 1 200px;
  margin-left: 0;
  padding: 0 12px;
  height: 38px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.app-shell__search-icon {
  width: 16px;
  height: 16px;
  color: var(--theme-topbar-muted);
  flex-shrink: 0;
}

.app-shell__search-input {
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.app-shell__search-input::placeholder {
  color: var(--theme-topbar-muted);
}

.app-shell__topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.app-shell__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--theme-topbar-text);
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.app-shell__icon-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.app-shell__icon-btn:hover {
  background: var(--theme-topbar-hover);
}

.app-shell__icon-btn .theme-toggle__icon {
  width: 18px;
  height: 18px;
}

.app-shell__user-menu {
  position: relative;
  margin: 0 4px;
  z-index: 6;
}

.app-shell__topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  margin: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.app-shell__topbar-user:hover,
.app-shell__user-menu.is-open .app-shell__topbar-user {
  background: var(--theme-topbar-hover);
}

.app-shell__user-menu.is-open .app-shell__user-chevron {
  transform: rotate(180deg);
}

.app-shell__user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  padding: 6px 0;
  background: var(--theme-flyout-bg, #fff);
  border: 1px solid var(--theme-flyout-border);
  border-radius: 8px;
  box-shadow: var(--theme-flyout-shadow);
  z-index: 70;
  pointer-events: auto;
}

.app-shell__user-dropdown[hidden] {
  display: none !important;
}

.app-shell__user-dropdown-link {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--theme-flyout-link);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.app-shell__user-dropdown-link:hover {
  background: var(--theme-flyout-link-hover-bg);
  color: var(--theme-flyout-link-hover-text);
}

.app-shell__topbar-avatar,
.app-shell__profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  object-fit: cover;
  background: #e9ecef;
}

.app-shell__avatar-img {
  padding: 0;
  overflow: hidden;
}

.app-shell__topbar-avatar {
  width: 32px;
  height: 32px;
  font-size: 11px;
}

.app-shell__profile-avatar {
  width: 64px;
  height: 64px;
  font-size: 20px;
}

.app-shell__user-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell__user-chevron {
  width: 14px;
  height: 14px;
  color: var(--theme-topbar-muted);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.app-shell__logout-form {
  display: inline;
  margin: 0;
}

.app-shell__sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--theme-topbar-text);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.app-shell__sidebar-toggle:hover {
  background: var(--theme-topbar-hover);
}

.app-shell__sidebar-toggle-icon {
  width: 18px;
  height: 18px;
  display: block;
}

/* Strip: título + breadcrumbs a la DERECHA de la sidebar */
.app-shell__topbar-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 4px 24px 16px var(--sidebar-rail);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-shell__strip-label {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  color: #fff;
}

.app-shell__breadcrumbs {
  min-width: 0;
}

.app-shell__breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-shell__breadcrumbs-item {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--theme-topbar-muted);
  white-space: nowrap;
}

.app-shell__breadcrumbs-sep {
  margin: 0 8px;
  color: var(--theme-topbar-muted);
  opacity: 0.7;
}

.app-shell__breadcrumbs-link {
  color: var(--theme-topbar-muted);
  text-decoration: none;
  transition: color 0.12s ease;
}

.app-shell__breadcrumbs-link:hover {
  color: #fff;
}

.app-shell__breadcrumbs-item.is-current .app-shell__breadcrumbs-text {
  color: rgba(255, 255, 255, 0.88);
}

/* ── Body row ── */
.app-shell__body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--theme-body-bg);
}

.app-shell__sidebar {
  position: fixed;
  top: var(--sidebar-top);
  left: var(--sidebar-gap);
  width: var(--sidebar-width);
  height: fit-content;
  max-height: calc(100dvh - var(--sidebar-top) - var(--sidebar-gap));
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--theme-sidebar-bg);
  border: 0;
  border-radius: 8px;
  box-shadow: var(--theme-sidebar-shadow);
  padding: 12px 0;
  overflow: visible;
  pointer-events: auto;
}

.app-shell__sidebar--icon {
  overflow: visible;
}

.app-shell__icon-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  padding: 0 13px;
  margin: 0;
  overflow: visible;
}

.app-shell__nav-icon-link,
.app-shell__nav-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--theme-nav);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.app-shell__nav-icon-link:hover,
.app-shell__nav-trigger:hover,
.app-shell__nav-group:hover .app-shell__nav-trigger,
.app-shell__nav-group:focus-within .app-shell__nav-trigger,
.app-shell__nav-group.is-open .app-shell__nav-trigger {
  background: var(--theme-nav-hover-bg);
  color: var(--theme-nav-icon-color);
}

.app-shell__nav-icon-link.is-active,
.app-shell__nav-trigger.is-active,
.app-shell__nav-group.is-active .app-shell__nav-trigger {
  background: var(--theme-nav-icon-active-bg);
  color: var(--theme-nav-icon-active-color);
}

.app-shell__nav-group {
  position: relative;
  display: flex;
  justify-content: center;
  overflow: visible;
}

.app-shell__nav-svg {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
  stroke-width: 1.6;
}

.app-shell__nav-svg--meli {
  width: 20px;
  height: 20px;
  stroke-width: 1.6;
  /* El mark es más ancho que alto; escala óptica al resto de iconos 20px */
  transform: scale(1.35);
  transform-origin: center;
}

.app-shell__flyout {
  position: absolute;
  left: calc(100% + 10px);
  top: 0;
  min-width: 200px;
  width: max-content;
  max-width: 260px;
  height: auto;
  padding: 12px 0 10px;
  background: var(--theme-flyout-bg, #fff);
  border: 1px solid var(--theme-flyout-border);
  border-radius: 8px;
  box-shadow: var(--theme-flyout-shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
  z-index: 80;
}

.app-shell__flyout::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 0;
  width: 14px;
  height: 100%;
}

.app-shell__nav-group.is-open .app-shell__flyout {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.app-shell__flyout-title {
  margin: 0;
  padding: 2px 18px 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--theme-flyout-title);
}

.app-shell__flyout-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-shell__flyout-link {
  display: block;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--theme-flyout-link);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}

.app-shell__flyout-link:hover {
  background: var(--theme-flyout-link-hover-bg);
  color: var(--theme-flyout-link-hover-text);
}

.app-shell__flyout-link.is-active {
  color: var(--theme-flyout-link-active);
  font-weight: 600;
}

/* ── Main + footer ── */
.app-shell__content {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px 24px 16px 0;
}

.app-shell__main {
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.app-shell__footer {
  flex-shrink: 0;
  padding: 12px 24px 16px;
  text-align: center;
  border-top: 1px solid var(--theme-sidebar-border);
  background: var(--theme-body-bg);
}

.app-shell__footer p {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--theme-muted);
}

.app-page__header {
  margin-bottom: 18px;
}

.app-page__title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: var(--theme-heading);
}

.app-page__subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--theme-muted);
}

.app-page--shipit .orders-card {
  margin-top: 4px;
}

.banners-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 20px;
}

.banners-page-header__text {
  flex: 1 1 220px;
  min-width: 0;
}

.banners-page-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.banners-category-heading {
  margin: 28px 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--theme-heading);
}

.banners-category-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 10px;
}

.banners-category-toolbar .banners-category-heading {
  margin: 0;
}

.banners-category-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
