/* =========================================
   DASHBOARD BOE - ALVRISOLUTIONS V6.3
   Versión corregida: 25 Enero 2026
   - Tema claro por defecto
   - Sin emojis
   - Estilos de mapa interactivo
   - Footer con copyright
   ========================================= */

/* ===== VARIABLES DE TEMA ===== */
:root[data-theme="light"] {
    --primary-dark: #1A2E3B;
    --primary-light: #2A4556;
    --accent-primary: #3B82F6;
    --accent-primary-dark: #2563EB;
    --white: #FFFFFF;
    --text-primary: #1A2E3B;
    --text-secondary: #374151;
    --text-muted: #6B7280;
    --bg-primary: #F9FAFB;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #FFFFFF;
    --border-color: #E5E7EB;
    --hover-bg: #F3F4F6;
    --shadow: rgba(0, 0, 0, 0.1);
}

:root[data-theme="dark"] {
    --primary-dark: #1A2E3B;
    --primary-light: #2A4556;
    --accent-primary: #3B82F6;
    --accent-primary-dark: #2563EB;
    --accent-primary-light: #DBEAFE;
    --white: #FFFFFF;
    --text-primary: #FFFFFF;
    --text-secondary: #E5E7EB;
    --text-muted: #9CA3AF;
    --bg-primary: #0D1B2A;
    --bg-secondary: #1A2E3B;
    --bg-tertiary: #1A2E3B;
    --border-color: rgba(255, 255, 255, 0.15);
    --hover-bg: rgba(255, 255, 255, 0.1);
    --shadow: rgba(0, 0, 0, 0.3);
}

/* ===== VARIABLES GENERALES ===== */
:root {
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --header-height: 70px;
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
    overflow-x: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

#root {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    position: relative;
}

/* ===== APP CONTAINER ===== */
.app-container {
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ===== TOP HEADER FIJO ===== */
.top-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    padding: 0 30px !important;
    height: var(--header-height) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 105 !important;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* ===== HAMBURGER MENU CON ANIMACIÓN ===== */
.hamburger-menu-fixed {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px;
    border-radius: 8px;
    transition: var(--transition);
    z-index: 110;
}

.hamburger-menu-fixed:hover {
    background: var(--hover-bg);
}

.hamburger-line {
    width: 26px;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

/* Asegurar visibilidad en ambos temas */
[data-theme="light"] .hamburger-line {
    background: #059669;
}

[data-theme="dark"] .hamburger-line {
    background: #10B981;
}

/* Animación hamburger = X cuando sidebar está abierto */
.hamburger-menu-fixed.open .hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger-menu-fixed.open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.hamburger-menu-fixed.open .hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ===== LOGO CENTRADO EN HEADER ===== */
.header-logo-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 8px 20px;
    border-radius: 12px;
}

.header-logo-center:hover {
    background: var(--hover-bg);
}

.header-logo-center img {
    height: 42px;
    width: auto;
    transition: var(--transition);
}

/* Logo más pequeño en tema claro */
[data-theme="light"] .header-logo-center img {
    height: 38px;
}

.header-logo-center:hover img {
    transform: scale(1.05);
}

/* ===== HEADER ACTIONS (USUARIO) ===== */
.header-actions {
    position: absolute;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ===== BOTÓN FEEDBACK ANIMADO ===== */
/* ===== BOTÓN FEEDBACK MODERNO ===== */
.feedback-btn-animated {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.feedback-btn-animated:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.feedback-btn-animated i {
    width: 16px;
    height: 16px;
}

.feedback-btn-animated .feedback-btn-text {
    display: inline;
}

/* Indicador de notificación */
.feedback-btn-animated::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    background: #EF4444;
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
    animation: feedbackPulse 2s ease-in-out infinite;
}

@keyframes feedbackPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

/* ===== MODAL DE FEEDBACK ===== */
.feedback-modal-overlay {
    z-index: 10001;
}

.feedback-modal {
    max-width: 500px;
    width: 90%;
}

.feedback-header {
    text-align: center;
    margin-bottom: 24px;
}

.feedback-header-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-primary), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.feedback-header-icon i {
    width: 28px;
    height: 28px;
    color: white;
}

.feedback-header h2 {
    margin: 0 0 8px;
    font-size: 1.4em;
}

.feedback-header p {
    color: var(--text-muted);
    margin: 0;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feedback-type-selector {
    display: flex;
    gap: 10px;
}

.feedback-type-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85em;
    color: var(--text-muted);
}

.feedback-type-option:hover {
    border-color: var(--accent-primary);
}

.feedback-type-option.active {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    color: white;
}

.feedback-type-option.active i {
    color: white;
}

.feedback-type-option input {
    display: none;
}

.feedback-type-option i {
    width: 24px;
    height: 24px;
}

.feedback-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feedback-input-group label {
    font-weight: 600;
    font-size: 0.9em;
}

.feedback-input-group textarea {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95em;
    resize: vertical;
    min-height: 120px;
}

.feedback-input-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.feedback-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.feedback-error {
    color: #EF4444;
    font-size: 0.85em;
    margin: 0;
}

.feedback-success {
    text-align: center;
    padding: 30px 0;
}

.feedback-success-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent-primary), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feedback-success-icon i {
    width: 36px;
    height: 36px;
    color: white;
}

.feedback-success h2 {
    margin: 0 0 8px;
    color: var(--accent-primary);
}

.feedback-success p {
    color: var(--text-muted);
    margin: 0;
}

.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@media (max-width: 768px) {
    .feedback-btn-animated .feedback-btn-text {
        display: none;
    }
    
    .feedback-btn-animated {
        padding: 8px 12px;
    }
    
    .feedback-type-selector {
        flex-direction: column;
    }
}

.header-user {
    position: relative;
    z-index: 9999;
}

.header-user-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--hover-bg);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.header-user-trigger:hover {
    border-color: var(--accent-primary);
}

.header-user-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.header-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.header-user-name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.header-user-chevron {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.header-user-chevron.rotate {
    transform: rotate(180deg);
}

/* ===== USER DROPDOWN ===== */
.header-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 260px;
    z-index: 9999;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.user-dropdown-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.user-dropdown-email {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    text-decoration: none;
}

.user-dropdown-item:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.user-dropdown-item.danger {
    color: #EF4444;
}

.user-dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.user-dropdown-item.logout {
    color: #EF4444;
}

.user-dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed !important;
    top: var(--header-height) !important;
    left: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    z-index: 100;
    padding-top: 20px !important;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-nav {
    flex: 1;
    padding: 0 10px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.nav-item:hover {
    background: var(--hover-bg);
    transform: translateX(5px);
}

.nav-item.active {
    background: var(--accent-primary);
    color: white;
    font-weight: 600;
}

.nav-item.active .nav-icon svg {
    color: white;
    stroke: white;
}

.nav-icon {
    font-size: 1.5em;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.nav-text {
    font-size: 0.95em;
    white-space: nowrap;
    transition: var(--transition);
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 14px;
}

.nav-badge {
    margin-left: auto;
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
}

.sidebar.collapsed .nav-badge {
    display: none;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding-top: var(--header-height);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed-width);
}

.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* ===== FOOTER ===== */
.dashboard-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 15px 30px;
    text-align: center;
}

.dashboard-footer p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* ===== DASHBOARD SECTIONS ===== */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.section-container {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    padding: 25px;
    border: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i,
.section-header h2 svg {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
}

/* ===== HOME HERO SECTION ===== */
.home-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
    border-radius: var(--border-radius-lg);
    padding: 50px;
    margin-bottom: 30px;
}

.home-hero-content {
    flex: 1;
}

.home-hero h1 {
    font-size: 2.5em;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
}

.home-hero-subtitle {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-bottom: 20px;
}

.home-hero-description {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    max-width: 600px;
}

.home-hero-image {
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-hero-image i,
.home-hero-image svg {
    color: white !important;
    stroke: white !important;
}

/* ===== HOME FEATURES ===== */
.home-features {
    margin-bottom: 30px;
}

.home-features h2 {
    font-size: 1.5em;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.home-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.home-feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 25px;
    transition: var(--transition);
}

.home-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.home-feature-icon {
    width: 50px;
    height: 50px;
    background: var(--accent-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.home-feature-icon i,
.home-feature-icon svg {
    width: 24px;
    height: 24px;
    color: white !important;
    stroke: white !important;
}

.home-feature-card h3 {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.home-feature-card p {
    font-size: 0.9em;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== HOME SOURCES ===== */
.home-sources {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.home-source-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
}

.home-source-icon {
    width: 48px;
    height: 48px;
    background: var(--hover-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-source-icon i,
.home-source-icon svg {
    width: 22px;
    height: 22px;
    color: var(--accent-primary);
}

.home-source-content h3 {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.home-source-content p {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.home-source-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-primary);
    font-size: 0.75em;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

/* ===== HOME PLANS SECTION ===== */
.home-plans-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.home-plans-header {
    text-align: center;
    margin-bottom: 40px;
}

.home-plans-header h2 {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.home-plans-header p {
    font-size: 1em;
    color: var(--text-muted);
}

.home-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.home-plan-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
}

.home-plan-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.home-plan-card.highlighted {
    border: 2px solid var(--accent-primary);
    background: linear-gradient(to bottom, rgba(59, 130, 246, 0.03), var(--bg-secondary));
}

.plan-popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-primary);
    color: white;
    font-size: 0.75em;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    white-space: nowrap;
}

.plan-header {
    margin-bottom: 24px;
}

.plan-header h3 {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.plan-description {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-amount {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--text-primary);
}

.price-period {
    font-size: 1em;
    color: var(--text-muted);
    font-weight: 500;
}

.plan-features {
    list-style: none;
    flex: 1;
    margin-bottom: 24px;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9em;
    color: var(--text-secondary);
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li i,
.plan-features li svg {
    width: 18px;
    height: 18px;
    color: var(--accent-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.plan-cta-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    text-align: center;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.95em;
    text-decoration: none;
    transition: var(--transition);
}

.plan-cta-btn.primary {
    background: var(--accent-primary);
    color: white;
}

.plan-cta-btn.primary:hover {
    background: var(--accent-primary-dark);
    transform: translateY(-2px);
}

.plan-cta-btn.secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.plan-cta-btn.secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* ===== HOME FAQs SECTION ===== */
.home-faqs-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.home-faqs-header {
    text-align: center;
    margin-bottom: 40px;
}

.home-faqs-header h2 {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.home-faqs-header p {
    font-size: 1em;
    color: var(--text-muted);
}

.home-faqs-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--accent-primary);
}

.faq-item.open {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--hover-bg);
}

.faq-question span {
    flex: 1;
    padding-right: 16px;
}

.faq-question i,
.faq-question svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: var(--transition);
}

.faq-item.open .faq-question i,
.faq-item.open .faq-question svg {
    color: var(--accent-primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 24px 20px 24px;
    font-size: 0.95em;
    line-height: 1.7;
    color: var(--text-secondary);
}

.faqs-contact {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
}

.faqs-contact p {
    font-size: 0.95em;
    color: var(--text-muted);
}

.faqs-contact a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

.faqs-contact a:hover {
    text-decoration: underline;
}

/* ===== STATS KPIs ===== */
.stats-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stats-kpi-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px 24px;
    transition: var(--transition);
}

.stats-kpi-card:hover {
    border-color: var(--accent-primary);
}

.stats-kpi-icon {
    width: 50px;
    height: 50px;
    background: var(--accent-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stats-kpi-icon i,
.stats-kpi-icon svg {
    width: 24px;
    height: 24px;
    color: white !important;
    stroke: white !important;
}

.stats-kpi-value {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stats-kpi-label {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== TRACKING SECTION ===== */
.tracking-add-area {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 30px;
}

.tracking-add-area:hover {
    border-color: var(--accent-primary);
    background: var(--hover-bg);
}

.tracking-add-icon {
    width: 60px;
    height: 60px;
    background: var(--hover-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.tracking-add-area:hover .tracking-add-icon {
    background: var(--accent-primary);
}

.tracking-add-icon i,
.tracking-add-icon svg {
    width: 28px;
    height: 28px;
    color: var(--accent-primary);
    transition: var(--transition);
}

.tracking-add-area:hover .tracking-add-icon i,
.tracking-add-area:hover .tracking-add-icon svg {
    color: white !important;
    stroke: white !important;
}

.tracking-add-title {
    display: block;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.tracking-add-subtitle {
    font-size: 0.9em;
    color: var(--text-muted);
}

.tracking-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.tracking-empty i,
.tracking-empty svg {
    width: 60px;
    height: 60px;
    color: var(--border-color);
    margin-bottom: 16px;
}

.tracking-empty h3 {
    font-size: 1.2em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* Error en tracking */
.tracking-error {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.tracking-error i,
.tracking-error svg {
    width: 60px;
    height: 60px;
    color: #EF4444;
    margin-bottom: 16px;
}

.tracking-error h3 {
    font-size: 1.2em;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.tracking-error p {
    margin-bottom: 8px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Spinner pequeño para botones */
.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

/* View toggle */
.tracking-view-toggle {
    display: flex;
    gap: 4px;
    background: var(--hover-bg);
    padding: 4px;
    border-radius: var(--border-radius-sm);
}

.view-toggle-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-toggle-btn i,
.view-toggle-btn svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.view-toggle-btn.active {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

.view-toggle-btn.active i,
.view-toggle-btn.active svg {
    color: var(--accent-primary);
}

/* Tracking projects list/grid */
.tracking-projects {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tracking-projects.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.tracking-project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
    transition: var(--transition);
}

.tracking-project-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.tracking-project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.tracking-project-tech {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 600;
    color: white;
}

.tracking-remove-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--hover-bg);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.tracking-remove-btn:hover {
    background: #EF4444;
}

.tracking-remove-btn i,
.tracking-remove-btn svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.tracking-remove-btn:hover i,
.tracking-remove-btn:hover svg {
    color: white;
}

.tracking-project-name {
    font-size: 1.05em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.tracking-project-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.tracking-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    color: var(--text-secondary);
}

.tracking-detail i,
.tracking-detail svg {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.tracking-project-footer {
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.tracking-added-date {
    font-size: 0.8em;
    color: var(--text-muted);
}

/* Modal grande para añadir proyectos */
.modal-large {
    max-width: 900px;
    width: 95%;
}

.add-project-filters {
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-row .filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group-wide {
    flex: 2 !important;
}

.filter-row .btn {
    align-self: flex-end;
    height: 42px;
}

.add-project-results {
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
}

.search-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.search-prompt i,
.search-prompt svg {
    width: 48px;
    height: 48px;
    color: var(--border-color);
    margin-bottom: 12px;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-results-count {
    font-size: 0.9em;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 500;
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.search-result-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.search-result-tech {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.search-result-main {
    flex: 1;
    min-width: 0;
}

.search-result-main h4 {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-main p {
    font-size: 0.8em;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-disabled {
    background: var(--hover-bg) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed !important;
    border: 1px solid var(--border-color) !important;
}

/* ===== HOME RESPONSIVE ===== */
@media (max-width: 768px) {
    .home-hero {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }
    
    .home-hero h1 {
        font-size: 1.8em;
    }
    
    .home-hero-image {
        width: 100px;
        height: 100px;
    }
    
    .home-hero-image i,
    .home-hero-image svg {
        width: 60px !important;
        height: 60px !important;
    }
    
    .home-features-grid {
        grid-template-columns: 1fr;
    }
    
    .home-sources {
        grid-template-columns: 1fr;
    }
    
    .stats-kpis {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tracking-project-details {
        grid-template-columns: 1fr;
    }
    
    .tracking-projects.grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-row .filter-group {
        min-width: 100%;
    }
}

/* ===== FILTERS ===== */
.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 0.85em;
    color: var(--text-muted);
    font-weight: 500;
}

.filter-group select,
.filter-group input {
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.9em;
    transition: var(--transition);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    grid-column: 1 / -1;
}

/* Campo de filtro ancho (2 columnas) */
.filter-group-wide {
    grid-column: span 2;
}

/* Campo de filtro completo (toda la fila) */
.filter-group-full {
    width: 100%;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

.btn-secondary:hover {
    background: var(--hover-bg);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-export {
    background: var(--accent-primary);
    color: white;
}

.btn-export:hover {
    background: var(--accent-primary-dark);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85em;
}

/* ===== CHARTS ===== */
.chart-wrapper-large {
    height: 400px;
    position: relative;
}

.chart-wrapper-large canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ===== TABLES ===== */
.table-container {
    overflow-x: auto;
}

.projects-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.projects-table th,
.projects-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.projects-table th {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
}

.projects-table tbody tr:hover {
    background: var(--hover-bg);
}

.projects-table td {
    color: var(--text-secondary);
}

.cell-nombre {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Checkbox en tabla */
.th-checkbox,
.td-checkbox {
    width: 40px;
    text-align: center !important;
    padding: 14px 12px !important;
}

.th-checkbox input,
.td-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.row-selected {
    background: rgba(59, 130, 246, 0.1) !important;
}

.row-selected:hover {
    background: rgba(59, 130, 246, 0.15) !important;
}

/* Barra de acciones de selección */
.selection-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--accent-primary);
    color: white;
    padding: 16px 24px;
    border-radius: var(--border-radius-md);
    margin-bottom: 20px;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.selection-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.selection-info i,
.selection-info svg {
    width: 20px;
    height: 20px;
}

.selection-actions {
    display: flex;
    gap: 12px;
}

.selection-actions .btn {
    background: white;
    color: var(--accent-primary-dark);
    border: none;
}

.selection-actions .btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

.selection-actions .btn-secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.selection-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    border: 1px solid;
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.9em;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.2em;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.8em;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent-primary);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(85vh - 80px);
}

.modal-proyecto-nombre {
    color: var(--accent-primary);
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

/* ===== TIMELINE HISTÓRICO ===== */
.timeline-historico {
    position: relative;
    padding-left: 40px;
}

.timeline-historico::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent-primary) 0%, var(--border-color) 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    border-left: 3px solid var(--accent-primary);
    transition: var(--transition);
}

.timeline-item:hover {
    transform: translateX(5px);
}

.timeline-marker {
    position: absolute;
    left: -28px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 3px solid var(--bg-secondary);
}

.timeline-date {
    color: var(--accent-primary);
    font-weight: 700;
    margin-bottom: 10px;
}

.timeline-estado,
.timeline-organo,
.timeline-acto {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 5px;
}

.timeline-estado strong,
.timeline-organo strong,
.timeline-acto strong {
    color: var(--text-muted);
    margin-right: 5px;
}

/* ===== MAP ===== */
.map-container {
    background: var(--bg-primary);
    border-radius: var(--border-radius-md);
    padding: 20px;
}

.map-controls {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tech-button {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9em;
}

.tech-button:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.tech-button.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.map-svg {
    width: 100%;
    height: 600px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
}

.province-path {
    transition: var(--transition);
    cursor: pointer;
}

/* ===== MAP TOOLTIP ===== */
.map-tooltip {
    position: absolute;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-primary);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    pointer-events: none;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    font-size: 0.9em;
    min-width: 200px;
}

.map-tooltip-title {
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 8px;
    font-size: 1.1em;
}

.map-tooltip-stat {
    color: var(--text-secondary);
    margin: 4px 0;
}

.map-tooltip-stat strong {
    color: var(--text-primary);
}

/* ===== GRID INTELLIGENCE MAPS ===== */
.grid-maps-section h2 {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.section-description {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 30px;
}

.grid-maps-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ===== NUEVO DISEÑO CATÁLOGO DE MAPAS ===== */
.grid-maps-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.grid-map-catalog-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.grid-map-catalog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.grid-map-catalog-card.locked {
    opacity: 0.85;
}

.grid-map-catalog-card.locked:hover {
    transform: translateY(-3px);
}

/* Preview area con gradiente */
.grid-map-preview {
    position: relative;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.grid-map-preview-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.grid-map-preview-overlay i {
    width: 40px !important;
    height: 40px !important;
    color: white !important;
    stroke: white !important;
}

/* Badge Premium en preview */
.grid-map-preview .grid-map-badge-premium {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.grid-map-preview .grid-map-badge-premium i {
    width: 12px !important;
    height: 12px !important;
    color: white !important;
}

/* Contenido de la tarjeta */
.grid-map-catalog-content {
    padding: 20px;
}

.grid-map-catalog-content h3 {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.grid-map-catalog-subtitle {
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 10px;
}

.grid-map-catalog-description {
    font-size: 0.9em;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    min-height: 45px;
}

.grid-map-catalog-actions {
    display: flex;
    gap: 10px;
}

.grid-map-view-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.grid-map-view-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.grid-map-view-btn i {
    width: 16px;
    height: 16px;
}

.grid-map-catalog-card.locked .grid-map-view-btn:hover {
    background: #F59E0B;
    border-color: #F59E0B;
}

/* ===== MAP VIEWER SECTION ===== */
.map-viewer-section {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height) - 40px);
    gap: 20px;
}

.map-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.map-viewer-header-left {
    flex: 0 0 auto;
}

.map-viewer-header-center {
    flex: 1;
    text-align: center;
}

.map-viewer-header-center h2 {
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 2px;
}

.map-viewer-subtitle {
    font-size: 0.9em;
    color: var(--text-muted);
}

.map-viewer-header-right {
    display: flex;
    gap: 8px;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: var(--hover-bg);
}

.btn-back i {
    width: 16px;
    height: 16px;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.btn-icon i {
    width: 18px;
    height: 18px;
}

/* Map Container */
.map-viewer-container {
    flex: 1;
    min-height: 400px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
    background: var(--bg-secondary);
}

.map-viewer-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    border-radius: 0;
    border: none;
}

.map-viewer-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.fullscreen-exit-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.9em;
    cursor: pointer;
    z-index: 10000;
    transition: background 0.2s;
}

.fullscreen-exit-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.fullscreen-exit-btn i {
    width: 16px;
    height: 16px;
}

/* Monitor Section */
.map-viewer-monitor {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    padding: 24px;
}

.monitor-header {
    margin-bottom: 20px;
}

.monitor-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.monitor-header h3 i {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}

.monitor-header p {
    color: var(--text-muted);
    font-size: 0.9em;
}

.monitor-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-muted);
}

.monitor-table-container {
    overflow-x: auto;
}

.monitor-table-react {
    width: 100%;
    border-collapse: collapse;
}

.monitor-table-react th,
.monitor-table-react td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.monitor-table-react th {
    background: var(--bg-primary);
    font-weight: 600;
    font-size: 0.85em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.monitor-table-react td {
    font-size: 0.9em;
    color: var(--text-secondary);
}

.monitor-table-react tbody tr:hover {
    background: var(--hover-bg);
}

.monitor-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.monitor-link:hover {
    text-decoration: underline;
}

.monitor-link i {
    width: 14px;
    height: 14px;
}

.monitor-no-data {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

.monitor-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.monitor-footer p {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    color: var(--text-muted);
}

.monitor-footer i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.monitor-footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.monitor-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .grid-maps-catalog {
        grid-template-columns: 1fr;
    }
    
    .map-viewer-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .map-viewer-header-left,
    .map-viewer-header-right {
        width: 100%;
        justify-content: center;
    }
    
    .map-viewer-section {
        height: auto;
    }
    
    .map-viewer-container {
        min-height: 300px;
        height: 50vh;
    }
    
    .btn-back span {
        display: none;
    }
}

.grid-map-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 30px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.grid-map-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.grid-map-card.locked {
    opacity: 0.85;
}

.grid-map-card.locked:hover {
    border-color: #F59E0B;
}

/* Badge Premium/Patreon */
.grid-map-badge-premium {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.grid-map-badge-premium i {
    color: white !important;
}

/* Tarjeta destacada (ocupa 2 columnas) */
.grid-map-card-featured {
    grid-column: 1 / -1;
    padding: 35px 40px;
}

.grid-map-featured-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.grid-map-featured-text {
    flex: 1;
}

.grid-map-featured-text h3 {
    margin-bottom: 6px;
}

.grid-map-featured-text .grid-map-detail {
    margin-bottom: 0;
}

.grid-map-icon {
    width: 70px;
    height: 70px;
    background: var(--accent-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 20px;
}

.grid-map-icon-large {
    width: 80px;
    height: 80px;
    margin-bottom: 0;
}

/* Iconos BLANCOS sobre fondo verde */
.grid-map-icon i,
.grid-map-icon svg {
    color: white !important;
    stroke: white !important;
}

.grid-map-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.grid-map-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.grid-map-detail {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

/* Botón estético para Grid Maps */
.grid-map-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: transparent;
    border: 2px solid var(--accent-primary);
    border-radius: var(--border-radius-sm);
    color: var(--accent-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.grid-map-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-primary);
    transition: left 0.3s ease;
    z-index: 0;
}

.grid-map-btn span,
.grid-map-btn i {
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.grid-map-btn i,
.grid-map-btn svg {
    width: 18px;
    height: 18px;
}

.grid-map-btn:hover::before {
    left: 0;
}

.grid-map-btn:hover {
    color: white;
    border-color: var(--accent-primary);
}

.grid-map-btn:hover i,
.grid-map-btn:hover svg {
    transform: translateX(4px);
    color: white;
}

/* Botón featured más grande */
.grid-map-btn-featured {
    max-width: 350px;
}

/* Footer de Grid Maps */
.grid-maps-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.grid-maps-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.grid-maps-link:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.grid-maps-link i {
    width: 18px;
    height: 18px;
}

/* ===== SETTINGS SECTION ===== */
.settings-section h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.settings-group {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    margin-bottom: 24px;
}

.settings-group h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.setting-info label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.setting-description {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.theme-selector {
    display: flex;
    gap: 12px;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.theme-option:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.theme-option.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.theme-option i,
.theme-option svg {
    width: 18px;
    height: 18px;
}

.setting-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    margin-bottom: 12px;
}

.setting-link:hover {
    background: var(--hover-bg);
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.setting-link.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #EF4444;
}

.setting-link i:first-child,
.setting-link svg:first-child {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.setting-link i:last-child,
.setting-link svg:last-child {
    width: 16px;
    height: 16px;
    margin-left: auto;
    color: var(--text-muted);
}

.setting-link-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.setting-link-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.setting-link.danger .setting-link-title {
    color: #EF4444;
}

/* ===== LOADING & ERRORS ===== */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading {
    color: var(--text-muted);
    text-align: center;
    padding: 40px;
}

.error-message {
    color: #EF4444;
    text-align: center;
    padding: 40px;
    font-weight: 500;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

/* ===== COMING SOON ===== */
.coming-soon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    gap: 20px;
}

.coming-soon-icon {
    width: 80px;
    height: 80px;
    background: var(--hover-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coming-soon-icon i,
.coming-soon-icon svg {
    width: 40px;
    height: 40px;
    color: var(--accent-primary);
}

.coming-soon-container h2 {
    color: var(--text-primary);
    font-size: 1.8em;
}

.coming-soon-container p {
    color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding-top: calc(var(--header-height) + 20px) !important;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar.collapsed {
        transform: translateX(-100%);
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        animation: fadeIn 0.3s ease;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .main-content.sidebar-collapsed {
        margin-left: 0;
    }
    
    .home-cards {
        grid-template-columns: 1fr 1fr;
    }
    
    .grid-maps-container {
        grid-template-columns: 1fr;
    }
    
    .grid-map-card-featured {
        grid-column: 1;
    }
    
    .grid-map-featured-content {
        flex-direction: column;
        gap: 20px;
    }
}

/* ===== SIDEBAR PLAN INFO ===== */
.sidebar-plan-info {
    padding: 15px 20px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.plan-badge {
    display: flex;
    justify-content: center;
}

.plan-badge span {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-admin {
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    color: white;
}

.plan-premium {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
}

.plan-boe {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
}

.plan-free {
    background: var(--border-color);
    color: var(--text-muted);
}

/* ===== NAV ITEM LOCKED ===== */
.nav-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-item.locked:hover {
    background: transparent;
}

.nav-item.locked .nav-icon {
    color: var(--text-muted);
}

.nav-badge.locked {
    background: var(--text-muted);
    color: white;
    padding: 2px 6px;
}

.nav-badge.premium {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
}

/* ===== UPGRADE REQUIRED SECTION ===== */
.upgrade-required-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px;
}

.upgrade-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 60px;
    text-align: center;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
}

.upgrade-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.upgrade-icon i {
    width: 40px;
    height: 40px;
    color: white;
}

.upgrade-card h2 {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 1.5em;
}

.upgrade-card p {
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.6;
}

.upgrade-card .btn-lg {
    padding: 14px 28px;
    font-size: 1em;
    margin-top: 20px;
}

/* ===== UPGRADE MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    max-width: 450px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 5px;
}

.modal-close:hover {
    color: var(--text-primary);
}

.upgrade-modal {
    text-align: center;
}

.upgrade-modal-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.upgrade-modal-icon i {
    width: 35px;
    height: 35px;
    color: white;
}

.upgrade-modal h2 {
    color: var(--text-primary);
    margin-bottom: 12px;
}

.upgrade-modal p {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.upgrade-section-name {
    background: var(--bg-primary);
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    display: inline-block;
    font-weight: 500;
    color: var(--text-secondary);
}

.upgrade-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.upgrade-modal-actions .btn {
    min-width: 120px;
}

/* Features del modal de upgrade */
.upgrade-modal-features {
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    padding: 16px 20px;
    margin: 20px 0;
    text-align: left;
}

.upgrade-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.upgrade-feature i {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.upgrade-section-name {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 12px 20px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin: 16px 0;
}

@media (max-width: 768px) {
    .content-area {
        padding: 20px;
    }
    
    .top-header {
        padding: 0 15px !important;
    }
    
    .hamburger-menu-fixed {
        left: 15px;
    }
    
    .header-actions {
        right: 15px;
    }
    
    .header-user-name {
        display: none;
    }
    
    .header-logo-center img {
        height: 36px;
    }
    
    /* Dropdown visible en móvil */
    .header-user-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
        max-height: 80vh;
        overflow-y: auto;
        min-width: 100%;
        animation: slideUp 0.3s ease;
    }
    
    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
    
    .user-dropdown-item {
        padding: 16px 20px;
    }
    
    .filters-form {
        grid-template-columns: 1fr;
    }
    
    .filter-group-wide {
        grid-column: span 1;
    }
    
    .filter-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .projects-table {
        font-size: 0.8em;
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .home-cards {
        grid-template-columns: 1fr;
    }
    
    .theme-selector {
        flex-direction: column;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .grid-maps-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .grid-map-card {
        padding: 24px;
    }
    
    .grid-map-card-featured {
        padding: 24px;
    }
    
    .grid-map-btn-featured {
        max-width: 100%;
    }
    
    /* Selection bar responsive */
    .selection-actions-bar {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .selection-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .selection-actions .btn {
        width: 100%;
    }
}

/* Overlay para móvil cuando dropdown está abierto */
@media (max-width: 768px) {
    .header-user-dropdown::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

/* ===== PROJECT DETAIL MODAL ===== */
.project-detail-overlay {
    z-index: 1100;
}

.project-detail-modal {
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
    border-bottom: none;
    gap: 16px;
}

.project-detail-title {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-detail-title h2 {
    color: var(--text-primary);
    font-size: 1.4em;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.project-detail-title .badge-tech {
    align-self: flex-start;
    font-size: 0.75em;
    padding: 4px 10px;
    font-weight: 600;
}

.project-detail-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.project-detail-actions .btn {
    padding: 8px 16px;
    font-size: 0.85em;
}

.project-detail-actions .modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.project-detail-actions .modal-close:hover {
    background: rgba(255,255,255,0.3);
}

.project-detail-actions .modal-close i,
.project-detail-actions .modal-close svg {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
}

.project-detail-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Timeline Section */
.project-timeline-section {
    margin-bottom: 32px;
}

.project-timeline-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.project-timeline-section h3 i,
.project-timeline-section h3 svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary-dark);
}

.project-progress-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    position: relative;
    padding: 20px 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 120px;
    position: relative;
}

.step-marker {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}

.step-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--border-color);
    border: 3px solid var(--bg-secondary);
    z-index: 2;
    position: relative;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.step-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% - 24px);
    height: 3px;
    background: var(--border-color);
    z-index: 1;
    transform: translateY(-50%);
}

.progress-step.completed .step-dot {
    background: var(--accent-primary-dark);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.progress-step.completed .step-line {
    background: var(--accent-primary-dark);
}

.progress-step.current .step-dot {
    background: var(--accent-primary-dark);
    border-color: white;
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.3);
    transform: scale(1.2);
}

.step-content {
    text-align: center;
    margin-top: 12px;
    padding: 0 8px;
}

.step-estado {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.step-fecha {
    display: block;
    font-size: 0.75em;
    color: var(--text-muted);
}

/* Info Section */
.project-info-section {
    margin-bottom: 32px;
}

.project-info-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.project-info-section h3 i,
.project-info-section h3 svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary-dark);
}

.project-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.info-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    background: var(--accent-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon i,
.info-icon svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary-dark);
}

.info-content {
    flex: 1;
    min-width: 0;
}

.info-label {
    display: block;
    font-size: 0.75em;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    display: block;
    font-size: 0.95em;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
}

.info-value.estado-badge {
    display: inline-block;
    background: var(--accent-primary-light);
    color: var(--accent-primary-dark);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85em;
}

/* Publications Section */
.project-publications-section {
    margin-bottom: 16px;
}

.project-publications-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.project-publications-section h3 i,
.project-publications-section h3 svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary-dark);
}

.publication-count {
    font-size: 0.8em;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 8px;
}

.publications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.publication-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.publication-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.publication-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 120px;
}

.publication-date i,
.publication-date svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.publication-content {
    flex: 1;
    min-width: 0;
}

.publication-estado {
    margin-bottom: 4px;
}

.estado-tag {
    display: inline-block;
    background: var(--accent-primary-light);
    color: var(--accent-primary-dark);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.publication-tipo {
    font-size: 0.85em;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.publication-organo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8em;
    color: var(--text-muted);
}

.publication-organo i,
.publication-organo svg {
    width: 14px;
    height: 14px;
}

.publication-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--accent-primary-dark);
    font-size: 0.85em;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    padding: 6px 12px;
    background: var(--accent-primary-light);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.publication-link:hover {
    background: var(--accent-primary);
    color: white;
}

.publication-link i,
.publication-link svg {
    width: 14px;
    height: 14px;
}

/* Cell clickable */
.cell-clickable {
    cursor: pointer;
    color: var(--accent-primary-dark);
    transition: var(--transition);
}

.cell-clickable:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* Success button */
.btn-success {
    background: #10B981;
    color: white;
    border-color: #10B981;
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
}

/* Tracking card improvements */
.tracking-project-card {
    transition: var(--transition);
}

.tracking-project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.tracking-project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Project Detail Modal Responsive */
@media (max-width: 768px) {
    .project-detail-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .project-detail-header {
        flex-direction: column;
        padding: 16px;
    }
    
    .project-detail-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .project-detail-body {
        padding: 16px;
    }
    
    .project-progress-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .progress-step {
        flex-direction: row;
        align-items: center;
        min-width: auto;
    }
    
    .step-marker {
        width: auto;
        flex-direction: column;
    }
    
    .step-line {
        width: 3px;
        height: 40px;
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 4px auto;
    }
    
    .step-content {
        text-align: left;
        margin-top: 0;
        margin-left: 16px;
    }
    
    .project-info-grid {
        grid-template-columns: 1fr;
    }
    
    .publication-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .publication-date {
        min-width: auto;
    }
    
    .publication-link {
        align-self: flex-start;
    }
}

.btn-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    transform: translateY(-1px);
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-notification {
    position: fixed;
    top: 90px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slideIn 0.3s ease;
    max-width: 400px;
    border-left: 4px solid var(--accent-primary);
}

.toast-notification.success {
    border-left-color: #10B981;
}

.toast-notification.success i,
.toast-notification.success svg {
    color: #10B981;
}

.toast-notification.error {
    border-left-color: #EF4444;
}

.toast-notification.error i,
.toast-notification.error svg {
    color: #EF4444;
}

.toast-notification.info {
    border-left-color: #3B82F6;
}

.toast-notification.info i,
.toast-notification.info svg {
    color: #3B82F6;
}

.toast-notification i,
.toast-notification svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-notification span {
    flex: 1;
    font-size: 0.95em;
    color: var(--text-primary);
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: var(--transition);
}

.toast-close:hover {
    opacity: 1;
}

.toast-close i,
.toast-close svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== ACCESS DENIED ===== */
.access-denied-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 20px;
}

.access-denied-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 48px;
    max-width: 500px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.access-denied-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: #FEE2E2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.access-denied-icon i,
.access-denied-icon svg {
    width: 40px;
    height: 40px;
    color: #EF4444;
}

.access-denied-card h1 {
    font-size: 1.8em;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.access-denied-card > p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.access-denied-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.access-denied-actions .btn-large {
    padding: 14px 28px;
    font-size: 1em;
}

.access-denied-help {
    font-size: 0.85em;
    color: var(--text-muted);
}

.access-denied-help a {
    color: var(--accent-primary-dark);
    text-decoration: underline;
}

/* ===== PROJECT DETAIL PAGE ===== */
.project-detail-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.btn-back {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 20px;
    font-weight: 500;
}

.btn-back:hover {
    background: var(--hover-bg);
    border-color: var(--accent-primary);
}

.project-detail-page-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.project-title-section {
    background: linear-gradient(135deg, var(--accent-primary-light) 0%, var(--accent-primary) 100%);
    border: none;
}

.project-title-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-title-header h1 {
    font-size: 1.6em;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.badge-tech-large {
    padding: 6px 14px;
    font-size: 0.85em;
    font-weight: 600;
    border-radius: 20px;
    border: 2px solid;
    align-self: flex-start;
}

/* ===== EXPORT SECTION ===== */
.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.export-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.export-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.export-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.export-icon i,
.export-icon svg {
    width: 28px;
    height: 28px;
    color: var(--accent-primary-dark);
}

.export-info {
    margin-bottom: 20px;
}

.export-info h3 {
    font-size: 1.2em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.export-info p {
    font-size: 0.9em;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== SUBSCRIPTION CARD ===== */
.subscription-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    padding: 24px;
}

.subscription-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.subscription-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subscription-icon i,
.subscription-icon svg {
    width: 28px;
    height: 28px;
}

.subscription-info h4 {
    font-size: 1.2em;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.subscription-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.subscription-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
}

.subscription-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.subscription-detail i,
.subscription-detail svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.subscription-actions {
    display: flex;
    gap: 12px;
}

/* ===== RESPONSIVE PARA NUEVOS COMPONENTES ===== */
@media (max-width: 768px) {
    .toast-notification {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .access-denied-card {
        padding: 32px 24px;
    }
    
    .project-detail-page-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .project-detail-page-actions {
        justify-content: stretch;
    }
    
    .project-detail-page-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    .export-options {
        grid-template-columns: 1fr;
    }
}

/* ===== HOME PLANS SECTION (Estilo Orka) ===== */
.home-plans-section {
    padding: 60px 0;
    margin-top: 40px;
}

.home-plans-header {
    text-align: center;
    margin-bottom: 50px;
}

.home-plans-header h2 {
    font-size: 2em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.home-plans-header p {
    color: var(--text-muted);
    font-size: 1.05em;
}

.home-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.home-plan-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
}

.home-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.home-plan-card.highlighted {
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.15);
}

.plan-popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-primary);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-header h3 {
    font-size: 1.25em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.plan-description {
    color: var(--text-muted);
    font-size: 0.9em;
    margin-bottom: 20px;
    min-height: 40px;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 24px;
}

.price-amount {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--text-primary);
}

.price-period {
    color: var(--text-muted);
    font-size: 1em;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    flex: 1;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.plan-features li i {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.plan-cta-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.95em;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.plan-cta-btn.primary {
    background: var(--accent-primary);
    color: white;
}

.plan-cta-btn.primary:hover {
    background: var(--accent-primary-dark);
}

.plan-cta-btn.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.plan-cta-btn.secondary:hover {
    background: var(--hover-bg);
    border-color: var(--text-muted);
}

/* ===== HOME FAQs SECTION (Estilo Orka) ===== */
.home-faqs-section {
    padding: 60px 0;
    margin-top: 20px;
}

.home-faqs-header {
    text-align: center;
    margin-bottom: 50px;
}

.home-faqs-header h2 {
    font-size: 2em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.home-faqs-header p {
    color: var(--text-muted);
    font-size: 1.05em;
}

.home-faqs-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--text-muted);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--hover-bg);
}

.faq-question span {
    flex: 1;
    padding-right: 16px;
}

.faq-question i {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-item.open .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 24px 20px 24px;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95em;
}

.faqs-contact {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.faqs-contact p {
    color: var(--text-muted);
}

.faqs-contact a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

.faqs-contact a:hover {
    text-decoration: underline;
}

/* ===== RESPONSIVE PLANS Y FAQs ===== */
@media (max-width: 768px) {
    .home-plans-section,
    .home-faqs-section {
        padding: 40px 0;
    }
    
    .home-plans-header h2,
    .home-faqs-header h2 {
        font-size: 1.5em;
    }
    
    .home-plans-grid {
        grid-template-columns: 1fr;
    }
    
    .home-plan-card {
        padding: 24px;
    }
    
    .price-amount {
        font-size: 2em;
    }
    
    .faq-question {
        padding: 16px 20px;
        font-size: 0.95em;
    }
    
    .faq-answer p {
        padding: 0 20px 16px 20px;
        font-size: 0.9em;
    }
}

/* ===== SIDEBAR EXTERNAL LINKS ===== */
.sidebar-external-links {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.sidebar-links-title {
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-left: 8px;
}

.sidebar-external-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    background: transparent;
    border: none;
}

.sidebar-external-link:hover {
    color: var(--accent-primary);
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

.sidebar-external-link:hover i {
    filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.6));
}

.sidebar-external-link.active {
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

.sidebar-external-link.active i {
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.8));
}

.sidebar-external-link i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Links externos cuando sidebar está COLAPSADO */
.sidebar.collapsed .sidebar-external-links {
    padding: 12px 8px;
    border-top: 1px solid var(--border-color);
}

.sidebar.collapsed .sidebar-external-link {
    justify-content: center;
    padding: 12px;
    margin-bottom: 4px;
    background: transparent;
    border: none;
}

.sidebar.collapsed .sidebar-external-link i {
    width: 22px;
    height: 22px;
}

.sidebar.collapsed .sidebar-external-link:hover i {
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.8));
    transform: scale(1.1);
}

.sidebar.collapsed .sidebar-external-link.active i {
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 1));
    color: var(--accent-primary);
}

/* Plan Patreon badge */
.plan-patreon {
    background: linear-gradient(135deg, #F59E0B, #D97706) !important;
    color: white !important;
}

/* =========================================
   ESTILOS ESPECÍFICOS GRID INTELLIGENCE MAPS
   ========================================= */

/* ===== MAPS SECTION ===== */
.maps-section {
    padding: 0;
}

.maps-section .section-header {
    margin-bottom: 32px;
}

.maps-section .section-header h1 {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.maps-section .section-header p {
    color: var(--text-muted);
    font-size: 1em;
}

.maps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.map-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.map-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.map-card.premium.locked {
    opacity: 0.75;
}

.map-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    border-radius: 50px;
    font-size: 0.7em;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    z-index: 10;
}

.map-card-badge i {
    width: 12px;
    height: 12px;
}

.map-card-icon {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.map-card-icon i {
    width: 48px;
    height: 48px;
    color: white;
}

.map-card-content {
    padding: 24px;
    flex: 1;
}

.map-card-content h3 {
    font-size: 1.15em;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.map-card-subtitle {
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 12px;
}

.map-card-description {
    font-size: 0.9em;
    color: var(--text-muted);
    line-height: 1.5;
}

.map-card-action {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.map-card-action i {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: var(--transition);
}

.map-card:hover .map-card-action i {
    color: var(--accent-primary);
    transform: translateX(4px);
}

.maps-premium-section {
    margin-top: 48px;
}

.maps-premium-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 24px;
    color: #F59E0B;
}

.maps-premium-section h2 i {
    width: 24px;
    height: 24px;
}

/* ===== RESPONSIVE MAPS ===== */
@media (max-width: 768px) {
    .maps-grid {
        grid-template-columns: 1fr;
    }
}