/**
 * Header moderno 2026 — scoped a .frd-app-header y .frd-sidebar-brand
 * Respeta theme_color de /business/settings (primary, purple, green, red, yellow, orange, sky)
 */

/* --- Tokens base --- */
.frd-app-header,
.frd-sidebar-brand,
.side-bar {
  --frd-hdr-accent: #3b82f6;
  --frd-hdr-accent-hover: #2563eb;
  --frd-hdr-accent-muted: rgba(59, 130, 246, 0.35);
  --frd-hdr-accent-glow: rgba(59, 130, 246, 0.25);
  --frd-hdr-bg-from: #0f172a;
  --frd-hdr-bg-to: #1e293b;
  --frd-hdr-text: #f8fafc;
  --frd-hdr-text-muted: rgba(248, 250, 252, 0.72);
  --frd-hdr-surface: rgba(255, 255, 255, 0.06);
  --frd-hdr-surface-hover: rgba(255, 255, 255, 0.12);
  --frd-hdr-border: rgba(255, 255, 255, 0.1);
  --frd-hdr-radius: 10px;
  --frd-hdr-height: 60px;
  --frd-hdr-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.frd-header-theme-primary {
  --frd-hdr-accent: #3b82f6;
  --frd-hdr-accent-hover: #2563eb;
  --frd-hdr-accent-muted: rgba(59, 130, 246, 0.4);
  --frd-hdr-accent-glow: rgba(59, 130, 246, 0.3);
}

.frd-header-theme-purple {
  --frd-hdr-accent: #9333ea;
  --frd-hdr-accent-hover: #7e22ce;
  --frd-hdr-accent-muted: rgba(147, 51, 234, 0.4);
  --frd-hdr-accent-glow: rgba(147, 51, 234, 0.3);
}

.frd-header-theme-green {
  --frd-hdr-accent: #16a34a;
  --frd-hdr-accent-hover: #15803d;
  --frd-hdr-accent-muted: rgba(22, 163, 74, 0.4);
  --frd-hdr-accent-glow: rgba(22, 163, 74, 0.3);
}

.frd-header-theme-red {
  --frd-hdr-accent: #dc2626;
  --frd-hdr-accent-hover: #b91c1c;
  --frd-hdr-accent-muted: rgba(220, 38, 38, 0.35);
  --frd-hdr-accent-glow: rgba(220, 38, 38, 0.25);
}

.frd-header-theme-yellow {
  --frd-hdr-accent: #ca8a04;
  --frd-hdr-accent-hover: #a16207;
  --frd-hdr-accent-muted: rgba(202, 138, 4, 0.45);
  --frd-hdr-accent-glow: rgba(202, 138, 4, 0.3);
}

.frd-header-theme-orange {
  --frd-hdr-accent: #ea580c;
  --frd-hdr-accent-hover: #c2410c;
  --frd-hdr-accent-muted: rgba(234, 88, 12, 0.4);
  --frd-hdr-accent-glow: rgba(234, 88, 12, 0.3);
}

.frd-header-theme-sky {
  --frd-hdr-accent: #0284c7;
  --frd-hdr-accent-hover: #0369a1;
  --frd-hdr-accent-muted: rgba(2, 132, 199, 0.4);
  --frd-hdr-accent-glow: rgba(2, 132, 199, 0.3);
}

/* --- Barra principal --- */
.frd-app-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: var(--frd-hdr-height);
  height: var(--frd-hdr-height);
  padding: 0 1rem;
  flex-shrink: 0;
  z-index: 1030;
  color: var(--frd-hdr-text);
  background: linear-gradient(135deg, var(--frd-hdr-bg-from) 0%, var(--frd-hdr-bg-to) 100%);
  border-bottom: 1px solid var(--frd-hdr-border);
  box-shadow: var(--frd-hdr-shadow);
  gap: 0.75rem;
}

@media (min-width: 1024px) {
  .frd-app-header {
    padding: 0 1.5rem;
  }
}

/* Línea superior: neutra en reposo, acento solo durante estados de carga. */
.frd-app-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--frd-hdr-bg-from), var(--frd-hdr-bg-to));
  opacity: 1;
  pointer-events: none;
}

.frd-app-header.is-loading::before,
body.is-loading .frd-app-header::before,
body.loading .frd-app-header::before {
  background: linear-gradient(90deg, var(--frd-hdr-accent), var(--frd-hdr-accent-hover));
  opacity: 0.95;
}

@supports (backdrop-filter: blur(8px)) {
  .frd-app-header {
    /* Evitar backdrop-filter aquí para prevenir containing blocks anómalos en dropdowns y menús */
  }
}

.frd-app-header__left {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0.5rem;
  flex-shrink: 0;
  min-width: 0;
}

.frd-app-header__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.375rem;
  flex-wrap: nowrap;
}

@media (min-width: 768px) {
  .frd-app-header__right {
    gap: 0.5rem;
  }
}

.frd-app-header__primary {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 1;
  min-width: 0;
  flex-wrap: nowrap;
}

.frd-app-header__utilities {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding-left: 0.35rem;
  border-left: 1px solid var(--frd-hdr-border);
  margin-left: 0.25rem;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

@media (max-width: 767px) {
  .frd-app-header__utilities {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
  }
}

/* Marca móvil */
.frd-app-header__brand-mobile {
  display: none !important;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .frd-app-header__brand-mobile {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .frd-app-header__brand-mobile {
    display: none !important;
  }
}

.frd-app-header__brand-name {
  margin: 0;
  font-size: 0.8325rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--frd-hdr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frd-app-header__status-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.35);
}

.frd-electronic-header-logo {
  display: inline-flex !important;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 190px;
  margin-left: 0.75rem;
  text-decoration: none !important;
}

.frd-electronic-header-logo img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 28px;
  object-fit: contain;
}

.frd-electronic-search-mobile {
  display: none;
}

@media (max-width: 767px) {
  .frd-app-header--electronic .frd-electronic-search-left {
    display: none;
  }

  .frd-app-header--electronic .frd-electronic-search-mobile {
    display: inline-flex;
  }

  .frd-electronic-header-logo {
    max-width: 142px;
    margin-left: 0.25rem;
  }

  .frd-electronic-header-logo img {
    max-height: 23px;
  }
}

@media (max-width: 380px) {
  .frd-electronic-header-logo {
    max-width: 118px;
  }
}

/* Sidebar brand (desktop) */
.frd-sidebar-brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--frd-hdr-height);
  height: var(--frd-hdr-height);
  flex-shrink: 0;
  text-decoration: none;
  color: var(--frd-hdr-text);
  background: linear-gradient(135deg, var(--frd-hdr-bg-from) 0%, var(--frd-hdr-bg-to) 100%);
  border-right: 0;
}

.frd-sidebar-brand::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--frd-hdr-bg-from), var(--frd-hdr-bg-to));
  opacity: 1;
}

.frd-sidebar-brand.is-loading::before,
body.is-loading .frd-sidebar-brand::before,
body.loading .frd-sidebar-brand::before {
  background: linear-gradient(90deg, var(--frd-hdr-accent), var(--frd-hdr-accent-hover));
  opacity: 0.95;
}

.frd-sidebar-brand__name {
  margin: 0;
  padding: 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
  color: var(--frd-hdr-text);
}

.frd-sidebar-brand__status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 4px;
  vertical-align: middle;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.35);
}

/* Sidebar navigation */
.side-bar {
  --frd-sidebar-bg: #f8fafc;
  --frd-sidebar-surface-hover: #eef2f7;
  --frd-sidebar-text: #334155;
  --frd-sidebar-muted: #64748b;
  --frd-sidebar-border: #e5e7eb;
  --frd-sidebar-active-bg: rgba(59, 130, 246, 0.1);
  --frd-sidebar-active-border: rgba(59, 130, 246, 0.24);
  --frd-sidebar-accent: #2563eb;
  background: var(--frd-sidebar-bg) !important;
  border-right: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.frd-header-theme-purple.side-bar {
  --frd-sidebar-active-bg: rgba(147, 51, 234, 0.1);
  --frd-sidebar-active-border: rgba(147, 51, 234, 0.24);
  --frd-sidebar-accent: #7e22ce;
}

.frd-header-theme-green.side-bar {
  --frd-sidebar-active-bg: rgba(22, 163, 74, 0.1);
  --frd-sidebar-active-border: rgba(22, 163, 74, 0.24);
  --frd-sidebar-accent: #15803d;
}

.frd-header-theme-red.side-bar {
  --frd-sidebar-active-bg: rgba(220, 38, 38, 0.1);
  --frd-sidebar-active-border: rgba(220, 38, 38, 0.24);
  --frd-sidebar-accent: #b91c1c;
}

.frd-header-theme-yellow.side-bar {
  --frd-sidebar-active-bg: rgba(202, 138, 4, 0.12);
  --frd-sidebar-active-border: rgba(202, 138, 4, 0.28);
  --frd-sidebar-accent: #a16207;
}

.frd-header-theme-orange.side-bar {
  --frd-sidebar-active-bg: rgba(234, 88, 12, 0.11);
  --frd-sidebar-active-border: rgba(234, 88, 12, 0.26);
  --frd-sidebar-accent: #c2410c;
}

.frd-header-theme-sky.side-bar {
  --frd-sidebar-active-bg: rgba(2, 132, 199, 0.1);
  --frd-sidebar-active-border: rgba(2, 132, 199, 0.24);
  --frd-sidebar-accent: #0369a1;
}

.frd-sidebar-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.22rem;
  min-height: 0;
  width: 100%;
  padding: 0.75rem 0.625rem 0.875rem;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--frd-sidebar-text);
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.35) transparent;
}

.frd-sidebar-nav::-webkit-scrollbar {
  width: 8px;
}

.frd-sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.26);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}

.frd-sidebar-divider {
  height: 1px;
  margin: 0.45rem 0.5rem;
  background: var(--frd-sidebar-border);
}

.frd-sidebar-section-title {
  padding: 0.7rem 0.65rem 0.2rem;
  margin-top: 0.15rem;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.2;
  user-select: none;
}

.frd-sidebar-nav > .frd-sidebar-section-title:first-child {
  margin-top: 0;
  padding-top: 0.15rem;
}

.frd-sidebar-group {
  border-radius: 14px;
}

.frd-sidebar-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 36px;
  padding: 0.47rem 0.625rem;
  color: var(--frd-sidebar-text);
  font-size: 0.895rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
  outline: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.frd-sidebar-item:hover,
.frd-sidebar-item:focus {
  color: #0f172a;
  text-decoration: none;
  background: var(--frd-sidebar-surface-hover);
  border-color: #e2e8f0;
}

.frd-sidebar-item.is-active,
.frd-sidebar-item--group.is-open {
  color: #0f172a;
  font-weight: 600;
  background: var(--frd-sidebar-active-bg);
  border-color: var(--frd-sidebar-active-border);
}

.frd-sidebar-item.is-active::before {
  content: '';
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -0.75rem;
  width: 3px;
  background: var(--frd-hdr-accent);
  border-radius: 999px;
}

.frd-sidebar-item__icon,
.frd-sidebar-subitem__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--frd-sidebar-muted);
}

.frd-sidebar-item:hover .frd-sidebar-item__icon,
.frd-sidebar-item:focus .frd-sidebar-item__icon,
.frd-sidebar-item.is-active .frd-sidebar-item__icon,
.frd-sidebar-item--group.is-open .frd-sidebar-item__icon {
  color: var(--frd-hdr-accent);
}

.frd-sidebar-item__icon svg,
.frd-sidebar-item__icon i,
.frd-sidebar-subitem__icon svg,
.frd-sidebar-subitem__icon i {
  display: block;
  width: 1rem !important;
  height: 1rem !important;
  min-width: 0;
  min-height: 0;
  max-width: 1rem;
  max-height: 1rem;
  font-size: 1rem !important;
  line-height: 1rem !important;
  flex: 0 0 auto;
}

.frd-sidebar-item__icon i,
.frd-sidebar-subitem__icon i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.frd-sidebar-item__label,
.frd-sidebar-subitem__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.frd-sidebar-item__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  align-self: center;
  margin-left: auto;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--frd-sidebar-accent, #2563eb);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

/* Insignia del plan ("Mi plan"): ámbar con pocos días, rojo si venció o no hay plan. */
.frd-sidebar-item[data-badge-tone="warn"] .frd-sidebar-item__pill {
  background: #d97706;
}
.frd-sidebar-item[data-badge-tone="danger"] .frd-sidebar-item__pill {
  background: #e11d48;
}
/* Con el menú colapsado la insignia se oculta: un punto sobre el icono avisa igual. */
body.sidebar-collapse .frd-sidebar-item[data-badge-tone="warn"] .frd-sidebar-item__icon,
body.sidebar-collapse .frd-sidebar-item[data-badge-tone="danger"] .frd-sidebar-item__icon {
  position: relative;
}
body.sidebar-collapse .frd-sidebar-item[data-badge-tone="warn"] .frd-sidebar-item__icon::after,
body.sidebar-collapse .frd-sidebar-item[data-badge-tone="danger"] .frd-sidebar-item__icon::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d97706;
  box-shadow: 0 0 0 2px #fff;
}
body.sidebar-collapse .frd-sidebar-item[data-badge-tone="danger"] .frd-sidebar-item__icon::after {
  background: #e11d48;
}

.frd-sidebar-item__chevron {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  margin-left: auto;
  color: #94a3b8;
  transition: color 0.15s ease;
}

.frd-sidebar-item--group.is-open .frd-sidebar-item__chevron {
  color: var(--frd-hdr-accent);
}

.frd-sidebar-submenu {
  position: relative;
  margin: 0.25rem 0 0.45rem 1.15rem;
  padding-left: 0.85rem;
}

.frd-sidebar-submenu::before {
  content: '';
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 0.25rem;
  width: 1px;
  background: #dbe3ed;
}

.frd-sidebar-submenu__inner {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.frd-sidebar-subitem {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.38rem;
  min-height: 28px;
  padding: 0.28rem 0.45rem;
  color: var(--frd-sidebar-muted);
  font-size: 0.845rem;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  border-radius: 9px;
  outline: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.frd-sidebar-subitem:hover,
.frd-sidebar-subitem:focus {
  color: #0f172a;
  text-decoration: none;
  background: rgba(241, 245, 249, 0.9);
}

.frd-sidebar-subitem.is-active {
  color: var(--frd-hdr-accent);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.78);
}

.frd-sidebar-subitem__dot {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  background: #cbd5e1;
  border-radius: 999px;
}

.frd-sidebar-subitem.is-active .frd-sidebar-subitem__dot {
  background: var(--frd-hdr-accent);
}

.frd-sidebar-subitem__icon svg,
.frd-sidebar-subitem__icon i {
  width: 0.85rem;
  height: 0.85rem;
  font-size: 0.8rem;
}

/* Footer fijo: perfil integrado (estilo referencia Dribbble / sidebar minimal) */
.frd-sidebar-footer {
  flex: 0 0 auto;
  margin-top: auto;
  padding: 0.75rem 0.625rem 0.875rem;
  background: var(--frd-sidebar-bg);
  border-top: 1px solid rgba(203, 213, 225, 0.72);
}

.frd-sidebar-profile {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 44px;
}

.frd-sidebar-profile__identity {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  flex: 1 1 auto;
  padding: 0.35rem 0.4rem;
  color: inherit;
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.frd-sidebar-profile__identity:hover,
.frd-sidebar-profile__identity:focus {
  color: inherit;
  text-decoration: none;
  background: var(--frd-sidebar-surface-hover);
}

.frd-sidebar-profile__avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  flex: 0 0 2.125rem;
  overflow: hidden;
  color: #fff;
  /* #64748b: el blanco sobre #cbd5e1 quedaba en 1.5:1 */
  background: #64748b;
  border-radius: 999px;
}

.frd-sidebar-profile__avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frd-sidebar-profile__avatar-img--failed {
  display: none;
}

.frd-sidebar-profile__avatar-fallback {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.frd-sidebar-profile__avatar-fallback--hidden {
  display: none;
}

.frd-sidebar-profile__text {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.frd-sidebar-profile__text strong,
.frd-sidebar-profile__text > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frd-sidebar-profile__text strong {
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 650;
}

.frd-sidebar-profile__text > span {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 500;
}

.frd-sidebar-profile__menu {
  position: relative;
  margin-left: auto;
  flex: 0 0 auto;
}

.frd-sidebar-profile__menu > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
}

.frd-sidebar-profile__menu > summary::-webkit-details-marker {
  display: none;
}

.frd-sidebar-profile__settings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  color: #64748b;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.frd-sidebar-profile__settings svg {
  width: 1.05rem;
  height: 1.05rem;
}

.frd-sidebar-profile__settings:hover,
.frd-sidebar-profile__settings:focus,
.frd-sidebar-profile__menu[open] .frd-sidebar-profile__settings {
  color: #334155;
  background: var(--frd-sidebar-surface-hover);
}

.frd-sidebar-profile__dropdown {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.45rem);
  z-index: 1060;
  min-width: 10.5rem;
  padding: 0.3rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.frd-sidebar-profile__dropdown a {
  display: block;
  padding: 0.45rem 0.55rem;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 8px;
}

.frd-sidebar-profile__dropdown a:hover,
.frd-sidebar-profile__dropdown a:focus {
  color: #0f172a;
  text-decoration: none;
  background: #f1f5f9;
}

.frd-sidebar-profile__dropdown .frd-sidebar-profile__danger:hover,
.frd-sidebar-profile__dropdown .frd-sidebar-profile__danger:focus {
  color: #b91c1c;
  background: #fef2f2;
}

@media (min-width: 1024px) {
  /* El menú se queda en pantalla. Solo la lista hace scroll, como el sidebar de TailAdmin. */
  html:has(body.sidebar-mini) {
    height: 100%;
    overflow: hidden;
  }

  body.sidebar-mini {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  body.sidebar-mini .thetop {
    display: flex;
    flex: 1 1 auto;
    align-items: stretch;
    min-height: 0;
    overflow: visible;
  }

  body.sidebar-mini .thetop > main {
    min-width: 0;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1), width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.sidebar-mini #scrollable-container {
    min-height: 0;
    overflow-y: auto;
  }

  body.sidebar-mini .side-bar {
    align-self: stretch;
    height: auto;
    max-height: 100%;
    min-height: 0;
  }

  body.sidebar-mini:not(.sidebar-collapse) .side-bar {
    overflow: hidden;
  }

  /* Sidebar Colapsado en Modo Iconos (Mini Sidebar) */
  body.sidebar-collapse .thetop {
    position: relative;
    z-index: auto;
  }

  body.sidebar-mini.sidebar-collapse:not(.lockscreen):not(.frd-restaurante-shell) .thetop > main {
    margin-left: 4.5rem !important;
    width: calc(100% - 4.5rem) !important;
    max-width: calc(100% - 4.5rem) !important;
    flex: 1 1 auto;
  }

  body.lockscreen .thetop > main,
  body.lockscreen.sidebar-collapse .thetop > main,
  body.frd-restaurante-shell .thetop > main,
  body.frd-restaurante-shell.sidebar-collapse .thetop > main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto;
  }

  body.modal-open .thetop,
  body.lockscreen .thetop {
    z-index: auto !important;
  }

  body.sidebar-collapse .side-bar {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    width: 4.5rem !important;
    min-width: 4.5rem !important;
    max-width: 4.5rem !important;
    margin-right: 0 !important;
    overflow: hidden !important;
    z-index: 1050 !important;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.25s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
  }

  body.sidebar-collapse .side-bar .frd-sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.35) transparent;
  }

  body.sidebar-collapse .frd-sidebar-brand {
    padding: 0 0.5rem;
    justify-content: center;
  }

  body.sidebar-collapse .frd-sidebar-brand__name {
    display: none !important;
  }

  body.sidebar-collapse .frd-sidebar-brand__mark {
    display: block;
    width: 2.25rem;
    height: 2.25rem;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
  }

  body.sidebar-collapse .frd-sidebar-section-title {
    display: none !important;
  }

  body.sidebar-collapse .frd-sidebar-divider {
    margin: 0.35rem 0.6rem;
  }

  body.sidebar-collapse .frd-sidebar-item {
    justify-content: center;
    padding: 0.55rem 0;
    gap: 0;
    position: relative;
  }

  body.sidebar-collapse .frd-sidebar-item__label,
  body.sidebar-collapse .frd-sidebar-item__chevron,
  body.sidebar-collapse .frd-sidebar-item__pill {
    display: none !important;
  }

  body.sidebar-collapse .frd-sidebar-item__icon {
    flex: 0 0 auto;
    margin: 0 auto;
  }

  body.sidebar-collapse .frd-sidebar-item.is-active::before {
    left: 0;
    width: 3.5px;
  }

  /* Footer en modo colapsado */
  body.sidebar-collapse .frd-sidebar-footer {
    padding: 0.6rem 0.25rem;
  }

  body.sidebar-collapse .frd-sidebar-profile {
    justify-content: center;
    gap: 0;
  }

  body.sidebar-collapse .frd-sidebar-profile__identity {
    justify-content: center;
    padding: 0.25rem 0;
  }

  body.sidebar-collapse .frd-sidebar-profile__text,
  body.sidebar-collapse .frd-sidebar-profile__menu {
    display: none !important;
  }

  /* El submenú vive en el body (position: fixed) para no recortarse con el scroll. */
  body.sidebar-collapse .frd-sidebar-group .frd-sidebar-submenu {
    display: none !important;
  }

  body.sidebar-collapse .frd-sidebar-group .frd-sidebar-subitem {
    padding: 0.45rem 0.65rem;
    font-size: 0.85rem;
  }

  /* Riel de íconos: sin texto al lado, el ícono de 16px no se distingue.
     Cuadros de 44px con íconos de 22px y el color del texto del menú. */
  body.sidebar-collapse .frd-sidebar-item {
    width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
    margin: 0.125rem auto;
    padding: 0;
    border-radius: 12px;
  }

  body.sidebar-collapse .frd-sidebar-item__icon {
    flex: 0 0 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
    color: var(--frd-sidebar-text);
  }

  body.sidebar-collapse .frd-sidebar-item__icon svg,
  body.sidebar-collapse .frd-sidebar-item__icon i {
    width: 1.375rem !important;
    height: 1.375rem !important;
    max-width: 1.375rem;
    max-height: 1.375rem;
    font-size: 1.25rem !important;
    line-height: 1.375rem !important;
    stroke-width: 1.75;
  }

  body.sidebar-collapse .frd-sidebar-item.is-active,
  body.sidebar-collapse .frd-sidebar-item--group.is-open {
    background: var(--frd-sidebar-active-bg);
    border-color: var(--frd-sidebar-active-border);
  }

  body.sidebar-collapse .frd-sidebar-item.is-active::before {
    display: none;
  }

  /* Hover-expand: Al pasar el cursor en modo colapsado (icons-only), expandir temporalmente a ancho completo flotando sobre el contenido sin mover el layout */
  body.sidebar-collapse .side-bar:hover,
  body.sidebar-collapse.frd-sidebar-hover-open .side-bar,
  body.sidebar-collapse .side-bar.is-hover-expanded {
    width: 16rem !important;
    min-width: 16rem !important;
    max-width: 16rem !important;
    margin-right: 0 !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-brand,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-brand,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-brand {
    padding: 0 0.75rem !important;
    justify-content: center !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-brand__name,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-brand__name,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-brand__name {
    display: block !important;
    opacity: 1 !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-brand__mark,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-brand__mark,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-brand__mark {
    display: none !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-section-title,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-section-title,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-section-title {
    display: block !important;
    opacity: 1 !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-divider,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-divider,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-divider {
    margin: 0.45rem 0.5rem !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-item,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-item,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-item {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 36px !important;
    margin: 0 !important;
    padding: 0.47rem 0.625rem !important;
    border-radius: 10px !important;
    justify-content: flex-start !important;
    gap: 0.625rem !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-item__label,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-item__label,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-item__label {
    display: inline-block !important;
    opacity: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-item__chevron,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-item__chevron,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-item__chevron {
    display: inline-block !important;
    opacity: 1 !important;
    margin-left: auto !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-item__pill,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-item__pill,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-item__pill {
    display: inline-flex !important;
    opacity: 1 !important;
    margin-left: auto !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-item__icon,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-item__icon,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-item__icon {
    flex: 0 0 1.25rem !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
    margin: 0 !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-item__icon svg,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-item__icon svg,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-item__icon svg,
  body.sidebar-collapse .side-bar:hover .frd-sidebar-item__icon i,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-item__icon i,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-item__icon i {
    width: 1.25rem !important;
    height: 1.25rem !important;
    max-width: 1.25rem !important;
    max-height: 1.25rem !important;
    font-size: 1.15rem !important;
    line-height: 1.25rem !important;
    stroke-width: 1.6 !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-item.is-active::before,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-item.is-active::before,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-item.is-active::before {
    display: block !important;
    left: 0 !important;
    width: 3.5px !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-footer,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-footer,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-footer {
    padding: 0.65rem 0.625rem !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-profile,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-profile,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-profile {
    justify-content: space-between !important;
    gap: 0.5rem !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-profile__identity,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-profile__identity,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-profile__identity {
    justify-content: flex-start !important;
    padding: 0.25rem 0.4rem !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-profile__text,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-profile__text,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-profile__text {
    display: flex !important;
    opacity: 1 !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-profile__menu,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-profile__menu,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-profile__menu {
    display: block !important;
    opacity: 1 !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-group.is-open .frd-sidebar-submenu,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-group.is-open .frd-sidebar-submenu,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-group.is-open .frd-sidebar-submenu {
    display: block !important;
  }

  body.sidebar-collapse .side-bar:hover .frd-sidebar-item__label,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-item__label,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-item__label,
  body.sidebar-collapse .side-bar:hover .frd-sidebar-section-title,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-section-title,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-section-title,
  body.sidebar-collapse .side-bar:hover .frd-sidebar-brand__name,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-brand__name,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-brand__name,
  body.sidebar-collapse .side-bar:hover .frd-sidebar-profile__text,
  body.sidebar-collapse.frd-sidebar-hover-open .frd-sidebar-profile__text,
  body.sidebar-collapse .side-bar.is-hover-expanded .frd-sidebar-profile__text {
    animation: frdSidebarHoverIn 0.2s cubic-bezier(0, 0, 0.2, 1) both;
  }

  /* Estado fijo / anclado: el sidebar toma su lugar en el flujo flex y el SaaS se ajusta */
  body.sidebar-mini:not(.sidebar-collapse) .thetop > main {
    margin-left: 0 !important;
  }

  body.sidebar-mini:not(.sidebar-collapse) .side-bar {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    height: auto !important;
    width: 16rem;
    min-width: 16rem;
    max-width: 16rem;
    margin-right: 0 !important;
    box-shadow: none !important;
  }

  body.sidebar-mini .side-bar {
    transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.28s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Al cerrar: los textos se desvanecen antes de encoger (frd-sidebar-fading lo pone el JS 120ms). */
  body.frd-sidebar-fading .frd-sidebar-item__label,
  body.frd-sidebar-fading .frd-sidebar-item__chevron,
  body.frd-sidebar-fading .frd-sidebar-item__pill,
  body.frd-sidebar-fading .frd-sidebar-section-title,
  body.frd-sidebar-fading .frd-sidebar-brand__name,
  body.frd-sidebar-fading .frd-sidebar-profile__text,
  body.frd-sidebar-fading .frd-sidebar-profile__menu {
    opacity: 0;
    transition: opacity 0.12s ease;
  }

  /* Al abrir: los textos entran con un fundido mientras el menú crece. */
  body.frd-sidebar-expanding .frd-sidebar-item__label,
  body.frd-sidebar-expanding .frd-sidebar-item__chevron,
  body.frd-sidebar-expanding .frd-sidebar-item__pill,
  body.frd-sidebar-expanding .frd-sidebar-section-title,
  body.frd-sidebar-expanding .frd-sidebar-brand__name,
  body.frd-sidebar-expanding .frd-sidebar-profile__text,
  body.frd-sidebar-expanding .frd-sidebar-profile__menu {
    animation: frdSidebarTextIn 0.22s ease 0.1s both;
  }
}

@keyframes frdSidebarTextIn {
  from {
    opacity: 0;
    transform: translateX(-4px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes frdSidebarHoverIn {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sidebar-mini .side-bar {
    transition: none !important;
  }

  body.frd-sidebar-expanding .frd-sidebar-item__label,
  body.frd-sidebar-expanding .frd-sidebar-section-title,
  body.frd-sidebar-expanding .frd-sidebar-brand__name,
  body.sidebar-collapse .side-bar:hover .frd-sidebar-item__label,
  body.sidebar-collapse .side-bar:hover .frd-sidebar-section-title,
  body.sidebar-collapse .side-bar:hover .frd-sidebar-brand__name {
    animation: none !important;
  }
}

.frd-sidebar-brand__mark {
  display: none;
}

body.sidebar-collapse .frd-sidebar-submenu.is-flyout-open {
  display: block !important;
  position: fixed;
  z-index: 4000;
  margin: 0;
  padding: 0.5rem;
  width: 15rem;
  min-width: 15rem;
  max-height: calc(100dvh - 1rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  background: var(--frd-sidebar-bg, #ffffff);
  border: 1px solid var(--frd-sidebar-border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 14px 35px -5px rgba(15, 23, 42, 0.22), 0 8px 12px -6px rgba(15, 23, 42, 0.15);
  animation: frdFlyoutFade 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

body.sidebar-collapse .frd-sidebar-submenu.is-flyout-open::before {
  display: none;
}

.frd-sidebar-fly-tip {
  position: fixed;
  z-index: 4010;
  display: none;
  max-width: 16rem;
  padding: 0.3rem 0.6rem;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.frd-sidebar-fly-tip.is-visible {
  display: block;
}

@keyframes frdFlyoutFade {
  from {
    opacity: 0;
    transform: translateX(4px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 1023px) {
  .side-bar {
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    flex-direction: column !important;
    height: 100vh !important;
    height: 100dvh !important;
    width: min(82vw, 18rem) !important;
    max-width: 18rem;
    min-height: 0;
    overflow: hidden;
    transform: translateX(-100%);
  }

  body.frd-sidebar-mobile-open {
    overflow: hidden;
    touch-action: none;
  }

  .side-bar.small-view-side-active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }

  .side-bar.small-view-side-active .frd-sidebar-brand,
  .side-bar.small-view-side-active .frd-sidebar-nav,
  .side-bar.small-view-side-active .frd-sidebar-footer {
    display: flex;
  }

  .side-bar .frd-sidebar-nav {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .frd-sidebar-footer {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 24px rgba(248, 250, 252, 0.92);
  }

  .frd-sidebar-profile {
    width: 100%;
  }

  .frd-sidebar-profile__identity {
    min-width: 0;
  }

  .frd-sidebar-profile__menu {
    margin-left: auto;
  }

  .frd-sidebar-profile__dropdown {
    right: 0;
    bottom: calc(100% + 0.5rem);
    width: calc(min(82vw, 18rem) - 1.25rem);
    max-height: min(48vh, 18rem);
    max-height: min(48dvh, 18rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

}

/* --- Botones del header --- */
.frd-hdr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 36px;
  padding: 0.375rem 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  color: var(--frd-hdr-text);
  text-decoration: none;
  background: var(--frd-hdr-surface);
  border: 1px solid var(--frd-hdr-border);
  border-radius: var(--frd-hdr-radius);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.frd-hdr-btn:hover,
.frd-hdr-btn:focus {
  color: var(--frd-hdr-text);
  text-decoration: none;
  background: var(--frd-hdr-surface-hover);
  border-color: rgba(255, 255, 255, 0.18);
}

.frd-hdr-btn:focus-visible {
  outline: 2px solid var(--frd-hdr-accent);
  outline-offset: 2px;
}

.frd-hdr-btn--icon {
  padding: 0.5rem;
  min-width: 36px;
}

/* El sidebar está oculto por debajo de lg, así que ahí usamos el menú móvil.
   En desktop el sidebar existe y usamos el botón de colapsar. */
.frd-app-header .small-view-button {
  display: inline-flex !important;
}

.frd-app-header .side-bar-collapse {
  display: none !important;
}

@media (min-width: 1024px) {
  .frd-app-header .small-view-button {
    display: none !important;
  }

  .frd-app-header .side-bar-collapse {
    display: inline-flex !important;
  }

  .frd-app-header .side-bar-collapse .frd-sidebar-collapse-icon {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
  }

  .frd-app-header .side-bar-collapse .frd-sidebar-collapse-arrow {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: 14.75px 12px;
  }

  .frd-app-header .side-bar-collapse.is-sidebar-hidden .frd-sidebar-collapse-arrow {
    transform: rotate(180deg);
  }
}

.frd-hdr-btn--primary {
  background: var(--frd-hdr-accent);
  border-color: transparent;
  box-shadow: 0 1px 2px var(--frd-hdr-accent-glow);
}

.frd-hdr-btn--primary:hover,
.frd-hdr-btn--primary:focus {
  background: var(--frd-hdr-accent-hover);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 8px var(--frd-hdr-accent-glow);
}

.frd-hdr-btn--danger {
  background: #dc2626;
  border-color: transparent;
  color: #fff;
}

.frd-hdr-btn--danger:hover {
  background: #b91c1c;
  color: #fff;
}

.frd-electronic-exit-btn {
  height: 34px;
  padding: 0 0.75rem;
  margin-right: 0.75rem;
  gap: 0.4rem;
  background: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(248, 113, 113, 0.22);
}

.frd-electronic-exit-btn:hover,
.frd-electronic-exit-btn:focus {
  background: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
  color: #ffffff !important;
}

@media (max-width: 767px) {
  .frd-app-header {
    padding: 0 0.625rem;
    gap: 0.35rem;
  }

  .frd-app-header__left,
  .frd-app-header__right,
  .frd-app-header__utilities {
    gap: 0.3rem;
  }

  .frd-electronic-exit-btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    margin-right: 0;
    border-radius: 10px;
  }

  .frd-electronic-exit-btn__label {
    display: none;
  }

  .frd-app-header .frd-hdr-profile-trigger {
    padding-right: 0.25rem;
  }
}

.frd-hdr-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.frd-hdr-btn__icon-pos {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
}

.frd-hdr-btn__label {
  display: none;
}

@media (min-width: 640px) {
  .frd-hdr-btn__label {
    display: inline;
  }
}

/* Buscador universal / command palette */
.frd-global-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 190px;
  height: 36px;
  padding: 0 0.5rem 0 0.75rem;
  color: var(--frd-hdr-text-muted);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--frd-hdr-border);
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, width 0.2s ease;
}

@media (max-width: 1279px) {
  .frd-global-search-trigger {
    min-width: 36px !important;
    width: 36px !important;
    padding: 0 !important;
    justify-content: center !important;
  }

  .frd-global-search-trigger__text,
  .frd-global-search-trigger__kbd {
    display: none !important;
  }
}

.frd-global-search-trigger:hover,
.frd-global-search-trigger:focus {
  color: var(--frd-hdr-text);
  background: var(--frd-hdr-surface-hover);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 3px var(--frd-hdr-accent-glow);
}

.frd-global-search-trigger svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.frd-global-search-trigger__text {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: rgba(248, 250, 252, 0.78);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frd-global-search-trigger__kbd {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 0.45rem;
  color: rgba(248, 250, 252, 0.78);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  background: rgba(15, 23, 42, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  box-shadow: none;
}

.frd-command-palette[hidden] {
  display: none !important;
}

.frd-command-palette {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 1rem 1rem;
}

.frd-command-palette__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(8px);
}

.frd-command-palette__dialog {
  position: relative;
  width: min(720px, 100%);
  overflow: hidden;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.frd-command-palette__search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1rem 0.875rem;
  border-bottom: 1px solid #e5eaf2;
}

.frd-command-palette__search svg {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  color: var(--frd-hdr-accent);
}

.frd-command-palette__search input {
  min-width: 0;
  flex: 1;
  height: 44px;
  padding: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
  border: 0;
  outline: none;
  box-shadow: none;
}

.frd-command-palette__search input::placeholder {
  color: #8a98aa;
  font-weight: 500;
}

.frd-command-palette__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  min-width: 42px;
  padding: 0 0.55rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 800;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
}

.frd-command-palette__body {
  max-height: min(62vh, 560px);
  overflow-y: auto;
  padding: 0.75rem;
}

.frd-command-palette__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
  padding: 0.25rem 0.375rem 0.625rem;
  margin-bottom: 0.125rem;
  border-bottom: 1px solid #eef2f7;
}

.frd-command-palette__intro p {
  margin: 0;
  color: var(--frd-hdr-accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.frd-command-palette__intro span {
  color: #111827;
  font-size: 0.9375rem;
  font-weight: 700;
}

.frd-command-palette__group + .frd-command-palette__group {
  margin-top: 0.625rem;
}

.frd-command-palette__group {
  min-width: 0;
  padding: 0.5rem;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 12px;
}

.frd-command-palette__group-title {
  margin: 0 0 0.35rem;
  padding: 0.125rem 0.25rem 0.45rem;
  color: #64748b;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.frd-command-palette__item {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.75rem;
  min-height: 42px;
  padding: 0.55rem 0.7rem;
  color: #374151;
  text-align: left;
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.frd-command-palette__item:hover,
.frd-command-palette__item.is-active {
  color: var(--frd-hdr-accent);
  background: #fff;
  border-color: #e2e8f0;
}

.frd-command-palette__item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  min-width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: #9ca3af;
  background: transparent;
  border-radius: 0;
  text-align: center;
}

.frd-command-palette__item:hover .frd-command-palette__item-icon,
.frd-command-palette__item.is-active .frd-command-palette__item-icon {
  color: var(--frd-hdr-accent);
}

.frd-command-palette__item-copy {
  min-width: 0;
  flex: 1;
}

.frd-command-palette__item-copy strong,
.frd-command-palette__item-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frd-command-palette__item-copy strong {
  color: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
}

.frd-command-palette__item-copy small {
  margin-top: 0.12rem;
  color: #66758a;
  font-size: 0.75rem;
  font-weight: 500;
}

.frd-command-palette__item-badge {
  flex-shrink: 0;
  max-width: 92px;
  overflow: hidden;
  padding: 0.18rem 0.45rem;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #eef2f7;
  border-radius: 999px;
}

.frd-command-palette__loading {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  padding: 2.5rem 0;
}

.frd-command-palette__loading span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--frd-hdr-accent);
  animation: frd-command-pulse 0.9s infinite ease-in-out;
}

.frd-command-palette__loading span:nth-child(2) {
  animation-delay: 0.12s;
}

.frd-command-palette__loading span:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes frd-command-pulse {
  0%, 80%, 100% {
    opacity: 0.35;
    transform: scale(0.85);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

.frd-command-palette__empty {
  padding: 2.25rem 1rem;
  text-align: center;
}

.frd-command-palette__empty strong,
.frd-command-palette__empty span {
  display: block;
}

.frd-command-palette__empty strong {
  color: #0f172a;
  font-size: 1rem;
}

.frd-command-palette__empty span {
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.85rem;
}

.frd-command-palette__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  background: #f8fafc;
  border-top: 1px solid #e5eaf2;
}

.frd-command-palette__footer span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.frd-command-palette kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 0.35rem;
  color: #334155;
  font-size: 0.7rem;
  font-weight: 800;
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  box-shadow: none;
}

body.frd-command-palette-open {
  overflow: hidden;
}

@media (max-width: 1180px) {
  .frd-global-search-trigger {
    min-width: 44px;
    width: 44px;
    justify-content: center;
    padding: 0;
    border-radius: var(--frd-hdr-radius);
  }

  .frd-global-search-trigger__text,
  .frd-global-search-trigger__kbd {
    display: none;
  }
}

@media (max-width: 767px) {
  .frd-command-palette {
    padding: 0.75rem;
  }

  .frd-command-palette__dialog {
    border-radius: 20px;
  }

  .frd-command-palette__intro,
  .frd-command-palette__footer {
    display: none;
  }

  .frd-command-palette__body {
    max-height: calc(100vh - 120px);
  }

  .frd-command-palette__item-badge {
    display: none;
  }
}


/* Dropdowns (details) */
.frd-hdr-dropdown {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.frd-hdr-dropdown > summary {
  list-style: none;
}

.frd-hdr-dropdown > summary::-webkit-details-marker {
  display: none;
}

.frd-hdr-dropdown__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 9999;
  min-width: 13rem;
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.15), 0 4px 12px rgba(15, 23, 42, 0.08);
}

.frd-hdr-dropdown__menu--wide {
  min-width: 14rem;
}

.frd-hdr-create-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
  width: min(92vw, 42rem);
  max-height: min(82vh, 680px);
  max-height: min(82dvh, 680px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0.875rem;
  padding-bottom: 2rem;
}

.frd-hdr-create-menu::-webkit-scrollbar {
  width: 6px;
}

.frd-hdr-create-menu::-webkit-scrollbar-track {
  background: transparent;
}

.frd-hdr-create-menu::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 9999px;
}

.frd-hdr-create-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.7);
}

@media (min-width: 768px) {
  .frd-hdr-dropdown .frd-hdr-create-menu {
    right: 50%;
    transform: translateX(50%);
  }
}

.frd-hdr-create-menu__head {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  grid-column: 1 / -1;
  padding: 0.25rem 0.375rem 0.625rem;
  border-bottom: 1px solid #eef2f7;
  margin-bottom: 0.125rem;
}

.frd-hdr-create-menu__eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--frd-hdr-accent);
}

.frd-hdr-create-menu__title {
  font-size: 0.9375rem;
  color: #111827;
}

.frd-hdr-create-menu__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.frd-hdr-create-menu__close:hover,
.frd-hdr-create-menu__close:focus {
  background: rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

.frd-hdr-create-section {
  min-width: 0;
  padding: 0.5rem;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 12px;
}

.frd-hdr-create-section__title {
  margin: 0;
  padding: 0.125rem 0.25rem 0.45rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.frd-hdr-create-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
}

.frd-hdr-create-grid .frd-hdr-dropdown__item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  min-height: 40px;
  padding: 0.5rem 0.75rem;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  transition: all 0.15s ease;
}

.frd-hdr-create-grid .frd-hdr-dropdown__item span {
  color: #0f172a;
  font-weight: 600;
  font-size: 0.875rem;
  flex: 1 1 auto;
}

.frd-hdr-create-grid .frd-hdr-dropdown__item i,
.frd-hdr-create-grid .frd-hdr-dropdown__item svg {
  color: var(--frd-theme-btn-from, #2563eb);
  font-size: 1rem;
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

.frd-hdr-create-grid .frd-hdr-dropdown__item:hover,
.frd-hdr-create-grid .frd-hdr-dropdown__item:focus {
  background: #f8fafc;
  border-color: #3b82f6;
  color: #000000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.frd-hdr-create-grid .frd-hdr-dropdown__item:hover span,
.frd-hdr-create-grid .frd-hdr-dropdown__item:focus span {
  color: #000000;
}

@media (min-width: 1280px) {
  .frd-hdr-create-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(90vw, 48rem);
  }
}

.frd-hdr-dropdown__item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.12s ease, color 0.12s ease;
}

.frd-hdr-dropdown__item:hover,
.frd-hdr-dropdown__item:focus {
  color: var(--frd-hdr-accent);
  background: #f8fafc;
  text-decoration: none;
}

.frd-hdr-dropdown__item svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: #9ca3af;
}

.frd-hdr-dropdown__item i {
  width: 1.25rem;
  min-width: 1.25rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.95rem;
}

.frd-hdr-dropdown__item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frd-hdr-dropdown__item:hover svg,
.frd-hdr-dropdown__item:hover i {
  color: var(--frd-hdr-accent);
}

.frd-hdr-dropdown__header {
  padding: 0.5rem 0.75rem 0.625rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid #f3f4f6;
}

.frd-hdr-dropdown__header-label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
}

.frd-hdr-dropdown__header-name {
  margin: 0.125rem 0 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frd-hdr-profile-trigger {
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  gap: 0.5rem;
}

.frd-hdr-profile-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px !important;
  height: 28px !important;
  aspect-ratio: 1 / 1;
  min-width: 28px;
  max-width: 28px;
  min-height: 28px;
  max-height: 28px;
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: hidden;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--frd-hdr-accent), var(--frd-hdr-accent-hover));
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
  line-height: 1;
  vertical-align: middle;
  isolation: isolate;
}

.frd-hdr-profile-avatar__fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  line-height: 1;
  border-radius: inherit;
}

.frd-hdr-profile-avatar__fallback--hidden {
  display: none;
}

.frd-hdr-profile-avatar img {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100%;
  min-height: 100%;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover;
  object-position: center;
  border: 0 !important;
  border-radius: inherit;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent;
  box-shadow: none !important;
  line-height: 0;
}

.frd-hdr-profile-avatar__img--failed {
  display: none !important;
}

.frd-hdr-profile-name {
  display: none;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 700;
}

@media (min-width: 1400px) {
  .frd-hdr-profile-name {
    display: inline-block;
  }
}

.frd-hdr-profile-card {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.frd-hdr-profile-avatar--menu {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
  max-width: 32px;
  min-height: 32px;
  max-height: 32px;
  color: #fff;
  font-size: 0.6875rem;
  border-color: #e5e7eb;
  box-shadow: none;
}

.frd-hdr-profile-card .frd-hdr-dropdown__header-name {
  min-width: 0;
  margin-top: 0;
}

.frd-hdr-dropdown__item--danger:hover,
.frd-hdr-dropdown__item--danger:focus {
  color: #dc2626;
  background: #fef2f2;
}

.frd-hdr-dropdown__item--danger:hover svg,
.frd-hdr-dropdown__item--danger:hover i,
.frd-hdr-dropdown__item--danger:focus svg,
.frd-hdr-dropdown__item--danger:focus i {
  color: #dc2626;
}

/* Overflow: ocultar en desktop acciones secundarias duplicadas si se desea — por ahora todo visible con responsive utilities */

/* Notificaciones dentro del header */
.frd-app-header .notifications-menu {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  width: 36px;
  min-width: 36px;
}

.frd-app-header .notifications-menu > a.frd-notif-toggle {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-height: 36px;
  min-width: 36px;
  padding: 0.5rem !important;
  color: var(--frd-hdr-text) !important;
  background: var(--frd-hdr-surface) !important;
  border: 1px solid var(--frd-hdr-border) !important;
  border-radius: var(--frd-hdr-radius) !important;
  box-shadow: none !important;
}

.frd-app-header .notifications-menu > a.frd-notif-toggle svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  overflow: visible;
}

.frd-app-header .notifications-menu > a.frd-notif-toggle:hover {
  background: var(--frd-hdr-surface-hover) !important;
  color: var(--frd-hdr-text) !important;
}

.frd-app-header .notifications-menu .notifications_count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  background: #dc2626 !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
}

.frd-app-header .notifications-menu .dropdown-menu {
  right: 0 !important;
  left: auto !important;
  width: min(400px, calc(100vw - 1.5rem));
  max-height: none;
  margin-top: 8px;
  padding: 0 !important;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.15);
}

.frd-app-header .notifications-menu .dropdown-menu > li {
  list-style: none;
}

.frd-app-header .notifications-menu .dropdown-menu .menu {
  max-height: none !important;
  margin: 0;
  padding: 0;
  list-style: none;
}

.frd-app-header .notifications-menu .notification-li {
  margin: 0 0 0.35rem;
  padding: 0 !important;
  color: #334155;
  background: transparent;
  border-radius: 10px;
}

.frd-app-header .notifications-menu .notification-li > a {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.625rem;
  width: 100%;
  min-width: 0;
  padding: 0.75rem;
  color: inherit;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.frd-app-header .notifications-menu .notification-li > a:hover,
.frd-app-header .notifications-menu .notification-li > a:focus {
  color: #0f172a;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.frd-app-header .notifications-menu .notification-li.unread > a {
  color: #0f172a;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.frd-app-header .notifications-menu .notif-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--frd-hdr-accent);
  background: #f1f5f9;
  border-radius: 999px;
}

.frd-app-header .notifications-menu .notif-info {
  display: block;
  min-width: 0;
  color: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
}

.frd-app-header .notifications-menu .time {
  display: block;
  grid-column: 2;
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 500;
}

.frd-app-header .notifications-menu .no-notification {
  padding: 1.5rem 1rem !important;
  color: #64748b;
  font-size: 0.8125rem;
  text-align: center;
}

.frd-app-header .notifications-menu .load_more_li {
  padding-top: 0.35rem;
  border-top: 1px solid #eef2f7;
}

.frd-app-header .notifications-menu .load_more_notifications {
  display: block;
  padding: 0.65rem 0.75rem;
  color: var(--frd-hdr-accent);
  font-size: 0.8125rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
}

.frd-app-header .notifications-menu .load_more_notifications:hover {
  background: #f8fafc;
}

@media (max-width: 640px) {
  .frd-app-header .notifications-menu .dropdown-menu {
    position: fixed;
    top: calc(var(--frd-hdr-height) + 8px);
    right: 0.75rem !important;
    left: 0.75rem !important;
    width: auto;
    max-height: calc(100vh - var(--frd-hdr-height) - 1.5rem);
  }
}

/* Suscripción Superadmin */
.frd-app-header .frd-subscription-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  /* El nombre del plan (Emprendedor, Enterprise, Pro Plus…) debe verse completo; solo se corta si es larguísimo. */
  flex: 0 0 auto;
  max-width: 16rem;
  min-width: 0;
  height: 36px;
  padding: 0 0.75rem;
  color: var(--frd-hdr-text) !important;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  background: var(--frd-hdr-surface);
  border: 1px solid var(--frd-hdr-border);
  border-radius: 999px;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.frd-app-header .frd-subscription-trigger i {
  flex: 0 0 auto;
  color: var(--frd-hdr-accent);
  font-size: 0.9rem;
}

.frd-app-header .frd-subscription-trigger__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frd-app-header .frd-subscription-trigger:hover,
.frd-app-header .frd-subscription-trigger:focus {
  background: var(--frd-hdr-surface-hover);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--frd-hdr-accent) !important;
  outline: none;
  box-shadow: 0 0 0 3px var(--frd-hdr-accent-glow);
}

/* Solo en teléfono queda el icono; desde tablet se muestra el nombre del plan. */
@media (max-width: 767px) {
  .frd-app-header .frd-subscription-trigger {
    width: 36px;
    padding: 0;
    border-radius: var(--frd-hdr-radius);
  }

  .frd-app-header .frd-subscription-trigger__label {
    display: none;
  }
}

/* Respiro entre el menú hamburguesa y el plan */
.frd-app-header .frd-subscription-trigger {
  margin-left: 0.25rem;
}

/* Suscripción Vencida / Alerta Rojo Suave: Formato solo icono moderno 36x36 tanto en PC como en móviles */
.frd-app-header .frd-subscription-trigger--expired {
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #fff1f2 !important;
  border: 1px solid #fecdd3 !important;
  color: #e11d48 !important;
  box-shadow: 0 1px 3px rgba(225, 29, 72, 0.12) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
}

.frd-app-header .frd-subscription-trigger--expired svg,
.frd-app-header .frd-subscription-trigger--expired .frd-sub-expired-icon {
  width: 19px !important;
  height: 19px !important;
  min-width: 19px !important;
  min-height: 19px !important;
  stroke: #e11d48 !important;
  stroke-width: 2 !important;
  fill: none !important;
  display: block !important;
  transition: transform 0.18s ease !important;
}

.frd-app-header .frd-subscription-trigger--expired:hover,
.frd-app-header .frd-subscription-trigger--expired:focus {
  background: #ffe4e6 !important;
  border-color: #fda4af !important;
  color: #be123c !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.18) !important;
  transform: translateY(-1px);
}

.frd-app-header .frd-subscription-trigger--expired:hover svg,
.frd-app-header .frd-subscription-trigger--expired:hover .frd-sub-expired-icon {
  transform: scale(1.1) !important;
}

.frd-app-header .frd-subscription-trigger--expired:active {
  transform: scale(0.96) !important;
}

.popover-subscription--warning .popover-title,
.popover-subscription--danger .popover-title {
  background-color: #fff1f2 !important;
  border-bottom: 1px solid #fecdd3 !important;
  color: #9f1239 !important;
}

/* Essentials clock buttons */
.frd-app-header .clock_in_btn,
.frd-app-header .clock_out_btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 36px;
  padding: 0.5rem !important;
  color: var(--frd-hdr-text) !important;
  background: var(--frd-hdr-surface) !important;
  border: 1px solid var(--frd-hdr-border) !important;
  border-radius: var(--frd-hdr-radius) !important;
  box-shadow: none !important;
}

.frd-app-header .clock_out_btn {
  color: #fff !important;
  background: var(--frd-hdr-accent-glow) !important;
  border-color: var(--frd-hdr-accent-muted) !important;
}

.frd-app-header .clock_out_btn::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  background: #22c55e;
  border: 1px solid rgba(15, 23, 42, 0.9);
  border-radius: 999px;
}

.frd-app-header .clock_in_btn svg,
.frd-app-header .clock_out_btn svg,
.frd-app-header .clock_in_btn i,
.frd-app-header .clock_out_btn i {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  font-size: 1rem;
}

.frd-app-header .clock_in_btn:hover,
.frd-app-header .clock_out_btn:hover {
  background: var(--frd-hdr-accent) !important;
  border-color: transparent !important;
}

/* Repair link */
.frd-app-header .frd-hdr-repair-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 36px;
  min-width: 36px;
  padding: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--frd-hdr-text);
  text-decoration: none;
  background: var(--frd-hdr-surface);
  border: 1px solid var(--frd-hdr-border);
  border-radius: var(--frd-hdr-radius);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.frd-app-header .frd-hdr-repair-link:hover {
  color: var(--frd-hdr-text);
  text-decoration: none;
  background: var(--frd-hdr-accent);
  border-color: transparent;
}

.frd-app-header .frd-hdr-repair-link svg {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}

.frd-app-header .frd-hdr-repair-label {
  display: none;
}

@media (min-width: 1280px) {
  .frd-app-header .frd-hdr-repair-link {
    padding-inline: 0.625rem;
  }

  .frd-app-header .frd-hdr-repair-label {
    display: inline;
  }
}

/* Popover suscripción modernizado */
.popover.popover-subscription {
  max-width: 350px !important;
  min-width: 300px !important;
  padding: 0 !important;
  margin-top: 6px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.15) !important;
}

/* Puente invisible de hover para que el cursor no pierda el popover al desplazarse hacia él */
.popover.popover-subscription::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 16px;
  background: transparent;
  pointer-events: auto;
  z-index: 999;
}

.popover.popover-subscription .popover-title {
  padding: 12px 16px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e5e7eb !important;
  border-radius: 12px 12px 0 0 !important;
}

.popover.popover-subscription .popover-content {
  padding: 16px !important;
}

.popover.popover-subscription .subscription-card {
  color: #374151;
}

.popover.popover-subscription .usage-item {
  margin-bottom: 15px;
}

.popover.popover-subscription .usage-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 500;
}

.popover.popover-subscription .progress-tiny {
  height: 6px !important;
  border-radius: 10px !important;
  background: #f0f0f0 !important;
  box-shadow: none !important;
  margin-bottom: 0 !important;
  overflow: hidden;
}

.popover.popover-subscription .limit-infinite {
  color: #16a34a;
  font-weight: 700;
  font-size: 14px;
}

.popover.popover-subscription .sub-section-title {
  margin: 15px 0 5px;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.popover.popover-subscription .sub-einvoice-box {
  margin-top: 5px;
  padding: 10px;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
}

.popover.popover-subscription .sub-einvoice-label {
  color: #5b21b6;
  font-weight: 500;
}

.popover.popover-subscription .sub-footer {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.popover.popover-subscription .text-muted {
  color: #6b7280;
}

html[data-theme="dark"] .popover.popover-subscription .sub-section-title,
body.dark .popover.popover-subscription .sub-section-title {
  color: #ffffff;
}

html[data-theme="dark"] .popover.popover-subscription .sub-einvoice-box,
body.dark .popover.popover-subscription .sub-einvoice-box {
  background: var(--frd-dm-surface, #1a2231);
  border-color: var(--frd-dm-border-input, #344054);
}

html[data-theme="dark"] .popover.popover-subscription .sub-einvoice-label,
body.dark .popover.popover-subscription .sub-einvoice-label {
  color: #c4b5fd;
}

html[data-theme="dark"] .popover.popover-subscription .sub-footer,
body.dark .popover.popover-subscription .sub-footer {
  border-top-color: var(--frd-dm-border, #1d2939);
}

.popover.popover-subscription .sub-date-info {
  display: block;
  font-size: 13px;
  color: #1e40af;
  margin-bottom: 15px;
  background: #eff6ff;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  border: 1px solid #dbeafe;
}

@media (max-width: 767px) {
  /* En móvil el botón está junto al borde: se ancla al ancho de la pantalla con margen parejo */
  .popover.popover-subscription {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    transform: none !important;
  }
  .popover.popover-subscription > .arrow {
    display: none !important;
  }
}

/* Responsive visibility helpers */
.frd-hdr-hide-sm {
  display: none !important;
}

@media (min-width: 640px) {
  .frd-hdr-hide-sm {
    display: inline-flex !important;
  }
}

.frd-hdr-hide-md {
  display: none !important;
}

@media (min-width: 768px) {
  .frd-hdr-hide-md {
    display: inline-flex !important;
  }
}

.frd-hdr-hide-lg {
  display: none !important;
}

@media (min-width: 1024px) {
  .frd-hdr-hide-lg {
    display: inline-flex !important;
  }
}

.frd-hdr-show-lg-only {
  display: none !important;
}

@media (min-width: 1024px) {
  .frd-hdr-show-lg-only {
    display: inline-flex !important;
  }
}

/* Evitar desbordamientos y superposición en monitores pequeños / laptops (< 1280px) */
@media (max-width: 1279px) {
  #btnCalculator,
  #view_todays_profit {
    display: none !important;
  }

  .frd-app-header .frd-hdr-btn__label {
    display: none !important;
  }

  .frd-app-header .frd-hdr-repair-label {
    display: none !important;
  }
}

/* Separador visual entre grupos */
.frd-hdr-divider {
  width: 1px;
  height: 24px;
  margin: 0 0.125rem;
  background: var(--frd-hdr-border);
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .frd-hdr-divider {
    display: none;
  }
}

/* Calculadora del header: el popover se renderiza fuera del scope visual del header. */
.popover #calculator {
  width: 188px;
  color: #0f172a;
  font-family: Inter, "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
}

.popover #calculator .row {
  margin-left: 0;
  margin-right: 0;
  white-space: nowrap;
}

.popover #calculator .calcBG {
  float: none;
  width: auto;
  min-height: 0;
  padding: 10px;
  border-radius: 14px;
  background: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.popover #calculator .screen {
  display: block;
  width: 164px;
  height: 40px;
  margin: 0 auto 8px;
  padding: 8px 10px;
  color: #0f172a !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  background: #f8fafc;
  border: 1px solid #dbe3ef !important;
  border-radius: 10px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.popover #calculator button.btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  margin: 2px;
  padding: 0 !important;
  color: #0f172a !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: center;
  text-shadow: none !important;
  vertical-align: middle;
  visibility: visible;
  opacity: 1;
  background: #ffffff !important;
  border: 1px solid #d8e0ec !important;
  border-radius: 10px;
  box-shadow: none;
}

.popover #calculator button.btn:hover,
.popover #calculator button.btn:focus {
  color: #0f172a !important;
  background: #eef4ff !important;
  border-color: #bfdbfe !important;
}

.popover #calculator #allClear,
.popover #calculator #clear,
.popover #calculator #equals {
  color: #ffffff !important;
}

.popover #calculator #allClear {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
}

.popover #calculator #clear {
  background: #f59e0b !important;
  border-color: #f59e0b !important;
}

.popover #calculator #equals {
  background: #16a34a !important;
  border-color: #16a34a !important;
}

.popover #calculator #blank {
  visibility: hidden !important;
}

/* --- Appearance modal (theme picker) --- */
.frd-hdr-dropdown__item--button {
  width: 100%;
  margin: 0;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  text-align: left;
  cursor: pointer;
  border: 0;
  background: transparent;
}

.frd-appearance-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.frd-appearance-modal[hidden] {
  display: none !important;
}

.frd-appearance-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.frd-appearance-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  max-height: min(90vh, 32rem);
  overflow: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18), 0 8px 16px rgba(15, 23, 42, 0.08);
  animation: frd-appearance-in 0.2s ease;
}

@keyframes frd-appearance-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.frd-appearance-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.15rem 1.15rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.frd-appearance-modal__title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
}

.frd-appearance-modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--frd-hdr-accent, #3b82f6);
  background: rgba(59, 130, 246, 0.1);
  border-radius: 10px;
}

.frd-appearance-modal__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.frd-appearance-modal__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #64748b;
}

.frd-appearance-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.frd-appearance-modal__close:hover,
.frd-appearance-modal__close:focus {
  color: #0f172a;
  background: #fff;
  border-color: #cbd5e1;
  outline: none;
}

.frd-appearance-modal__body {
  padding: 1rem 1.15rem 1.15rem;
}

.frd-appearance-modal__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (min-width: 480px) {
  .frd-appearance-modal__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.frd-appearance-theme {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.5rem;
  text-align: center;
  background: #f8fafc;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.frd-appearance-theme:hover:not(:disabled) {
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.frd-appearance-theme:focus-visible {
  outline: 2px solid var(--frd-hdr-accent, #3b82f6);
  outline-offset: 2px;
}

.frd-appearance-theme.is-active {
  background: #fff;
  border-color: var(--frd-theme-swatch-from, #3b82f6);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--frd-theme-swatch-from, #3b82f6) 18%, transparent);
}

.frd-appearance-theme:disabled {
  opacity: 0.65;
  cursor: wait;
}

.frd-appearance-theme__swatch {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--frd-theme-swatch-from), var(--frd-theme-swatch-to));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 2px 6px rgba(15, 23, 42, 0.12);
}

.frd-appearance-theme__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.2;
}

.frd-appearance-theme__check {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  display: none;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  color: #fff;
  background: var(--frd-theme-swatch-from, #3b82f6);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
}

.frd-appearance-theme.is-active .frd-appearance-theme__check {
  display: inline-flex;
}

.frd-appearance-modal__hint {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #94a3b8;
  text-align: center;
}

body.frd-appearance-modal-open {
  overflow: hidden;
}

/* ==========================================================================
   Menú de Opciones para Móvil (< 768px)
   ========================================================================== */
.frd-hdr-mobile-options {
  display: none !important;
}

@media (max-width: 767px) {
  .frd-app-header {
    padding: 0 0.75rem;
    height: 52px;
    min-height: 52px;
  }

  .frd-app-header__left {
    gap: 0.375rem;
  }

  .frd-app-header__right {
    gap: 0.375rem;
  }

  .frd-hdr-mobile-options {
    display: inline-block !important;
  }

  /* Botón (+) de Crear Acciones Rápidas junto a POS en móvil */
  .frd-hdr-create-dropdown {
    display: inline-block !important;
    position: static !important;
  }

  .frd-hdr-btn-create {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .frd-hdr-create-menu {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: calc(100vw - 16px) !important;
    height: auto !important;
    max-height: 82vh !important;
    max-height: 82dvh !important;
    grid-template-columns: 1fr !important;
    transform: none !important;
    border-radius: 16px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    padding: 0.875rem !important;
    padding-bottom: 3rem !important;
    z-index: 99999 !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3) !important;
  }

  /* Ocultar elementos desktop o secundarios que saturan la barra móvil */
  .frd-global-search-trigger.frd-electronic-search-left,
  .frd-hdr-desktop-theme,
  .frd-hdr-desktop-profile,
  .frd-app-header__brand-mobile,
  .frd-electronic-header-logo,
  .frd-hdr-essentials,
  .clock_in_btn,
  .clock_out_btn {
    display: none !important;
  }

  /* El botón POS es el más importante en móvil: destacado, accesible y compacto */
  .frd-hdr-pos-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    padding: 0 0.75rem !important;
    height: 36px !important;
    min-height: 36px !important;
    min-width: 0 !important;
    border-radius: 999px !important;
    background: var(--frd-theme-btn-from, #3b82f6) !important;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px var(--frd-theme-btn-glow, rgba(59, 130, 246, 0.35)) !important;
  }

  .frd-hdr-pos-btn .frd-hdr-btn__icon-pos {
    width: 17px !important;
    height: 17px !important;
    color: #ffffff !important;
  }

  .frd-hdr-pos-label {
    display: inline-block !important;
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    line-height: 1 !important;
    color: #ffffff !important;
  }
}

.frd-hdr-mobile-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(calc(100vw - 24px), 320px) !important;
  max-height: min(84vh, 600px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.75rem;
  border-radius: 16px;
  z-index: 9999;
}

.frd-hdr-mobile-user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.25rem 0.75rem 0.25rem;
}

.frd-hdr-mobile-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.frd-hdr-mobile-user-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frd-hdr-mobile-user-business {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frd-hdr-mobile-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 0.5rem 0;
}

.frd-hdr-mobile-search-btn {
  background: #f1f5f9 !important;
  border-radius: 10px !important;
  padding: 0.625rem 0.75rem !important;
  margin-bottom: 0.25rem;
  font-size: 0.8125rem !important;
  color: #475569 !important;
  width: 100%;
}

.frd-hdr-mobile-search-btn:hover {
  background: #e2e8f0 !important;
}

.frd-hdr-mobile-kbd {
  font-size: 0.6875rem;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: #cbd5e1;
  color: #334155;
  border: 1px solid #94a3b8;
}

.frd-hdr-mobile-section-header {
  padding: 0.35rem 0.5rem 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.frd-hdr-mobile-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.375rem;
  margin: 0.25rem 0;
}

.frd-hdr-mobile-quick-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.625rem 0.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.frd-hdr-mobile-quick-pill:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.frd-hdr-mobile-quick-pill i {
  font-size: 1rem;
}

.frd-hdr-mobile-quick-pill span {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #334155;
}


/* Tablet y laptops chicas: sin etiqueta, el POS es un botón de icono igual que los demás (38×38, radio estándar). */
@media (min-width: 768px) and (max-width: 1279px) {
  .frd-app-header .frd-hdr-pos-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: var(--frd-hdr-radius);
  }
}
