/* ============================================
   FENIX - Design System (HR Talent Style)
   ============================================ */

:root {
    /* Primary Colors */
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-200: #bae6fd;
    --primary-300: #7dd3fc;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-800: #075985;
    --primary-900: #0c4a6e;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --topbar-height: 60px;
    --content-padding: 24px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Border Radius */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition: 200ms ease-in-out;
    --transition-slow: 300ms ease-in-out;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

    /* Product Grid */
    --product-card-height: 450px;
    /* Altura fija de cada tarjeta de producto */
}

/* ============================================
   Base Styles
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Layout Components
   ============================================ */

.app-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--gray-50);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #7a0f0f 0%, #5c0a0a 100%);
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 20px;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    white-space: nowrap;
}

.sidebar-logo-icon {
    font-size: 24px;
    color: var(--primary-400);
}

.sidebar-menu {
    padding: 16px 0;
}

.sidebar-menu-item {
    margin: 4px 12px;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--gray-300);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all var(--transition);
    font-size: 14px;
    font-weight: 500;
    position: relative;
}

.sidebar-menu-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-menu-link.active,
.sidebar-menu-link.is-active {
    background: linear-gradient(135deg, #d4a94f 0%, #b8860b 100%);
    color: white;
    box-shadow: var(--shadow-md);
    position: relative;
}

/* Indicador de barra izquierda para items activos principales */
.sidebar-menu-link.active::before,
.sidebar-menu-link.is-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: white;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.sidebar-menu-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-menu-text {
    white-space: nowrap;
    overflow: hidden;
    flex: 1;
}

.sidebar.collapsed .sidebar-menu-text {
    display: none;
}

/* Accordion en sidebar */
.sidebar-menu-accordion {
    position: relative;
}

.sidebar-menu-toggle {
    cursor: pointer;
}

.sidebar-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-menu-submenu {
    padding-left: 0;
    margin-top: 4px;
    overflow: hidden;
    display: none;
    transition: max-height var(--transition);
}

.sidebar-menu-accordion.open .sidebar-menu-submenu {
    display: block;
}

.sidebar-menu-sublink {
    padding-left: 48px;
    font-size: 13px;
    display: block;
    position: relative;
    border-radius: var(--radius);
    margin: 2px 0;
    transition: all var(--transition);
}

.sidebar-menu-sublink:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: white;
}

.sidebar-menu-sublink.active,
.sidebar-menu-sublink.is-active {
    background: rgba(14, 165, 233, 0.2);
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.25) 0%, rgba(14, 165, 233, 0.15) 100%);
    color: white;
    font-weight: 600;
    border: 1px solid rgba(14, 165, 233, 0.4);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Barra indicadora izquierda para categorías activas */
.sidebar-menu-sublink.active::before,
.sidebar-menu-sublink.is-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 70%;
    background: var(--primary-400);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 6px rgba(14, 165, 233, 0.6);
}

/* Punto indicador a la derecha para categorías activas */
.sidebar-menu-sublink.active::after,
.sidebar-menu-sublink.is-active::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary-400);
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(14, 165, 233, 0.8);
}

.sidebar-menu-sublink .sidebar-menu-icon {
    font-size: 6px;
    width: 12px;
}

.sidebar-menu-chevron {
    transition: transform var(--transition);
    margin-left: auto;
    font-size: 12px;
}

.sidebar-menu-accordion.open .sidebar-menu-chevron {
    transform: rotate(180deg);
}

/* Indicador de categoría activa en el header del accordion */
.sidebar-menu-accordion.has-active-category .sidebar-menu-toggle {
    position: relative;
}

.sidebar-menu-accordion.has-active-category .sidebar-menu-toggle::after {
    content: '';
    position: absolute;
    right: 36px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary-400);
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(14, 165, 233, 0.8);
    z-index: 1;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Cuando no hay sidebar (página pública), quitar el margen izquierdo */
.main-content.no-sidebar {
    margin-left: 0;
    width: 100%;
}

.sidebar.collapsed~.main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* ============================================
   Language Selector (Global)
   ============================================ */
.lang-selector-btn {
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 4px 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer;
    font-family: inherit;
    height: 36px;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.lang-selector-btn:hover {
    background-color: var(--gray-50) !important;
}

.lang-selector-btn i {
    font-size: 1.1rem;
    color: var(--gray-600);
}

.lang-flag-mini {
    border-radius: 2px;
    box-shadow: 0 0 2px rgba(0,0,0,0.1);
}

.lang-code-compact {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
}

/* En mobile ocultamos el texto para que sea ultra compacto */
@media (max-width: 768px) {
    .lang-code-compact {
        display: none !important;
    }
    
    .lang-selector-btn {
        padding: 4px !important;
        gap: 6px !important; /* Fixed icon overlapping */
    }
}

/* Dropdown Menu Styling */
.lang-dropdown-menu {
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    padding: 6px 0;
    margin-top: 8px;
    min-width: 150px;
    list-style: none;
    overflow: hidden;
    background: #ffffff;
}

.lang-dropdown-menu li {
    list-style: none !important;
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    border: none !important;
    background: none !important;
    outline: none !important;
    box-shadow: none !important;
    width: 100%;
    text-align: left;
    transition: background 0.2s;
    cursor: pointer;
}

.lang-dropdown-item:hover {
    background-color: var(--gray-50);
    color: var(--primary-700);
}

.lang-dropdown-item.active {
    background-color: var(--primary-50);
    color: var(--primary-800);
}

.lang-dropdown-item img {
    border-radius: 2px;
}

.no-caret::after {
    display: none !important;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: linear-gradient(135deg, #7a0f0f, #a81d1d, #5c0a0a);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--content-padding);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
    transition: all var(--transition);
}

.topbar-logo-link {
    display: flex;
    align-items: center;
    padding-right: 8px;
    flex-shrink: 0;
}

.topbar-logo-img {
    height: 38px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.mobile-menu-btn i {
    color: #f5e6c8 !important;
    font-size: 24px;
}

/* Buscador Global Inteligente */
.global-search-wrapper {
    position: relative;
    width: 100%;
    max-width: 560px;
}

.global-search-wrapper .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #8B5E3C; /* Marrón-oro para contraste en blanco */
    font-size: 18px;
    pointer-events: none;
    z-index: 1;
}

.global-search-input {
    width: 100%;
    height: 40px; /* Un poco más compacto para elegancia */
    padding: 0 18px 0 46px;
    border: none;
    border-radius: 999px; /* Ultra redondeado */
    font-size: 14px;
    color: var(--gray-800);
    background-color: rgba(255, 255, 255, 0.95);
    transition: all var(--transition);
    outline: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.global-search-input::placeholder {
    color: var(--gray-400);
    font-size: 15px;
}

.global-search-input:focus {
    background-color: white;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.global-search-input:hover:not(:focus) {
    border-color: var(--gray-300);
    background-color: white;
}

@media (max-width: 768px) {
    .global-search-wrapper {
        max-width: 100%;
        transition: all var(--transition-slow);
        flex: 1;
    }

    .topbar-left {
        gap: 8px;
    }

    /* Expandir buscador al enfocar en mobile */
    .global-search-wrapper:focus-within {
        position: absolute;
        left: 12px;
        right: 12px;
        z-index: 1000;
        max-width: none;
    }

    .global-search-wrapper:focus-within ~ .topbar-right {
        opacity: 0;
        pointer-events: none;
    }

    .global-search-input {
        font-size: 14px;
        height: 44px;
    }

    .global-search-input::placeholder {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .global-search-wrapper .search-icon {
        font-size: 16px;
        left: 14px;
    }

    .global-search-input {
        padding-left: 42px;
        font-size: 14px;
    }

    .global-search-input::placeholder {
        font-size: 14px;
    }
}

.global-search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: min(420px, 100vw - 24px);
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 0.75rem 0;
    max-height: 420px;
    overflow-y: auto;
    z-index: 2000;
}

.global-search-results[hidden] {
    display: none;
}

.search-section {
    padding: 0.25rem 0 0.5rem 0;
}

.search-section+.search-section {
    border-top: 1px solid var(--gray-100);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
}

.search-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 1rem 0.25rem;
}

.search-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-result-item+.search-result-item {
    border-top: 1px solid var(--gray-100);
}

.search-result-link {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--gray-800);
    transition: background-color var(--transition), color var(--transition);
}

.search-result-link:hover {
    background-color: var(--gray-50);
}

.result-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.15rem;
}

.result-subtitle {
    font-size: 0.78rem;
    color: var(--gray-500);
}

.search-empty {
    font-size: 0.85rem;
    color: var(--gray-500);
    padding: 0.75rem 1rem;
}

/* Fin Buscador Global */

.topbar-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* Contenedor de acciones del topbar (Idioma, Carrito, Perfil) */
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 24px; /* Aumentado gap según instrucción */
    flex-shrink: 0;
}

/* Accents and Icons in Topbar */
.topbar-actions i, 
.topbar-actions .lang-code-compact {
    color: #f5e6c8 !important; /* Oro suave */
}

.topbar-actions .lang-selector-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* User Profile Text */
.topbar-user-profile-btn {
    all: unset;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    cursor: pointer;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px;
    transition: all 0.25s ease;
    height: 48px;
    box-sizing: border-box;
    text-decoration: none;
    outline: none !important;
}

.topbar-user-profile-btn:hover,
.topbar-user-profile-btn:focus,
.topbar-user-profile-btn:active,
.show > .topbar-user-profile-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    box-shadow: none !important;
    transform: translateY(-1px);
}

/* User Profile Text inside the new button class */
.topbar-user-profile-btn span span {
    color: white !important;
}

.topbar-user-profile-btn span span:last-child {
    color: rgba(255, 255, 255, 0.7) !important;
}

.topbar-user-profile-btn i {
    color: #f5e6c8 !important;
}

/* Carrito Icons */
.fenix-cart-minimal {
    color: #f5e6c8 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.fenix-cart-minimal:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Dropdown del usuario */
.topbar-right .dropdown {
    position: relative;
    display: inline-block;
}

.topbar-right .dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: #5c0a0a; /* Fix typo */
    background: linear-gradient(180deg, #7a0f0f 0%, #5c0a0a 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    padding: 8px 0;
    min-width: 200px;
    z-index: 1000;
    list-style: none;
    display: none;
    margin: 0;
}

.topbar-right .dropdown.show .dropdown-menu,
.topbar-right .dropdown-menu[style*="block"] {
    display: block !important;
}

.topbar-right .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.topbar-right .dropdown-item i {
    color: #f5e6c8; /* Iconos dorados */
    font-size: 16px;
}

.topbar-right .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #f5e6c8;
}

.topbar-right .dropdown-divider {
    margin: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Asegurar que los elementos del topbar no se desborden */
.topbar-right>* {
    flex-shrink: 0;
}

.topbar-actions>* {
    flex-shrink: 0;
}

/* Responsive para topbar */
@media (max-width: 768px) {
    .topbar-right {
        gap: 8px;
    }

    .topbar-actions {
        gap: 10px;
    }

    .language-select {
        min-width: 64px;
        padding: 4px 24px 4px 8px;
        font-size: 12px;
        background-position: right 6px center;
    }

    .user-dropdown-btn span {
        display: none !important;
    }

    .topbar-cart-btn,
    .fenix-cart-minimal {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    .topbar-cart-icon {
        font-size: 18px;
    }
}

.topbar-right .dropdown-divider {
    margin: 8px 0;
    border-top: 1px solid var(--gray-200);
}

/* Botón de carrito minimalista estilo Amazon */
.topbar-cart-btn,
.fenix-cart-minimal {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f5e6c8;
    text-decoration: none;
    transition: all var(--transition);
    flex-shrink: 0;
    cursor: pointer;
    box-sizing: border-box;
}

.topbar-cart-btn:hover,
.fenix-cart-minimal:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-900);
    transform: scale(1.05);
}

.topbar-cart-icon {
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.topbar-cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #f5e6c8; /* Oro */
    color: #7a0f0f; /* Rojo */
    font-size: 10px;
    font-weight: 800;
    min-width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1.5px solid #7a0f0f;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
    background: #ff3b30;
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border: 1.5px solid white;
    line-height: 1;
    z-index: 10;
    white-space: nowrap;
    pointer-events: none;
}

/* Badge base - el tamaño se ajusta dinámicamente por JS para números > 9 */

/* Ocultar badge si está vacío o el contador es 0 */
.topbar-cart-badge:empty,
.topbar-cart-badge[data-count="0"],
.topbar-cart-badge:not([data-count]),
.topbar-cart-badge[data-count=""] {
    display: none !important;
}

/* Selector de idioma */
.language-selector-form {
    display: inline-flex;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    align-items: center;
}

.language-select {
    padding: 6px 28px 6px 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: white;
    font-size: 14px;
    cursor: pointer;
    color: var(--gray-700);
    min-width: 68px;
    height: 36px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    transition: all var(--transition);
}

.language-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.language-select:hover {
    border-color: var(--gray-400);
}

/* Botón dropdown del usuario */
.user-dropdown-btn {
    border: none !important;
    background: transparent !important;
    padding: 8px 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer;
    white-space: nowrap;
    min-height: 36px;
    border-radius: var(--radius);
    transition: background-color var(--transition);
}

.user-dropdown-btn:hover {
    background: var(--gray-50) !important;
}

.user-dropdown-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Content */
.content-wrapper {
    flex: 1;
    padding: var(--content-padding);
    width: 100%;
    max-width: 100%;
}

/* ============================================
   UI Components
   ============================================ */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background-color: var(--gray-300);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    background-color: var(--gray-50);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background-color: white;
    color: var(--gray-900);
    transition: all var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.table thead {
    background-color: var(--gray-50);
}

.table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gray-200);
}

.table td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.badge-primary {
    background-color: var(--primary-100);
    color: var(--primary-700);
}

.badge-success {
    background-color: var(--success-light);
    color: #065f46;
}

.badge-warning {
    background-color: var(--warning-light);
    color: #92400e;
}

.badge-danger {
    background-color: var(--danger-light);
    color: #991b1b;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.status-new {
    background-color: var(--info-light);
    color: var(--info);
}

.status-confirmed {
    background-color: var(--success-light);
    color: #065f46;
}

.status-preparing {
    background-color: var(--warning-light);
    color: #92400e;
}

.status-out_for_delivery {
    background-color: #e0e7ff;
    color: #3730a3;
}

.status-delivered {
    background-color: var(--success-light);
    color: #065f46;
}

.status-cancelled {
    background-color: var(--danger-light);
    color: #991b1b;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: var(--success-light);
    border-color: var(--success);
    color: #065f46;
}

.alert-warning {
    background-color: var(--warning-light);
    border-color: var(--warning);
    color: #92400e;
}

.alert-danger {
    background-color: var(--danger-light);
    border-color: var(--danger);
    color: #991b1b;
}

.alert-info {
    background-color: var(--info-light);
    border-color: var(--info);
    color: var(--info);
}

/* Utilities */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.public-static-page {
    background: white;
    border-radius: 24px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    padding: clamp(24px, 4vw, 48px);
    max-width: 960px;
    margin: 0 auto;
}

.public-static-page__card {
    margin-top: 24px;
    padding: 20px;
    border-radius: 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
}

.text-muted {
    color: var(--gray-500);
}

.text-primary {
    color: var(--primary-600);
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 32px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mb-4 {
    margin-bottom: 32px;
}

/* Sidebar Backdrop */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 990;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--gray-700);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    margin-right: 8px;
    /* Separar del buscador */
    border-radius: var(--radius);
    transition: all var(--transition);
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn:hover {
    background-color: var(--gray-100);
    color: var(--gray-900);
}

.mobile-menu-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

body.sidebar-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        /* solo visible en móvil */
    }

    .sidebar {
        transform: translateX(-100%);
        z-index: 999;
        /* Por encima del backdrop */
    }

    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }

    .main-content {
        margin-left: 0;
    }

    .content-wrapper {
        padding: 16px;
    }
}

/* ============================================
   Utility Classes (Tailwind Style)
   ============================================ */
.text-center { text-align: center; }
.mt-3 { margin-top: 0.75rem; }
.mb-2 { margin-bottom: 0.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-1\.5 { gap: 6px; }
.opacity-80 { opacity: 0.8; }
.hover\:opacity-100:hover { opacity: 1; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }
.h-\[16px\] { height: 16px; }
.text-\[11px\] { font-size: 11px; }
.text-gray-400 { color: var(--gray-400); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.opacity-90 { opacity: 0.9; }
.opacity-100 { opacity: 1; }
.no-underline { text-decoration: none !important; }
.text-white { color: #ffffff !important; }
.text-\[13px\] { font-size: 13px; }
.h-\[20px\] { height: 20px !important; width: auto; }
.hover\:opacity-80:hover { opacity: 0.8 !important; }
.hover\:opacity-100:hover { opacity: 1 !important; }

