﻿/* =========================================================
   TABS APP + HAMBURGUESA + PANEL MOVIL
   ========================================================= */

:root {
  --bg: #f8fafc;
  --bg-soft: #f8fafc;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-2: #ffffff;
  --text: #1f2937;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.08);
  --accent: #2563eb;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.06);
  --radius: 22px;
  --radius-sm: 14px;
  --header-height: 52px;
}

html,
body {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.04), transparent 26%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  color: var(--text);
}

body.mobile-menu-open {
  overflow: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.04), transparent 26%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  border-bottom: 1px solid var(--border);
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.site-header.header-hidden {
  transform: translateY(-100%);
  opacity: 0;
}

.navbar {
  max-width: var(--container, 1180px);
  min-height: var(--header-height);
  height: var(--header-height);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  min-height: var(--header-height);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  white-space: nowrap;
  color: var(--text);
}

.desktop-nav {
  display: none !important;
}

.navbar-tabs-mode {
  justify-content: space-between;
}

.navbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  min-height: var(--header-height);
  gap: 10px;
}

.selector {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 1200;
}

.selected {
  min-height: 34px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  border-radius: 12px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.selected img,
.options button img {
  width: 18px;
  height: 13px;
  object-fit: cover;
}

.selected span {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}

.options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 1400;
}

.options.open {
  display: block;
}

.options button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.options button:hover {
  background: rgba(37, 99, 235, 0.08);
}

.app-tabs-wrap,
.app-tabs-shell.app-tabs-shell-header {
  border-top: 1px solid var(--border);
  background: transparent;
}

.app-tabs-shell.app-tabs-shell-header {
  padding-top: 0;
  padding-bottom: 8px;
}

.app-tabs {
  max-width: var(--container, 1180px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 16px 0;
  scrollbar-width: none;
}

.app-tabs::-webkit-scrollbar {
  display: none;
}

.app-tab {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  font-size: 0.83rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.app-tab:hover {
  color: var(--text);
  background: #ffffff;
  border-color: var(--border);
  transform: translateY(-1px);
}

.app-tab.is-active,
.app-tab[aria-current="page"] {
  color: #ffffff;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.floating-menu-btn {
  position: fixed;
  top: 10px;
  left: 10px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.96);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
}

.floating-menu-btn:hover {
  background: #ffffff;
}

.floating-menu-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.floating-menu-btn span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  display: block;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.22);
  z-index: 1490;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.mobile-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.mobile-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: min(320px, calc(100vw - 28px));
  height: 100vh;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  transform: translateX(-104%);
  transition: transform 0.26s ease;
  z-index: 1500;
  overflow-y: auto;
  overflow-x: hidden;
}

.mobile-panel.open {
  transform: translateX(0);
}

.mobile-panel-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 18px 16px 16px;
  gap: 18px;
}

.mobile-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-panel-top strong {
  color: var(--text);
  font-size: 1rem;
}

.mobile-close-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.mobile-nav {
  display: grid;
  gap: 8px;
}

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--border);
  font-weight: 700;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s ease;
}

.mobile-nav a:hover {
  color: var(--text);
}

.mobile-nav a.is-current,
.mobile-nav a[aria-current="page"] {
  color: #ffffff;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  border-color: rgba(37, 99, 235, 0.3);
}

.mobile-language {
  margin-top: 12px;
}

.mobile-language .selector {
  position: relative;
  z-index: 1600;
}

.selector-mobile .options {
  position: absolute;
  top: auto;
  bottom: calc(100% + 8px);
  left: 0;
  right: auto;
  width: 100%;
  min-width: 0;
  max-height: min(320px, 52vh);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1700;
}

.mobile-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}

@media (max-width: 979px) {
  .navbar-actions {
    display: none;
  }

  .floating-menu-btn {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .app-tabs-shell.app-tabs-shell-header {
    display: none;
  }
}

@media (min-width: 980px) {
  .floating-menu-btn,
  .mobile-panel,
  .mobile-overlay {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .navbar {
    padding: 0 12px 0 60px;
  }

  .navbar-brand {
    font-size: 0.88rem;
  }

  .selected {
    min-height: 32px;
    padding: 6px 8px;
  }

  .selected span {
    font-size: 0.78rem;
  }
}
