
        :root {
            /* Modern SaaS Color Palette */
            --primary: #0070f3;
            --primary-dark: #0051cc;
            --primary-light: #3291ff;
            --secondary: #7928ca;
            --success: #10b981;
            --warning: #f5a623;
            --danger: #e00;
            --info: #0070f3;
            
            /* Neutral Colors */
            --bg-primary: #ffffff;
            --bg-secondary: #fafafa;
            --bg-tertiary: #f5f5f5;
            --dark: #000000;
            --gray-50: #fafafa;
            --gray-100: #f5f5f5;
            --gray-200: #e5e5e5;
            --gray-300: #d4d4d4;
            --gray-400: #a3a3a3;
            --gray-500: #737373;
            --gray-600: #525252;
            --gray-700: #404040;
            --gray-800: #262626;
            --gray-900: #171717;
            
            /* Surface Colors (aliases for compatibility) */
            --surface-primary: #ffffff;
            --surface-secondary: #f5f5f5;
            --surface-tertiary: #e5e5e5;
            
            /* Accent Colors */
            --accent-primary: #0070f3;
            --accent-secondary: #7928ca;
            
            /* Text Colors */
            --text-primary: #171717;
            --text-secondary: #737373;
            --text-tertiary: #a3a3a3;
            --text-quaternary: #d4d4d4;
            --text-inverse: #ffffff;
            
            /* Border Colors */
            --border-primary: #e5e5e5;
            --border-secondary: #f5f5f5;
            --border-focus: #0070f3;
            --border-color: #e5e5e5;
            
            /* Spacing */
            --sidebar-width: 240px;
            --radius-sm: 6px;
            --radius-md: 8px;
            --radius-lg: 12px;
            
            /* Typography */
            --font-size-xs: 12px;
            --font-size-sm: 13px;
            --font-size-base: 14px;
            --font-size-lg: 16px;
            --font-size-xl: 18px;
            --font-size-2xl: 24px;
            --font-size-3xl: 30px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
            font-size: var(--font-size-base);
            line-height: 1.5;
            color: var(--text-primary);
            background: var(--bg-secondary);
            min-height: 100vh;
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        .dashboard-container {
            display: flex;
            height: 100vh;
            background: var(--bg-secondary);
        }

        /* Mobile Menu Toggle */
        .mobile-menu-toggle {
            display: none;
            position: fixed;
            top: 16px;
            left: 16px;
            z-index: 1001;
            background: var(--bg-primary);
            color: var(--text-primary);
            border: 1px solid var(--border-primary);
            padding: 8px;
            border-radius: var(--radius-md);
            cursor: pointer;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            font-size: 20px;
            line-height: 1;
            transition: all 0.15s ease;
        }

        .mobile-menu-toggle:hover {
            background: var(--bg-secondary);
        }

        .mobile-menu-toggle:active {
            transform: scale(0.98);
        }

        /* Overlay for mobile menu */
        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.4);
            z-index: 999;
            backdrop-filter: blur(2px);
        }

        /* Sidebar */
        .sidebar {
            width: var(--sidebar-width);
            background: var(--bg-primary);
            border-right: 1px solid var(--border-primary);
            padding: 20px 12px;
            overflow-y: auto;
            transition: transform 0.2s ease;
            z-index: 1000;
        }

        .logo {
            font-size: var(--font-size-lg);
            font-weight: 600;
            margin-bottom: 24px;
            padding: 12px;
            border-radius: var(--radius-md);
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            color: var(--text-primary);
            border: 1px solid var(--border-primary);
        }

        .logo-image {
            max-width: 32px;
            max-height: 32px;
            object-fit: contain;
        }

        .logo-text {
            font-size: var(--font-size-lg);
            font-weight: 600;
            letter-spacing: -0.01em;
        }

        .nav-item {
            padding: 8px 12px;
            margin-bottom: 2px;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all 0.15s ease;
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--text-secondary);
            font-size: var(--font-size-sm);
            font-weight: 500;
        }

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

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

        .nav-item.active .nav-icon svg {
            stroke: var(--primary);
        }

        .nav-icon {
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .nav-icon svg {
            transition: stroke 0.2s ease, transform 0.2s ease;
        }

        .nav-item:hover .nav-icon svg {
            transform: scale(1.1);
        }

        /* Main Content */
        .main-content {
            flex: 1;
            padding: 24px;
            overflow-y: auto; /* Solo un scroll para todo el contenido */
            background: var(--bg-secondary);
            width: 100%;
            max-width: 100%;
        }

        .section {
            display: none;
            width: 100%;
            max-width: 100%;
            padding-bottom: 60px;
            overflow: visible; /* Evitar segundo scroll */
        }

        .section.active {
            display: block !important;
            animation: fadeIn 0.2s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(4px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        @keyframes shimmer {
            0% { background-position: -200% 0; }
            100% { background-position: 200% 0; }
        }
        
        /* Launch Button Styles */
        #bot-runner-toggle:checked + .launch-switch {
            background: linear-gradient(135deg, #f44336, #e91e63) !important;
            box-shadow: 0 0 20px rgba(244, 67, 54, 0.6), inset 0 2px 4px rgba(0,0,0,0.2) !important;
        }
        
        #bot-runner-toggle:checked + .launch-switch .launch-slider {
            transform: translateX(28px);
            background: #fff;
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 2px 4px rgba(0,0,0,0.3) !important;
        }
        
        .launch-button-container:has(#bot-runner-toggle:checked) {
            background: linear-gradient(135deg, rgba(76,175,80,0.15), rgba(67,160,71,0.15)) !important;
            border-color: rgba(76,175,80,0.5) !important;
            animation: pulse 2s ease-in-out infinite;
        }
        
        @keyframes pulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(76,175,80,0.4); }
            50% { box-shadow: 0 0 0 8px rgba(76,175,80,0); }
        }
        
        .launch-toggle:hover .launch-switch {
            transform: scale(1.05);
        }

        .section-header {
            margin-bottom: 24px;
            padding-bottom: 16px;
            border-bottom: 1px solid var(--border-primary);
        }

        .section-title {
            font-size: var(--font-size-2xl);
            color: var(--text-primary);
            margin-bottom: 4px;
            font-weight: 600;
            letter-spacing: -0.02em;
        }

        .section-subtitle {
            color: var(--text-secondary);
            font-size: var(--font-size-sm);
        }

        /* Cards */
        .card {
            background: var(--bg-primary);
            border-radius: var(--radius-lg);
            padding: 20px;
            border: 1px solid var(--border-primary);
            margin-bottom: 16px;
            transition: all 0.15s ease;
        }

        .card:hover {
            border-color: var(--gray-300);
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        }

        .card-title {
            font-size: var(--font-size-lg);
            font-weight: 600;
            margin-bottom: 16px;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* Grid Layouts */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px;
            margin-bottom: 24px;
        }

        .stat-card {
            background: var(--bg-primary);
            padding: 20px;
            border-radius: var(--radius-lg);
            border: 1px solid var(--border-primary);
            transition: all 0.15s ease;
            position: relative;
            overflow: hidden;
        }

        .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--primary), var(--primary-hover));
            opacity: 0;
            transition: opacity 0.15s ease;
        }

        .stat-card:hover {
            border-color: var(--primary);
            box-shadow: 0 4px 12px rgba(0, 112, 243, 0.1);
            transform: translateY(-2px);
        }

        .stat-card:hover::before {
            opacity: 1;
        }

        .stat-value {
            font-size: var(--font-size-3xl);
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 4px;
            letter-spacing: -0.02em;
        }

        .stat-label {
            color: var(--text-secondary);
            font-size: var(--font-size-xs);
            text-transform: uppercase;
            font-weight: 500;
            letter-spacing: 0.05em;
        }

        .stat-change {
            font-size: var(--font-size-xs);
            margin-top: 8px;
            padding: 2px 8px;
            border-radius: var(--radius-sm);
            display: inline-block;
            font-weight: 500;
        }

        .stat-change.positive {
            background: #ecfdf5;
            color: #10b981;
        }

        .stat-change.negative {
            background: #fef2f2;
            color: #ef4444;
        }

        /* Account Cards */
        .accounts-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 16px;
        }

        .account-card {
            background: var(--bg-primary);
            border-radius: var(--radius-lg);
            padding: 16px;
            border: 1px solid var(--border-primary);
            position: relative;
            overflow: hidden;
            transition: all 0.15s ease;
        }

        .account-card:hover {
            border-color: var(--gray-300);
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        }

        .account-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
        }

        .account-avatar {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), var(--primary-light));
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
            font-size: var(--font-size-lg);
        }

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

        .account-username {
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 2px;
            font-size: var(--font-size-sm);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .account-bot {
            font-size: var(--font-size-xs);
            color: var(--text-secondary);
        }

        .account-status {
            position: absolute;
            top: 16px;
            right: 16px;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            animation: pulse 2s infinite;
        }

        .status-active { background: #10b981; }
        .status-warming { background: var(--warning); }
        .status-cooldown { background: var(--info); }
        .status-restricted { background: var(--danger); }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .account-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            padding-top: 12px;
            border-top: 1px solid var(--border-secondary);
        }

        .account-stat {
            text-align: center;
        }

        .account-stat-value {
            font-weight: 600;
            color: var(--text-primary);
            font-size: var(--font-size-base);
        }

        .account-stat-label {
            font-size: var(--font-size-xs);
            color: var(--text-tertiary);
            text-transform: uppercase;
            font-weight: 500;
            letter-spacing: 0.05em;
        }

        /* Bot Runner Status */
        .bot-active {
            color: #10b981;
            font-weight: 600;
        }
        
        .bot-inactive {
            color: var(--text-tertiary);
        }

        /* Comments Stream */
        .comments-stream {
            max-height: 500px;
            overflow-y: auto;
            padding: 12px;
            background: var(--bg-secondary);
            border-radius: var(--radius-md);
            border: 1px solid var(--border-primary);
        }

        .comment-item {
            background: var(--bg-primary);
            padding: 12px;
            margin-bottom: 8px;
            border-radius: var(--radius-md);
            border-left: 2px solid var(--primary);
            animation: slideIn 0.2s ease;
        }

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

        .comment-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 6px;
        }

        .comment-account {
            font-weight: 600;
            color: var(--primary);
            font-size: var(--font-size-sm);
        }

        .comment-time {
            font-size: var(--font-size-xs);
            color: var(--text-tertiary);
        }

        .comment-text {
            color: var(--text-primary);
            line-height: 1.5;
            font-size: var(--font-size-sm);
        }

        .comment-target {
            font-size: var(--font-size-xs);
            color: var(--text-secondary);
            margin-top: 6px;
        }

        /* API Status */
        .api-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 16px;
        }

        .api-card {
            background: var(--bg-primary);
            padding: 16px;
            border-radius: var(--radius-lg);
            display: flex;
            align-items: center;
            gap: 12px;
            border: 1px solid var(--border-primary);
            transition: all 0.15s ease;
        }

        .api-card:hover {
            border-color: var(--gray-300);
        }

        .api-icon {
            width: 44px;
            height: 44px;
            border-radius: var(--radius-md);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
        }

        .api-icon.connected {
            background: #E8F5E9;
            color: var(--success);
        }

        .api-icon.disconnected {
            background: #FFEBEE;
            color: var(--danger);
        }

        .api-info {
            flex: 1;
        }

        .api-name {
            font-weight: 600;
            margin-bottom: 2px;
            font-size: var(--font-size-sm);
            color: var(--text-primary);
        }

        .api-status {
            font-size: var(--font-size-xs);
            color: var(--text-secondary);
        }

        /* Forms */
        .form-group {
            margin-bottom: 16px;
        }

        .form-label {
            display: block;
            margin-bottom: 6px;
            font-weight: 500;
            color: var(--text-primary);
            font-size: var(--font-size-sm);
        }

        .form-control {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid var(--border-primary);
            border-radius: var(--radius-md);
            font-size: var(--font-size-sm);
            transition: all 0.15s ease;
            background: var(--bg-primary);
            color: var(--text-primary);
            font-family: inherit;
            line-height: 1.5;
        }

        .form-control:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.1);
        }

        .form-control::placeholder {
            color: var(--text-tertiary);
        }

        /* Action Tables */
        .table-container {
            overflow-x: auto;
            border-radius: var(--radius-lg);
            border: 1px solid var(--border-primary);
            background: var(--bg-primary);
        }

        .actions-table {
            width: 100%;
            border-collapse: collapse;
            font-size: var(--font-size-sm);
        }

        .actions-table thead {
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border-primary);
        }

        .actions-table th,
        .actions-table td {
            padding: 10px 12px;
            text-align: left;
            border-bottom: 1px solid var(--border-secondary);
        }

        .actions-table th {
            font-weight: 600;
            color: var(--text-secondary);
            font-size: var(--font-size-xs);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .actions-table tbody tr:hover {
            background: var(--bg-secondary);
        }
        
        .comment-preview {
            max-width: 300px;
            word-wrap: break-word;
            line-height: 1.4;
            color: var(--text-primary);
        }
        
        .actions-table a {
            color: var(--primary);
            text-decoration: none;
            font-weight: 500;
        }
        
        .actions-table a:hover {
            text-decoration: underline;
        }

        .status-badge {
            padding: 2px 8px;
            border-radius: var(--radius-sm);
            font-size: var(--font-size-xs);
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        .status-success {
            background: #ecfdf5;
            color: #10b981;
        }

        .status-failed {
            background: #fef2f2;
            color: #ef4444;
        }

        .status-pending {
            background: #fef3c7;
            color: #f59e0b;
        }

        .btn {
            padding: 8px 16px;
            border: 1px solid var(--border-primary);
            border-radius: var(--radius-md);
            font-size: var(--font-size-sm);
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
            font-family: inherit;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            line-height: 1.5;
        }

        .btn:hover {
            border-color: var(--gray-300);
        }

        .btn:active {
            transform: scale(0.98);
        }

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

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

        .btn-primary:hover {
            background: var(--primary-dark);
            border-color: var(--primary-dark);
        }

        .btn-success {
            background: #10b981;
            color: white;
            border-color: #10b981;
        }

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

        .btn-danger {
            background: #ef4444;
            color: white;
            border-color: #ef4444;
        }

        .btn-danger:hover {
            background: #dc2626;
            border-color: #dc2626;
        }

        .btn-secondary {
            background: var(--bg-primary);
            color: var(--text-primary);
            border-color: var(--border-primary);
        }

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

        /* Logs */
        .logs-container {
            background: var(--gray-900);
            color: #10b981;
            padding: 16px;
            border-radius: var(--radius-lg);
            font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Courier New', monospace;
            font-size: var(--font-size-xs);
            height: 400px;
            overflow-y: auto;
            border: 1px solid var(--gray-800);
        }

        .log-entry {
            margin-bottom: 6px;
            opacity: 0;
            animation: fadeIn 0.2s forwards;
            line-height: 1.6;
        }

        .log-time {
            color: #fbbf24;
            margin-right: 8px;
        }

        .log-error { color: #ef4444; }
        .log-success { color: #10b981; }
        .log-warning { color: #f59e0b; }
        .log-info { color: #3b82f6; }

        /* Settings */
        .settings-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 16px;
        }

        .setting-group {
            background: var(--bg-primary);
            padding: 20px;
            border-radius: var(--radius-lg);
            border: 1px solid var(--border-primary);
        }

        .setting-title {
            font-weight: 600;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border-secondary);
            font-size: var(--font-size-base);
            color: var(--text-primary);
        }

        .setting-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }

        .setting-label {
            font-size: var(--font-size-sm);
            color: var(--text-secondary);
        }

        .setting-value {
            font-weight: 600;
            color: var(--text-primary);
            font-size: var(--font-size-sm);
        }

        /* Switch */
        .switch {
            position: relative;
            width: 50px;
            height: 25px;
        }

        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: #ccc;
            transition: .4s;
            border-radius: 25px;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 4px;
            bottom: 3.5px;
            background: white;
            transition: .4s;
            border-radius: 50%;
        }

        input:checked + .slider {
            background: var(--primary);
        }

        input:checked + .slider:before {
            transform: translateX(24px);
        }

        /* Configuración de Cuenta */
        .config-tabs {
            display: flex;
            border-bottom: 2px solid #e0e0e0;
            margin-bottom: 30px;
            padding-bottom: 10px;
        }

        .config-tab {
            padding: 10px 16px;
            background: none;
            border: none;
            cursor: pointer;
            font-size: var(--font-size-sm);
            font-weight: 500;
            color: var(--text-secondary);
            border-bottom: 2px solid transparent;
            transition: all 0.15s ease;
            border-radius: var(--radius-sm) var(--radius-sm) 0 0;
        }

        .config-tab:hover {
            color: var(--text-primary);
            background: var(--bg-secondary);
        }

        .config-tab.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
            background: transparent;
            font-weight: 600;
        }

        .config-tab-content {
            display: none;
        }

        .config-tab-content.active {
            display: block;
            animation: fadeIn 0.2s ease;
        }

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

        .form-grid .full-width {
            grid-column: 1 / -1;
        }

        .form-group {
            margin-bottom: 0;
        }

        .form-group label {
            display: block;
            margin-bottom: 6px;
            font-weight: 500;
            color: var(--text);
            font-size: 13px;
        }

        .form-control {
            width: 100%;
            padding: 12px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 14px;
            transition: border-color 0.3s;
        }

        .form-control:focus {
            border-color: var(--primary);
            outline: none;
            box-shadow: 0 0 0 3px rgba(94, 53, 177, 0.1);
        }

        .form-control[type="range"] {
            padding: 0;
            height: 6px;
            background: #e0e0e0;
            cursor: pointer;
        }

        .form-control[type="range"]::-webkit-slider-thumb {
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--primary);
            cursor: pointer;
        }

        /* Estilos para píldoras de personalidad */
        .personality-pill {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 16px;
            border-radius: var(--radius-lg);
            background: var(--bg-primary);
            border: 2px solid var(--border-primary);
            cursor: pointer;
            transition: all 0.15s ease;
            text-decoration: none;
            color: var(--text-primary);
            font-weight: 500;
            min-height: 80px;
            width: 100%;
            box-sizing: border-box;
            position: relative;
        }

        .personality-pill:hover {
            border-color: var(--primary);
            box-shadow: 0 2px 8px rgba(0, 112, 243, 0.1);
            transform: translateY(-1px);
        }

        .personality-pill.active {
            background: var(--primary);
            border-color: var(--primary);
            color: white;
            box-shadow: 0 4px 12px rgba(0, 112, 243, 0.25);
            animation: pillActivate 0.2s ease;
        }

        @keyframes pillActivate {
            0% { transform: scale(0.98); }
            50% { transform: scale(1.02); }
            100% { transform: scale(1); }
        }

        @keyframes checkIn {
            0% { 
                opacity: 0;
                transform: scale(0.5) rotate(-45deg);
            }
            60% {
                transform: scale(1.1) rotate(5deg);
            }
            100% { 
                opacity: 1;
                transform: scale(1) rotate(0deg);
            }
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .stat-card {
            animation: fadeInUp 0.4s ease forwards;
        }

        .stat-card:nth-child(1) { animation-delay: 0.05s; }
        .stat-card:nth-child(2) { animation-delay: 0.1s; }
        .stat-card:nth-child(3) { animation-delay: 0.15s; }
        .stat-card:nth-child(4) { animation-delay: 0.2s; }

        .personality-pill.active:hover {
            box-shadow: 0 6px 16px rgba(0, 112, 243, 0.3);
            transform: translateY(-1px);
        }

        .personality-pill.active .personality-pill-description {
            opacity: 0.9;
        }

        .personality-pill-emoji {
            font-size: 32px;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            background: var(--bg-secondary);
            border-radius: var(--radius-md);
            transition: all 0.15s ease;
        }

        .personality-pill.active .personality-pill-emoji {
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.05);
        }

        .personality-pill-content {
            flex: 1;
            text-align: left;
            min-width: 0;
        }

        .personality-pill-name {
            font-weight: 600;
            font-size: var(--font-size-base);
            margin-bottom: 4px;
            line-height: 1.2;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .personality-pill-description {
            font-size: var(--font-size-xs);
            opacity: 0.7;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .personality-preview {
            animation: fadeIn 0.2s ease;
        }

        .current-personality .personality-pill {
            margin: 0;
            pointer-events: none;
            min-height: auto;
            padding: 12px;
        }

        .current-personality .personality-pill-emoji {
            font-size: 24px;
            width: 32px;
            height: 32px;
        }

        .current-personality .personality-pill-name {
            font-size: var(--font-size-sm);
        }

        .current-personality .personality-pill-description {
            font-size: var(--font-size-xs);
        }

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

        .form-group input[type="checkbox"] {
            margin-right: 8px;
            transform: scale(1.2);
        }

        .config-actions {
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid #e0e0e0;
            display: flex;
            gap: 15px;
            justify-content: flex-end;
        }

        /* Personalidades */
        .personalities-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }

        .personality-card {
            background: var(--bg-primary);
            border-radius: var(--radius-lg);
            padding: 0;
            border: 1px solid var(--border-primary);
            transition: all 0.15s ease;
            overflow: hidden;
            position: relative;
        }

        .personality-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--primary), var(--primary-hover));
            opacity: 0;
            transition: opacity 0.15s ease;
        }

        .personality-card:hover {
            border-color: var(--primary);
            box-shadow: 0 4px 12px rgba(0, 112, 243, 0.1);
            transform: translateY(-2px);
        }

        .personality-card:hover::before {
            opacity: 1;
        }

        .personality-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            padding: 20px 20px 16px;
            border-bottom: 1px solid var(--border-primary);
            background: var(--bg-secondary);
        }

        .personality-title {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
        }

        .personality-emoji {
            font-size: 28px;
            width: 48px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--bg-primary);
            border-radius: var(--radius-md);
            border: 1px solid var(--border-primary);
            flex-shrink: 0;
        }

        .personality-name {
            font-weight: 600;
            color: var(--text-primary);
            font-size: var(--font-size-base);
            margin: 0;
        }

        .personality-actions {
            display: flex;
            gap: 6px;
        }

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

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

        .btn-delete:hover {
            border-color: var(--danger);
            background: var(--danger);
            color: white;
        }

        .personality-body {
            padding: 20px;
        }

        .personality-description {
            color: var(--text-secondary);
            font-size: var(--font-size-sm);
            margin-bottom: 16px;
            line-height: 1.5;
        }

        .personality-meta {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 16px;
        }

        .personality-tag {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 10px;
            background: var(--bg-secondary);
            border: 1px solid var(--border-primary);
            border-radius: var(--radius-sm);
            font-size: 11px;
            font-weight: 500;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.02em;
        }

        .personality-tag svg {
            width: 12px;
            height: 12px;
        }

        .personality-examples {
            background: var(--bg-secondary);
            padding: 16px;
            border-radius: var(--radius-md);
            border: 1px solid var(--border-primary);
        }

        .personality-examples h5 {
            margin: 0 0 12px 0;
            color: var(--text-secondary);
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .personality-examples h5 svg {
            width: 14px;
            height: 14px;
            opacity: 0.7;
        }

        .example-comment {
            position: relative;
            background: var(--bg-primary);
            padding: 12px 16px 12px 44px;
            border-radius: var(--radius-sm);
            margin: 8px 0;
            font-size: var(--font-size-sm);
            color: var(--text-primary);
            line-height: 1.5;
            border: 1px solid var(--border-primary);
            transition: all 0.15s ease;
        }

        .example-comment::before {
            content: '"';
            position: absolute;
            left: 14px;
            top: 8px;
            font-size: 28px;
            font-weight: 700;
            color: var(--primary);
            opacity: 0.15;
            font-family: Georgia, serif;
            line-height: 1;
        }

        .example-comment:hover {
            border-color: var(--primary);
            background: var(--bg-primary);
            box-shadow: 0 2px 8px rgba(0, 112, 243, 0.08);
        }

        .example-comment:last-child {
            margin-bottom: 0;
        }

        .example-comment:first-of-type {
            margin-top: 0;
        }

        /* Modal - OCULTO por defecto */
        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.4);
            backdrop-filter: blur(4px);
            display: none; /* OCULTO por defecto */
            align-items: center;
            justify-content: center;
            z-index: 1000;
            animation: fadeIn 0.2s ease;
        }

        .modal-content {
            background: var(--bg-primary);
            border-radius: var(--radius-lg);
            width: 90%;
            max-width: 600px;
            max-height: 90vh;
            overflow-y: auto;
            border: 1px solid var(--border-primary);
            box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
        }

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

        .modal-header h3 {
            margin: 0;
            color: var(--text-primary);
            font-size: var(--font-size-xl);
            font-weight: 600;
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 20px;
            cursor: pointer;
            color: var(--text-tertiary);
            width: 32px;
            height: 32px;
            border-radius: var(--radius-md);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s ease;
        }

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

        .modal-body {
            padding: 20px;
        }

        .btn-sm {
            padding: 6px 12px;
            font-size: var(--font-size-xs);
        }

        /* Estilos adicionales para testing */
        .loading {
            text-align: center;
            padding: 20px;
            color: var(--text-secondary);
            font-style: italic;
            font-size: var(--font-size-sm);
        }

        .test-result {
            margin-top: 20px;
        }

        .test-result h4 {
            margin: 0 0 15px 0;
            color: var(--primary);
            font-size: 16px;
        }

        .generated-comment {
            background: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 8px;
            padding: 15px;
            margin: 10px 0;
        }

        .generated-comment strong {
            color: var(--primary);
            display: block;
            margin-bottom: 8px;
        }

        .generated-comment p {
            margin: 0;
            font-style: italic;
            background: white;
            padding: 10px;
            border-radius: 4px;
            border-left: 3px solid var(--primary);
        }

        .error {
            color: #d32f2f;
            background: #ffebee;
            padding: 15px;
            border-radius: 6px;
            text-align: center;
        }

        /* Verification System Styles */
        .verification-check {
            display: flex;
            align-items: flex-start;
            padding: 14px;
            margin-bottom: 0;
            border-radius: 8px;
            border-left: 4px solid #e0e0e0;
            background: #fafafa;
            transition: all 0.3s ease;
        }

        .verification-check.pending {
            border-left-color: #999;
            opacity: 0.6;
        }

        .verification-check.running {
            border-left-color: #2196F3;
            background: #E3F2FD;
            animation: pulse 2s infinite;
        }

        .verification-check.success {
            border-left-color: #4CAF50;
            background: #E8F5E9;
        }

        .verification-check.failed {
            border-left-color: #F44336;
            background: #FFEBEE;
        }

        .verification-check.skipped {
            border-left-color: #FF9800;
            background: #FFF3E0;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .verification-check-icon {
            font-size: 24px;
            margin-right: 12px;
            min-width: 24px;
            text-align: center;
        }

        .verification-check.running .verification-check-icon {
            animation: spin 2s linear infinite;
        }

        .verification-check-content {
            flex: 1;
        }

        .verification-check-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 4px;
        }

        .verification-check-name {
            font-weight: 600;
            font-size: 14px;
            color: #333;
        }

        .verification-check-duration {
            font-size: 11px;
            color: #999;
            font-family: 'Consolas', 'Monaco', monospace;
        }

        .verification-check-description {
            font-size: 12px;
            color: #666;
            margin-bottom: 6px;
        }

        .verification-check-details {
            margin-top: 10px;
            padding: 10px;
            background: rgba(255,255,255,0.7);
            border-radius: 4px;
            font-size: 11px;
            font-family: 'Consolas', 'Monaco', monospace;
            display: none;
        }

        .verification-check-details.show {
            display: block;
        }

        .verification-check-details ul {
            margin: 0;
            padding-left: 20px;
        }

        .verification-check-details li {
            margin: 4px 0;
        }

        .verification-check-error {
            margin-top: 8px;
            padding: 8px;
            background: #ffebee;
            border-radius: 4px;
            font-size: 11px;
            color: #c62828;
            display: none;
        }

        .verification-check-error.show {
            display: block;
        }

        .verification-log-entry {
            margin-bottom: 4px;
            padding: 4px 0;
            font-size: 12px;
            line-height: 1.6;
        }

        .verification-log-entry.info {
            color: #90caf9;
        }

        .verification-log-entry.warning {
            color: #ffb74d;
        }

        .verification-log-entry.error {
            color: #ef5350;
        }

        .verification-summary {
            padding: 20px;
            border-radius: 8px;
            margin-top: 20px;
        }

        .verification-summary.success {
            background: #E8F5E9;
            border: 2px solid #4CAF50;
        }

        .verification-summary.failed {
            background: #FFEBEE;
            border: 2px solid #F44336;
        }

        .verification-summary h3 {
            margin: 0 0 15px 0;
            font-size: 20px;
        }

        .verification-summary.success h3 {
            color: #2E7D32;
        }

        .verification-summary.failed h3 {
            color: #C62828;
        }

        .verification-summary ul {
            margin: 10px 0;
            padding-left: 20px;
        }

        .verification-summary li {
            margin: 6px 0;
            font-size: 14px;
        }

        .verification-summary .bot-status {
            margin-top: 15px;
            padding: 12px;
            background: rgba(255,255,255,0.7);
            border-radius: 6px;
            font-weight: 600;
        }

        /* Notifications */
        .notification {
            box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
            border-radius: var(--radius-md);
            padding: 12px 16px;
            font-size: var(--font-size-sm);
            font-weight: 500;
        }

        .notification.success {
            background: #10b981 !important;
            color: white;
        }

        .notification.error {
            background: #ef4444 !important;
            color: white;
        }

        /* Bot Runner Section */
        .bot-runner-section {
            padding: 20px;
            background: #f8f9fa;
            border-radius: 8px;
            margin-top: 15px;
        }

        .bot-status {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .status-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            border-radius: 20px;
            font-weight: 600;
            font-size: 14px;
        }

        .status-badge.stopped {
            background: #e0e0e0;
            color: #757575;
        }

        .status-badge.running {
            background: #e8f5e9;
            color: #2e7d32;
            animation: pulse 2s infinite;
        }

        .status-badge.error {
            background: #ffebee;
            color: #c62828;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        .bot-uptime {
            font-size: 13px;
            color: #757575;
        }

        /* Toggle Switch */
        .toggle-container {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 20px;
        }

        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 60px;
            height: 34px;
        }

        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 34px;
        }

        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 26px;
            width: 26px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }

        input:checked + .toggle-slider {
            background-color: #4caf50;
        }

        input:checked + .toggle-slider:before {
            transform: translateX(26px);
        }

        input:disabled + .toggle-slider {
            background-color: #e0e0e0;
            cursor: not-allowed;
        }

        .toggle-label {
            font-weight: 500;
            color: #333;
        }

        /* Bot Stats */
        .bot-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
            padding: 15px;
            background: white;
            border-radius: 8px;
            margin-top: 15px;
        }

        .stat-item {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .stat-item .stat-label {
            font-size: 12px;
            color: #757575;
            text-transform: uppercase;
        }

        .stat-item .stat-value {
            font-size: 20px;
            font-weight: bold;
            color: #5e35b1;
        }

        /* Validation Errors */
        .validation-errors {
            margin-top: 15px;
        }

        .alert {
            padding: 12px 16px;
            border-radius: var(--radius-md);
            margin-bottom: 12px;
            font-size: var(--font-size-sm);
            border: 1px solid transparent;
        }

        .alert-error {
            background: #fef2f2;
            border-left: 3px solid #ef4444;
            color: #7f1d1d;
            border-color: #fecaca;
        }

        .alert strong {
            display: block;
            margin-bottom: 6px;
            font-weight: 600;
        }

        #validation-errors-list {
            list-style: none;
            padding-left: 0;
            margin: 0;
        }

        #validation-errors-list li {
            padding: 5px 0;
            font-size: 14px;
        }

        /* WebSocket Status Indicator */
        .ws-status-connected {
            background: linear-gradient(135deg, #00c853 0%, #00e676 100%);
            color: white;
            box-shadow: 0 2px 8px rgba(0, 200, 83, 0.3);
        }

        .ws-status-disconnected {
            background: linear-gradient(135deg, #d32f2f 0%, #ef5350 100%);
            color: white;
            box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
        }

        /* Live View Styles */
        .activity-item {
            background: white;
            padding: 12px 15px;
            margin-bottom: 8px;
            border-radius: 8px;
            border-left: 3px solid var(--primary);
            display: flex;
            align-items: flex-start;
            gap: 12px;
            animation: slideInLeft 0.3s ease;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

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

        .activity-item-icon {
            font-size: 20px;
            min-width: 24px;
            text-align: center;
        }

        .activity-item-content {
            flex: 1;
        }

        .activity-item-action {
            font-weight: 600;
            color: #333;
            font-size: 13px;
            margin-bottom: 3px;
        }

        .activity-item-message {
            color: #666;
            font-size: 12px;
            line-height: 1.4;
        }

        .activity-item-timestamp {
            font-size: 10px;
            color: #999;
            margin-top: 4px;
        }

        .activity-item.login { border-left-color: #4CAF50; }
        .activity-item.navigation { border-left-color: #2196F3; }
        .activity-item.like { border-left-color: #E91E63; }
        .activity-item.comment { border-left-color: #FF9800; }
        .activity-item.follow { border-left-color: #9C27B0; }
        .activity-item.error { border-left-color: #F44336; }
        .activity-item.system { border-left-color: #607D8B; }

        .activity-item.new {
            animation: slideInLeft 0.3s ease, pulse 1s ease;
        }

        @keyframes pulse {
            0%, 100% {
                box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            }
            50% {
                box-shadow: 0 2px 8px rgba(94, 53, 177, 0.3);
            }
        }

        /* Screenshot Modal */
        .screenshot-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.9);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            cursor: zoom-out;
        }

        .screenshot-modal img {
            max-width: 95%;
            max-height: 95vh;
            object-fit: contain;
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.5);
        }

        .screenshot-modal-close {
            position: absolute;
            top: 20px;
            right: 20px;
            background: white;
            color: #333;
            border: none;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            font-size: 24px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
            transition: all 0.3s;
        }

        .screenshot-modal-close:hover {
            transform: scale(1.1);
            background: #f5f5f5;
        }

        /* ========================================
           � DASHBOARD STATS - NEW STYLES
           ======================================== */

        .stat-icon {
            font-size: 40px;
            margin-bottom: 10px;
        }

        .stat-detail {
            font-size: 12px;
            color: var(--text-light);
            margin-top: 8px;
        }

        .stat-detail .positive {
            color: var(--success);
        }

        .loading-skeleton {
            background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
            background-size: 200% 100%;
            animation: loading 1.5s infinite;
            border-radius: 4px;
            height: 32px;
            width: 60px;
            display: inline-block;
        }

        @keyframes loading {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }

        .api-status-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .api-status-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 12px 16px;
            background: var(--bg-secondary);
            border: 1px solid var(--border-primary);
            border-radius: var(--radius-md);
            transition: all 0.15s ease;
        }

        .api-status-item:hover {
            border-color: var(--primary);
            background: var(--bg-primary);
        }

        .api-status-icon {
            font-size: 20px;
        }

        .api-status-label {
            font-weight: 500;
            font-size: var(--font-size-sm);
            color: var(--text-primary);
        }

        .api-status-badge {
            padding: 4px 12px;
            border-radius: var(--radius-sm);
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.02em;
        }

        .api-status-badge.online {
            background: #ecfdf5;
            color: var(--success);
        }

        .api-status-badge.offline {
            background: #fef2f2;
            color: var(--danger);
        }

        .api-status-badge.loading {
            background: #fef3c7;
            color: #d97706;
        }

        /* ========================================
           BENTO GRID STYLES
           ======================================== */
        
        .bento-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 16px;
        }
        
        .bento-card {
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        
        .bento-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.1);
        }
        
        .bento-hero {
            grid-column: span 2;
        }
        
        .bento-grid-2 {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 16px;
        }
        
        /* Bento Grid Responsive */
        @media (max-width: 1200px) {
            .bento-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            .bento-hero {
                grid-column: span 2;
            }
            .bento-grid-2 {
                grid-template-columns: 1fr;
            }
        }
        
        @media (max-width: 768px) {
            .bento-grid {
                grid-template-columns: 1fr;
            }
            .bento-hero {
                grid-column: span 1;
            }
            .bento-grid-2 {
                grid-template-columns: 1fr;
            }
        }

        /* ========================================
           RESPONSIVE STYLES - MOBILE FIRST
           ======================================== */

        /* Tablet and below (768px) */
        @media (max-width: 768px) {
            .mobile-menu-toggle {
                display: block;
            }

            .sidebar {
                position: fixed;
                left: 0;
                top: 0;
                height: 100vh;
                transform: translateX(-100%);
                box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
            }

            .sidebar.open {
                transform: translateX(0);
            }

            .sidebar-overlay.show {
                display: block;
            }

            .main-content {
                width: 100%;
                padding: 60px 16px 16px;
            }

            .section-title {
                font-size: var(--font-size-xl);
            }

            .stats-grid {
                grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
                gap: 12px;
            }

            .stat-card {
                padding: 16px;
            }

            .stat-value {
                font-size: var(--font-size-2xl);
            }

            .accounts-grid {
                grid-template-columns: 1fr;
            }

            .card {
                padding: 16px;
            }

            .table-container {
                font-size: var(--font-size-xs);
            }

            .actions-table th,
            .actions-table td {
                padding: 8px;
            }

            .btn {
                padding: 8px 16px;
                font-size: 14px;
            }

            .form-control {
                font-size: 16px; /* Prevent zoom on iOS */
            }

            /* Better touch targets */
            .nav-item {
                padding: 15px;
                font-size: 16px;
            }

            .account-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }

            .account-actions {
                width: 100%;
                justify-content: space-between;
            }

            /* Modal adjustments */
            .modal-content {
                width: 95%;
                max-height: 90vh;
                overflow-y: auto;
            }
        }

        /* Mobile phones (480px) */
        @media (max-width: 480px) {
            .logo {
                padding: 10px;
                font-size: 18px;
            }

            .logo-text {
                font-size: 18px;
            }

            .section-title {
                font-size: 20px;
            }

            .stats-grid {
                grid-template-columns: 1fr;
            }

            /* Dashboard grid responsivo */
            .dashboard-grid-2 {
                grid-template-columns: 1fr !important;
            }

            .stat-value {
                font-size: 28px;
            }

            .btn-group {
                flex-direction: column;
                width: 100%;
            }

            .btn-group .btn {
                width: 100%;
            }

            .card-title {
                font-size: 16px;
            }

            /* Stack form fields */
            .form-row {
                flex-direction: column;
            }

            .form-row .form-group {
                width: 100% !important;
            }
        }

        /* Landscape mobile (max-height: 500px) */
        @media (max-height: 500px) and (orientation: landscape) {
            .sidebar {
                padding: 10px;
            }

            .logo {
                padding: 8px;
                margin-bottom: 15px;
                font-size: 16px;
            }

            .nav-item {
                padding: 8px 12px;
                font-size: 14px;
            }

            .main-content {
                padding: 60px 15px 15px;
            }
        }

        /* Large tablets */
        @media (min-width: 769px) and (max-width: 1024px) {
            .sidebar {
                width: 220px;
            }

            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .dashboard-grid-2 {
                grid-template-columns: 1fr !important;
            }

            .accounts-grid {
                grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            }
        }

        /* Touch device improvements */
        @media (hover: none) and (pointer: coarse) {
            .btn,
            .nav-item,
            .account-card {
                user-select: none;
                -webkit-user-select: none;
            }

            .btn:active {
                transform: scale(0.98);
            }

            .nav-item:active {
                background: rgba(255, 255, 255, 0.2);
            }
        }

        /* ========================================== */
        /* DASHBOARD MEJORADO - Animaciones y Estilos */
        /* ========================================== */
        
        @keyframes gradientShift {
            0%, 100% {
                background-position: 0% 50%;
            }
            50% {
                background-position: 100% 50%;
            }
        }
        
        @keyframes slideInFromLeft {
            from {
                opacity: 0;
                transform: translateX(-30px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }
        
        @keyframes countUp {
            from {
                opacity: 0;
                transform: scale(0.8);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }
        
        @keyframes pulseGlow {
            0%, 100% {
                box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
            }
            50% {
                box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
            }
        }
        
        /* Hero Section Animations */
        .section-header {
            animation: fadeInUp 0.6s ease forwards;
        }
        
        .section-header > div:first-child > div {
            animation: slideInFromLeft 0.8s ease forwards;
        }
        
        /* Hero Stats Cards */
        .section-header [style*="grid-template-columns"] > div {
            animation: fadeInUp 0.5s ease forwards;
            opacity: 0;
        }
        
        .section-header [style*="grid-template-columns"] > div:nth-child(1) {
            animation-delay: 0.1s;
        }
        
        .section-header [style*="grid-template-columns"] > div:nth-child(2) {
            animation-delay: 0.2s;
        }
        
        .section-header [style*="grid-template-columns"] > div:nth-child(3) {
            animation-delay: 0.3s;
        }
        
        .section-header [style*="grid-template-columns"] > div:nth-child(4) {
            animation-delay: 0.4s;
        }
        
        /* Stat Cards con Gradient */
        .stat-card[style*="linear-gradient"] {
            position: relative;
            overflow: hidden;
            transition: all 0.3s ease;
        }
        
        .stat-card[style*="linear-gradient"]::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .stat-card[style*="linear-gradient"]:hover::before {
            opacity: 1;
        }
        
        .stat-card[style*="linear-gradient"]:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
        }
        
        /* Timeline Animations */
        #activity-timeline > div {
            animation: slideInFromLeft 0.5s ease forwards;
            opacity: 0;
        }
        
        #activity-timeline > div:nth-child(1) { animation-delay: 0.1s; }
        #activity-timeline > div:nth-child(2) { animation-delay: 0.2s; }
        #activity-timeline > div:nth-child(3) { animation-delay: 0.3s; }
        #activity-timeline > div:nth-child(4) { animation-delay: 0.4s; }
        #activity-timeline > div:nth-child(5) { animation-delay: 0.5s; }
        #activity-timeline > div:nth-child(6) { animation-delay: 0.6s; }
        
        /* Loading Skeleton Shimmer */
        .loading-skeleton {
            background: linear-gradient(
                90deg,
                var(--bg-tertiary) 0%,
                var(--bg-secondary) 50%,
                var(--bg-tertiary) 100%
            );
            background-size: 200% 100%;
            animation: shimmer 1.5s infinite;
            border-radius: 4px;
            display: inline-block;
            min-width: 40px;
            min-height: 20px;
        }
        
        /* Numbers Counter Effect */
        .stat-value,
        [id^="hero-"] {
            animation: countUp 0.6s ease forwards;
        }
        
        /* Card Hover Effects */
        .card {
            transition: all 0.3s ease;
        }
        
        .card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
        }
        
        /* Gradient Background Animation */
        .section-header[style*="linear-gradient"] {
            background-size: 200% 200%;
            animation: gradientShift 8s ease infinite;
        }
        
        /* Timeline Pulse Effect */
        #activity-timeline [style*="position: absolute"][style*="border-radius: 50%"] {
            animation: pulseGlow 2s ease-in-out infinite;
        }
        
        /* Success/Error Badge Pulse */
        [style*="background: #10b981"],
        [style*="background: #ef4444"] {
            animation: pulse 2s ease-in-out infinite;
        }
        
        /* Smooth Transitions for All Interactive Elements */
        button, .btn, .nav-item, a {
            transition: all 0.2s ease;
        }
        
        /* Responsive Hero Section */
        @media (max-width: 768px) {
            .section-header[style*="linear-gradient"] {
                padding: 24px 20px !important;
            }
            
            .section-header h1 {
                font-size: 24px !important;
            }
            
            .section-header [style*="grid-template-columns"] {
                grid-template-columns: 1fr !important;
            }
        }

        /* ============================================
           MODAL OVERLAY STYLES
           ============================================ */
        
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(4px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }
        
        .modal-overlay.active {
            display: flex;
            opacity: 1;
            visibility: visible;
        }
        
        .modal-content {
            background: #ffffff;
            border-radius: 16px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
            max-width: 90%;
            max-height: 90vh;
            overflow-y: auto;
            transform: scale(0.9);
            transition: transform 0.3s ease;
            border: 1px solid rgba(0, 0, 0, 0.1);
        }
        
        /* Dark mode support for modal */
        @media (prefers-color-scheme: dark) {
            .modal-content {
                background: #1a1a1a;
                border-color: rgba(255, 255, 255, 0.1);
            }
        }
        
        .modal-overlay.active .modal-content {
            transform: scale(1);
        }
        
        .modal-header {
            padding: 20px 24px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .modal-header h3 {
            margin: 0;
            display: flex;
            align-items: center;
            color: var(--text-primary);
            font-size: 18px;
        }
        
        .modal-header .close-btn {
            background: none;
            border: none;
            font-size: 28px;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 0;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            transition: all 0.2s ease;
        }
        
        .modal-header .close-btn:hover {
            background: var(--error-bg);
            color: var(--error-color);
        }
        
        .modal-body {
            padding: 24px;
        }
        
        .modal-footer {
            padding: 16px 24px;
            border-top: 1px solid var(--border-color);
            display: flex;
            gap: 12px;
            justify-content: flex-end;
        }
        
        /* Scrollbar para modales */
        .modal-content::-webkit-scrollbar {
            width: 8px;
        }
        
        .modal-content::-webkit-scrollbar-track {
            background: var(--bg-secondary);
            border-radius: 4px;
        }
        
        .modal-content::-webkit-scrollbar-thumb {
            background: var(--border-color);
            border-radius: 4px;
        }
        
        .modal-content::-webkit-scrollbar-thumb:hover {
            background: var(--text-secondary);
        }

        /* ============================================
           MODERN DASHBOARD ENHANCEMENTS
           ============================================ */
        
        /* Hero stat cards hover effect */
        .hero-stat-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 40px rgba(0,0,0,0.2) !important;
        }
        
        /* Modern card base */
        .modern-card {
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .modern-card:hover {
            transform: translateY(-2px);
        }
        
        /* Stat card hover effects */
        .stat-card {
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
        }
        
        .stat-card:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
        }
        
        .stat-card:active {
            transform: translateY(-4px) scale(1.01);
        }
        
        /* Dashboard hero gradient animation */
        .dashboard-hero {
            animation: gradientFlow 15s ease infinite;
            background-size: 200% 200%;
        }
        
        @keyframes gradientFlow {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        
        /* Pulse animation for status indicators */
        @keyframes pulseGlow {
            0%, 100% {
                box-shadow: 0 0 8px rgba(16, 185, 129, 0.6),
                            0 0 16px rgba(16, 185, 129, 0.4);
                opacity: 1;
            }
            50% {
                box-shadow: 0 0 16px rgba(16, 185, 129, 0.8),
                            0 0 32px rgba(16, 185, 129, 0.6);
                opacity: 0.8;
            }
        }
        
        /* Timeline improvements */
        #activity-timeline .timeline-item {
            transition: all 0.3s ease;
        }
        
        #activity-timeline .timeline-item:hover {
            transform: translateX(8px);
            background: var(--bg-secondary);
            border-radius: 12px;
            padding-left: 16px;
            margin-left: -16px;
        }
        
        /* Loading skeleton shimmer effect */
        @keyframes shimmer {
            0% {
                background-position: -1000px 0;
            }
            100% {
                background-position: 1000px 0;
            }
        }
        
        .loading-skeleton {
            animation: shimmer 2s infinite linear;
            background: linear-gradient(
                to right,
                rgba(255,255,255,0.1) 0%,
                rgba(255,255,255,0.2) 50%,
                rgba(255,255,255,0.1) 100%
            );
            background-size: 1000px 100%;
        }
        
        /* Smooth number counter animation */
        @keyframes countUp {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .count-animation {
            animation: countUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        /* ========== INFINITE PROGRESS BAR ========== */
        .progress-bar-infinite {
            width: 100%;
            height: 4px;
            background: var(--gray-200);
            border-radius: 2px;
            overflow: hidden;
            position: relative;
        }
        
        .progress-bar-infinite::after {
            content: '';
            position: absolute;
            top: 0;
            left: -40%;
            width: 40%;
            height: 100%;
            background: linear-gradient(90deg, transparent, var(--primary), transparent);
            animation: progressInfinite 1.5s ease-in-out infinite;
        }
        
        @keyframes progressInfinite {
            0% { left: -40%; }
            100% { left: 100%; }
        }
        
        .progress-container {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 12px 16px;
            background: var(--bg-secondary);
            border-radius: var(--radius-md);
            margin: 8px 0;
        }
        
        .progress-container .progress-text {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            color: var(--text-secondary);
        }
        
        .progress-container .progress-text .spinner {
            width: 14px;
            height: 14px;
            border: 2px solid var(--gray-300);
            border-top-color: var(--primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        /* ========== TAG/PILL INPUT SYSTEM ========== */
        .tag-input-container {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding: 8px 12px;
            min-height: 48px;
            background: var(--bg-primary);
            border: 1px solid var(--border-primary);
            border-radius: var(--radius-md);
            cursor: text;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        
        .tag-input-container:focus-within {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.1);
        }
        
        .tag-input-container .tag-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            background: linear-gradient(135deg, var(--primary-light), var(--primary));
            color: white;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 500;
            animation: tagAppear 0.2s ease-out;
        }
        
        .tag-input-container .tag-pill.hashtag {
            background: linear-gradient(135deg, #7928ca, #9945ff);
        }
        
        .tag-input-container .tag-pill.user {
            background: linear-gradient(135deg, #0070f3, #00a8ff);
        }
        
        .tag-input-container .tag-pill .tag-remove {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 16px;
            height: 16px;
            background: rgba(255,255,255,0.3);
            border-radius: 50%;
            cursor: pointer;
            font-size: 12px;
            line-height: 1;
            transition: background 0.15s;
        }
        
        .tag-input-container .tag-pill .tag-remove:hover {
            background: rgba(255,255,255,0.5);
        }
        
        .tag-input-container .tag-input {
            flex: 1;
            min-width: 150px;
            border: none;
            outline: none;
            background: transparent;
            font-size: 14px;
            color: var(--text-primary);
        }
        
        .tag-input-container .tag-input::placeholder {
            color: var(--text-tertiary);
        }
        
        @keyframes tagAppear {
            from {
                opacity: 0;
                transform: scale(0.8);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }
        
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            20%, 60% { transform: translateX(-4px); }
            40%, 80% { transform: translateX(4px); }
        }
        
        .tag-input-hint {
            font-size: 11px;
            color: var(--text-tertiary);
            margin-top: 4px;
        }
        
        /* Enhanced card shadows on hover */
        .card:hover {
            box-shadow: 0 12px 40px rgba(0,0,0,0.12) !important;
        }
        
        /* API status items hover */
        .api-status-item:hover {
            transform: translateX(4px);
            border-color: var(--primary-color) !important;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        
        /* Responsive improvements */
        @media (max-width: 768px) {
            .dashboard-hero {
                padding: 32px 24px !important;
            }
            
            .hero-stat-card {
                padding: 20px 16px !important;
            }
            
            .stat-card {
                padding: 24px !important;
            }
        }
  
        /* ========== TARGET CONTEXT MODE STYLES ========== */
        
        .context-mode-option:has(input:checked) {
            border-color: var(--primary) !important;
            background: rgba(0, 112, 243, 0.05) !important;
        }
        
        .context-mode-option:hover {
            border-color: var(--primary);
            background: var(--gray-50);
        }
        
        .target-card:hover {
            background: var(--gray-50);
            border-color: var(--primary);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        
        /* Modal overlay animation */
        .modal-overlay {
            animation: fadeIn 0.2s ease;
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }
        
        .modal-container {
            animation: slideUp 0.3s ease;
        }
        
        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* ========== TARGET SELECTOR STYLES ========== */
        
        .targets-selector {
            padding: 0;
        }
        
        .targets-selector .target-checkbox-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 14px;
            border-bottom: 1px solid var(--border-color);
            cursor: pointer;
            transition: background 0.15s ease;
        }
        
        .targets-selector .target-checkbox-item:last-child {
            border-bottom: none;
        }
        
        .targets-selector .target-checkbox-item:hover {
            background: var(--surface-tertiary);
        }
        
        .targets-selector .target-checkbox-item.selected {
            background: rgba(0, 112, 243, 0.08);
        }
        
        .targets-selector .target-checkbox-item input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: var(--primary);
            cursor: pointer;
        }
        
        .targets-selector .target-info {
            flex: 1;
            min-width: 0;
        }
        
        .targets-selector .target-name {
            font-weight: 500;
            color: var(--text-primary);
            font-size: 14px;
        }
        
        .targets-selector .target-meta {
            font-size: 11px;
            color: var(--text-tertiary);
            margin-top: 2px;
        }
        
        .targets-selector .target-priority {
            font-size: 11px;
            padding: 2px 8px;
            border-radius: 10px;
            font-weight: 500;
        }
        
        .targets-selector .target-priority.high {
            background: #fef2f2;
            color: #dc2626;
        }
        
        .targets-selector .target-priority.medium {
            background: #fefce8;
            color: #ca8a04;
        }
        
        .targets-selector .target-priority.low {
            background: #f0fdf4;
            color: #16a34a;
        }
        
        .targets-selector .empty-state {
            padding: 24px;
            text-align: center;
            color: var(--text-tertiary);
            font-size: 13px;
        }

        /* ========== TARGET PILLS STYLES ========== */
        
        .target-pills-container {
            transition: all 0.2s ease;
        }
        
        .target-pills-container:hover {
            border-color: var(--primary) !important;
        }
        
        .target-pills-container.has-items {
            border-style: solid !important;
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.03), rgba(139, 92, 246, 0.03)) !important;
        }
        
        .target-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            background: linear-gradient(135deg, #3b82f6, #8b5cf6);
            color: white;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 500;
            box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
            animation: pillAppear 0.3s ease;
            cursor: default;
        }
        
        .target-pill.hashtag {
            background: linear-gradient(135deg, #ec4899, #f43f5e);
            box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
        }
        
        .target-pill .pill-remove {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 12px;
            line-height: 1;
        }
        
        .target-pill .pill-remove:hover {
            background: rgba(255, 255, 255, 0.4);
            transform: scale(1.1);
        }
        
        @keyframes pillAppear {
            from {
                opacity: 0;
                transform: scale(0.8);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }
        
        .target-checkbox-item.selected {
            opacity: 0.5;
            pointer-events: none;
        }
        
        .target-checkbox-item.selected::after {
            content: '✓ Añadido';
            position: absolute;
            right: 12px;
            font-size: 11px;
            color: var(--success);
            font-weight: 500;
        }
